summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authordufour2009-07-16 09:13:20 +0000
committerdufour2009-07-16 09:13:20 +0000
commit3a694cd8c015ddb7888f49f589b06c655bdec652 (patch)
treed5eb8cf4899f6af74e759507a62d21dbb2c53ccf /cesar
parentb158eb75227dfcee44602f32bfb9ae30cb678493 (diff)
* ce/rx, common/tests, cp/sta/core
- move all cp part of the CE RX in the ce/rx/cp sub-modules (with the stub), - update test build system, - update cp/sta/core build. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@4978 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar')
-rw-r--r--cesar/ce/rx/Module2
-rw-r--r--cesar/ce/rx/cp/Module2
-rw-r--r--cesar/ce/rx/cp/cp.h (renamed from cesar/ce/rx/cp.h)8
-rw-r--r--cesar/ce/rx/cp/inc/cp.h (renamed from cesar/ce/rx/inc/cp.h)8
-rw-r--r--cesar/ce/rx/cp/mme.h4
-rw-r--r--cesar/ce/rx/cp/src/cp.c (renamed from cesar/ce/rx/src/cp.c)8
-rw-r--r--cesar/ce/rx/cp/stub/Module2
-rw-r--r--cesar/ce/rx/cp/stub/src/cp.c (renamed from cesar/ce/rx/stub/src/cp.c)4
-rw-r--r--cesar/ce/rx/cp/test/Makefile7
-rw-r--r--cesar/ce/rx/cp/test/ecos.ecc.sh5
-rw-r--r--cesar/ce/rx/cp/test/override/cp/inc/context.h39
-rw-r--r--cesar/ce/rx/inc/rx.h2
-rw-r--r--cesar/ce/rx/src/rx.c2
-rw-r--r--cesar/ce/rx/stub/Module2
-rw-r--r--cesar/ce/rx/test/Makefile11
-rw-r--r--cesar/ce/rx/test/override/cp/inc/context.h52
-rw-r--r--cesar/ce/stub/Module2
-rw-r--r--cesar/common/tests/tests2
-rw-r--r--cesar/cp/sta/core/src/core.c2
-rw-r--r--cesar/cp/sta/core/test/Makefile.mk8
20 files changed, 140 insertions, 32 deletions
diff --git a/cesar/ce/rx/Module b/cesar/ce/rx/Module
index a7cc44ef57..52950cbaf5 100644
--- a/cesar/ce/rx/Module
+++ b/cesar/ce/rx/Module
@@ -1,2 +1,2 @@
# Channel Estimation (CE) in Receive (RX) mode.
-SOURCES := rx.c measure.c cp.c bitloading.c
+SOURCES := rx.c measure.c bitloading.c
diff --git a/cesar/ce/rx/cp/Module b/cesar/ce/rx/cp/Module
index 49f41ff83e..8ba4bd956a 100644
--- a/cesar/ce/rx/cp/Module
+++ b/cesar/ce/rx/cp/Module
@@ -1,2 +1,2 @@
# Channel Estimation (CE) in Receive (RX) mode, interface with the CP.
-SOURCES := mme.c
+SOURCES := mme.c cp.c
diff --git a/cesar/ce/rx/cp.h b/cesar/ce/rx/cp/cp.h
index a93f0c6790..07a2d6bc62 100644
--- a/cesar/ce/rx/cp.h
+++ b/cesar/ce/rx/cp/cp.h
@@ -1,5 +1,5 @@
-#ifndef ce_rx_cp_h
-#define ce_rx_cp_h
+#ifndef ce_rx_cp_cp_h
+#define ce_rx_cp_cp_h
/* Cesar project {{{
*
* Copyright (C) 2009 Spidcom
@@ -8,7 +8,7 @@
*
* }}} */
/**
- * \file ce/rx/cp.h
+ * \file ce/rx/cp/cp.h
* \brief Interface to use the CE RX in the CP context.
* \ingroup ce_rx
*
@@ -63,4 +63,4 @@ ce_rx_cp_run_work (cp_t *ctx);
END_DECLS
-#endif /* ce_rx_cp_h */
+#endif /* ce_rx_cp_cp_h */
diff --git a/cesar/ce/rx/inc/cp.h b/cesar/ce/rx/cp/inc/cp.h
index b92bf2aaf5..0d40b6d3b4 100644
--- a/cesar/ce/rx/inc/cp.h
+++ b/cesar/ce/rx/cp/inc/cp.h
@@ -1,5 +1,5 @@
-#ifndef ce_rx_inc_cp_h
-#define ce_rx_inc_cp_h
+#ifndef ce_rx_cp_inc_cp_h
+#define ce_rx_cp_inc_cp_h
/* Cesar project {{{
*
* Copyright (C) 2009 Spidcom
@@ -8,7 +8,7 @@
*
* }}} */
/**
- * \file ce/rx/inc/cp.h
+ * \file ce/rx/cp/inc/cp.h
* \brief Interface to use the CE RX in the CP context (private part).
* \ingroup ce_rx
*
@@ -117,4 +117,4 @@ ce_rx_cp_send_mme_refresh_tmi_list (ce_rx_t *ce_rx, sta_t *peer);
END_DECLS
-#endif /* ce_rx_inc_cp_h */
+#endif /* ce_rx_cp_inc_cp_h */
diff --git a/cesar/ce/rx/cp/mme.h b/cesar/ce/rx/cp/mme.h
index 5c2082acd4..8327205669 100644
--- a/cesar/ce/rx/cp/mme.h
+++ b/cesar/ce/rx/cp/mme.h
@@ -23,6 +23,10 @@
* \warning this function must be executed in the context of the CP.
*/
+#include "cp/cp.h"
+#include "cp/sta/mgr/sta.h"
+
+
BEGIN_DECLS
/**
diff --git a/cesar/ce/rx/src/cp.c b/cesar/ce/rx/cp/src/cp.c
index dfdb7807f8..1708bc8c95 100644
--- a/cesar/ce/rx/src/cp.c
+++ b/cesar/ce/rx/cp/src/cp.c
@@ -6,18 +6,18 @@
*
* }}} */
/**
- * \file ce/rx/src/cp.c
+ * \file ce/rx/cp/src/cp.c
* \brief Interface to use the CE RX in the CP context.
* \ingroup ce_rx
*/
#include "common/std.h"
-#include "cp/sta/core/core.h"
#include "cp/inc/context.h"
+#include "cp/sta/mgr/sta_mgr.h"
#include "ce/rx/cp/mme.h"
#include "ce/rx/inc/rx.h"
-#include "ce/rx/inc/cp.h"
-#include "ce/rx/cp.h"
+#include "ce/rx/cp/inc/cp.h"
+#include "ce/rx/cp/cp.h"
/**
* Get a pre-filed mailbox node for the communication with the CP.
diff --git a/cesar/ce/rx/cp/stub/Module b/cesar/ce/rx/cp/stub/Module
new file mode 100644
index 0000000000..62ea4e1b1c
--- /dev/null
+++ b/cesar/ce/rx/cp/stub/Module
@@ -0,0 +1,2 @@
+# Channel Estimation (CE) in Receive (RX) mode, CP sub-module, stub part.
+SOURCES := cp.c
diff --git a/cesar/ce/rx/stub/src/cp.c b/cesar/ce/rx/cp/stub/src/cp.c
index e5d2bae001..b3eda70c76 100644
--- a/cesar/ce/rx/stub/src/cp.c
+++ b/cesar/ce/rx/cp/stub/src/cp.c
@@ -6,13 +6,13 @@
*
* }}} */
/**
- * \file ce/rx/stub/src/cp.c
+ * \file ce/rx/cp/stub/src/cp.c
* \brief Interface to use the CE RX in the CP context (stub part).
* \ingroup ce_rx
*/
#include "common/std.h"
-#include "ce/rx/cp.h"
+#include "ce/rx/cp/cp.h"
void
ce_rx_cp_set_cp_signal_work_callback (ce_rx_t *ce_rx,
diff --git a/cesar/ce/rx/cp/test/Makefile b/cesar/ce/rx/cp/test/Makefile
index 6c0db51735..ecec285c2e 100644
--- a/cesar/ce/rx/cp/test/Makefile
+++ b/cesar/ce/rx/cp/test/Makefile
@@ -1,11 +1,14 @@
# Base of the project.
BASE = ../../../..
+# Enable ECos.
+ECOS = y
+
# Common includes.
-INCLUDES = ce/tx/test/override
+INCLUDES = ce/rx/cp/test/override
# For host program.
-HOST_PROGRAMS = test_mme
+TARGET_PROGRAMS = test_mme
test_mme_SOURCES = test_mme.c stub.c
test_mme_MODULES = lib mac/common ce/rx/cp ce/common cp/msg/stub
diff --git a/cesar/ce/rx/cp/test/ecos.ecc.sh b/cesar/ce/rx/cp/test/ecos.ecc.sh
new file mode 100644
index 0000000000..2443d0e40f
--- /dev/null
+++ b/cesar/ce/rx/cp/test/ecos.ecc.sh
@@ -0,0 +1,5 @@
+config=${1:-ecos-gen.ecc}
+ecosconfig --config=$config new linux default
+cat >> $config <<'EOF'
+EOF
+ecosconfig --config=$config check
diff --git a/cesar/ce/rx/cp/test/override/cp/inc/context.h b/cesar/ce/rx/cp/test/override/cp/inc/context.h
new file mode 100644
index 0000000000..bec9798a2b
--- /dev/null
+++ b/cesar/ce/rx/cp/test/override/cp/inc/context.h
@@ -0,0 +1,39 @@
+#ifndef override_cp_inc_context_h
+#define override_cp_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file override/cp/inc/context.h
+ * \brief Control plane context override.
+ * \ingroup ce
+ */
+
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+#include "ce/rx/rx.h"
+#include "lib/bitstream.h"
+
+struct cp_t
+{
+ /** Mac store context. */
+ mac_store_t *mac_store;
+
+ /** The mac config context. */
+ mac_config_t *mac_config;
+
+ /** CE RX context. */
+ ce_rx_t *ce_rx;
+
+ /** For test. */
+ u8 *vect;
+ bitstream_t *vect_bt;
+ uint vect_size;
+ struct test_t *t;
+};
+
+#endif /* override_cp_inc_context_h */
diff --git a/cesar/ce/rx/inc/rx.h b/cesar/ce/rx/inc/rx.h
index 7e875eebab..80018e8f2a 100644
--- a/cesar/ce/rx/inc/rx.h
+++ b/cesar/ce/rx/inc/rx.h
@@ -23,7 +23,7 @@
#include <cyg/hal/hal_arch.h>
#include "ce/rx/rx.h"
-#include "ce/rx/cp.h"
+#include "ce/rx/cp/cp.h"
#include "common/defs/priority.h"
diff --git a/cesar/ce/rx/src/rx.c b/cesar/ce/rx/src/rx.c
index 9de5bfb963..bf4d7596dc 100644
--- a/cesar/ce/rx/src/rx.c
+++ b/cesar/ce/rx/src/rx.c
@@ -13,7 +13,7 @@
#include "common/std.h"
#include "ce/rx/inc/measure.h"
#include "ce/rx/inc/bitloading.h"
-#include "ce/rx/inc/cp.h"
+#include "ce/rx/cp/inc/cp.h"
#include "ce/rx/inc/rx.h"
#include "ce/rx/rx.h"
diff --git a/cesar/ce/rx/stub/Module b/cesar/ce/rx/stub/Module
index 1e2daced4b..d0885f6eb6 100644
--- a/cesar/ce/rx/stub/Module
+++ b/cesar/ce/rx/stub/Module
@@ -1,2 +1,2 @@
# Channel Estimation (CE) in Receive (RX) mode, stub part.
-SOURCES := rx.c cp.c
+SOURCES := rx.c
diff --git a/cesar/ce/rx/test/Makefile b/cesar/ce/rx/test/Makefile
index e5f5c72eb9..28ce0b7017 100644
--- a/cesar/ce/rx/test/Makefile
+++ b/cesar/ce/rx/test/Makefile
@@ -4,13 +4,16 @@ BASE = ../../..
# Enable ECos.
ECOS = y
+# Common includes.
+INCLUDES = ce/rx/test/override
+
# Common modules.
-common_MODULES = lib ce/rx ce/rx/cp ce/common mac/common cp/fsm/stub \
- mac/sar/stub cp/sta/core/stub cp/msg/stub \
- cp/sta/mgr cp/cco/action/stub cl/stub
+common_MODULES = lib ce/rx ce/rx/cp ce/common mac/common cp/msg/stub \
+ mac/sar/stub cp/sta/mgr cp/fsm/stub cp/cco/action/stub \
+ cp/sta/core/stub cl/stub
# Dirty hack, no bitloading.
-ce_rx_MODULE_SOURCES = rx.c measure.c cp.c
+ce_rx_MODULE_SOURCES = rx.c measure.c
#../$(BASE)/ce/rx/src/bitloading.c
# Program list.
diff --git a/cesar/ce/rx/test/override/cp/inc/context.h b/cesar/ce/rx/test/override/cp/inc/context.h
new file mode 100644
index 0000000000..cd71e107b5
--- /dev/null
+++ b/cesar/ce/rx/test/override/cp/inc/context.h
@@ -0,0 +1,52 @@
+#ifndef override_cp_inc_context_h
+#define override_cp_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file override/cp/inc/context.h
+ * \brief Control plane context override.
+ * \ingroup ce
+ */
+
+#include "mac/common/config.h"
+#include "mac/common/store.h"
+#include "cp/sta/mgr/sta_mgr.h"
+#include "cp/sta/mgr/inc/sta_mgr.h"
+#include "cl/cl.h"
+#include "mac/sar/sar.h"
+#include "ce/rx/rx.h"
+#include "lib/bitstream.h"
+
+struct cp_t
+{
+ /** Mac store context. */
+ mac_store_t *mac_store;
+
+ /** The mac config context. */
+ mac_config_t *mac_config;
+
+ /** CE RX context. */
+ ce_rx_t *ce_rx;
+
+ /** STA MGR. */
+ cp_sta_mgr_t sta_mgr;
+
+ /** Convergence layer context. */
+ cl_t *cl;
+
+ /** SAR layer. */
+ sar_t *sar;
+
+ /** For test. */
+ u8 *vect;
+ bitstream_t *vect_bt;
+ uint vect_size;
+ struct test_t *t;
+};
+
+#endif /* override_cp_inc_context_h */
diff --git a/cesar/ce/stub/Module b/cesar/ce/stub/Module
index 777fe7571d..3bf4b1a045 100644
--- a/cesar/ce/stub/Module
+++ b/cesar/ce/stub/Module
@@ -1 +1 @@
-MODULES := ce/common/stub ce/tx/stub ce/rx/stub
+MODULES := ce/common/stub ce/tx/stub ce/rx/stub ce/rx/cp/stub
diff --git a/cesar/common/tests/tests b/cesar/common/tests/tests
index 7057252ec1..9d105ba84b 100644
--- a/cesar/common/tests/tests
+++ b/cesar/common/tests/tests
@@ -244,7 +244,7 @@ cov-target ce_rx_test_rx: ./obj/test_rx.elf
ce/rx/cp/test:
make: make COV=y
-cov-target ce_rx_cp_test_me: ./obj/test_mme
+cov-target ce_rx_cp_test_me: ./obj/test_mme.elf
maximus/unittest:
make: make COV=y
diff --git a/cesar/cp/sta/core/src/core.c b/cesar/cp/sta/core/src/core.c
index 9badf1192e..ae51fa4131 100644
--- a/cesar/cp/sta/core/src/core.c
+++ b/cesar/cp/sta/core/src/core.c
@@ -51,7 +51,7 @@
#include "cp/cco/action/cco_action.h"
#include "cp/sta/mgr/sta_mgr.h"
#include "cp/pwl/pwl.h"
-#include "ce/rx/cp.h"
+#include "ce/rx/cp/cp.h"
#include "cp/sta/core/inc/core.h"
diff --git a/cesar/cp/sta/core/test/Makefile.mk b/cesar/cp/sta/core/test/Makefile.mk
index 5b846adf43..4c92be1217 100644
--- a/cesar/cp/sta/core/test/Makefile.mk
+++ b/cesar/cp/sta/core/test/Makefile.mk
@@ -10,21 +10,21 @@ TARGET_PROGRAMS = core_events core core_thread core_timer
core_events_SOURCES = core_events.c cp_cl_interf_stub.c action_stub.c \
sta_mgr_stub.c pwl_stub.c beacon_stub.c
core_events_MODULES = lib cp/sta/core cp/fsm/stub cp/cco/action/stub \
- ce/rx/stub \
+ ce/rx/cp/stub \
$(SPARC_MODULES)
core_SOURCES = core.c cp_cl_interf_stub.c action_stub.c\
sta_mgr_stub.c pwl_stub.c beacon_stub.c
core_MODULES = lib cp/sta/core cp/fsm/stub cp/cco/action/stub \
- ce/rx/stub \
+ ce/rx/cp/stub \
$(SPARC_MODULES)
core_thread_SOURCES = core_thread.c
-core_thread_MODULES = lib cp/sta/core cp/fsm/stub ce/rx/stub \
+core_thread_MODULES = lib cp/sta/core cp/fsm/stub ce/rx/cp/stub \
$(SPARC_MODULES)
core_timer_SOURCES = core_timer.c
-core_timer_MODULES = lib cp/sta/core cp/fsm/stub ce/rx/stub \
+core_timer_MODULES = lib cp/sta/core cp/fsm/stub ce/rx/cp/stub \
$(SPARC_MODULES)
include $(BASE)/common/make/top.mk