summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
Diffstat (limited to 'cesar')
-rw-r--r--cesar/common/tests/tests4
-rw-r--r--cesar/hal/arch/Config1
-rw-r--r--cesar/hal/arch/arch.h10
-rw-r--r--cesar/hal/arch/inc/sparc.h26
-rw-r--r--cesar/mac/pbproc/src/fsm_rx_sound.c6
-rw-r--r--cesar/mac/pbproc/src/fsm_tx_sound.c6
-rw-r--r--cesar/mac/pbproc/src/prep_mpdu.c2
-rw-r--r--cesar/mac/pbproc/test/int/sparc-Config1
-rw-r--r--cesar/mac/sar/src/sar.c2
-rw-r--r--cesar/projects/plc/Config.traces10
10 files changed, 60 insertions, 8 deletions
diff --git a/cesar/common/tests/tests b/cesar/common/tests/tests
index b83bb8d1ff..83a7fe56b5 100644
--- a/cesar/common/tests/tests
+++ b/cesar/common/tests/tests
@@ -500,3 +500,7 @@ bsu/ntb: ./obj/ntb
bsu/aclf/test/utest:
make
bsu/aclf: ./obj/aclf
+
+projects/plc:
+make
+make traces: make PROJECT_CONFIG=Config.traces
diff --git a/cesar/hal/arch/Config b/cesar/hal/arch/Config
new file mode 100644
index 0000000000..5d46bd1570
--- /dev/null
+++ b/cesar/hal/arch/Config
@@ -0,0 +1 @@
+CONFIG_ARCH_ILRAM_PRIO = 5
diff --git a/cesar/hal/arch/arch.h b/cesar/hal/arch/arch.h
index 81aae83a8e..a1ad0d96fa 100644
--- a/cesar/hal/arch/arch.h
+++ b/cesar/hal/arch/arch.h
@@ -21,6 +21,16 @@
#define ARCH_ILRAM
/**
+ * Put in the instruction local ram section, with lower priority.
+ * \param prio function priority
+ *
+ * Should be put between function return type and function name. Function
+ * will be included in local ram only if priority is lower than or equal to
+ * configured limit.
+ */
+#define ARCH_ILRAM_PRIO(prio)
+
+/**
* Put in the data local ram section.
*/
#define ARCH_DLRAM_DATA
diff --git a/cesar/hal/arch/inc/sparc.h b/cesar/hal/arch/inc/sparc.h
index 03f8dcab86..beafd42c3b 100644
--- a/cesar/hal/arch/inc/sparc.h
+++ b/cesar/hal/arch/inc/sparc.h
@@ -17,9 +17,35 @@
#if defined (ECOS) && ECOS
+# include "config/arch/ilram.h"
+
# undef ARCH_ILRAM
# define ARCH_ILRAM __attribute__ ((section (".ilram")))
+# undef ARCH_ILRAM_PRIO
+# define ARCH_ILRAM_PRIO(prio) PASTE (ARCH_ILRAM_PRIO_, prio)
+
+# if CONFIG_ARCH_ILRAM_PRIO >= 3
+# define ARCH_ILRAM_PRIO_3 ARCH_ILRAM
+# else
+# define ARCH_ILRAM_PRIO_3
+# endif
+# if CONFIG_ARCH_ILRAM_PRIO >= 2
+# define ARCH_ILRAM_PRIO_2 ARCH_ILRAM
+# else
+# define ARCH_ILRAM_PRIO_2
+# endif
+# if CONFIG_ARCH_ILRAM_PRIO >= 1
+# define ARCH_ILRAM_PRIO_1 ARCH_ILRAM
+# else
+# define ARCH_ILRAM_PRIO_1
+# endif
+# if CONFIG_ARCH_ILRAM_PRIO >= 0
+# define ARCH_ILRAM_PRIO_0 ARCH_ILRAM
+# else
+# define ARCH_ILRAM_PRIO_0
+# endif
+
# undef ARCH_DLRAM_DATA
# define ARCH_DLRAM_DATA __attribute__ ((section (".dlram_data")))
diff --git a/cesar/mac/pbproc/src/fsm_rx_sound.c b/cesar/mac/pbproc/src/fsm_rx_sound.c
index 1bdf4548b9..7f2cc83846 100644
--- a/cesar/mac/pbproc/src/fsm_rx_sound.c
+++ b/cesar/mac/pbproc/src/fsm_rx_sound.c
@@ -33,7 +33,7 @@ pbproc_frso_init (pbproc_t *ctx)
pbproc_frso__rx_sound__pbdma;
}
-void ARCH_ILRAM
+void ARCH_ILRAM_PRIO (2)
pbproc_frso__handle (pbproc_t *ctx, u32 rx_date,
const pbproc_fc_sound_t *sound)
{
@@ -170,7 +170,7 @@ pbproc_frso__handle (pbproc_t *ctx, u32 rx_date,
pbproc_frso__rx_sound__pbdma (ctx);
}
-void ARCH_ILRAM
+void ARCH_ILRAM_PRIO (2)
pbproc_frso__rx_sound__pbdma (pbproc_t *ctx)
{
dbg_claim (ctx);
@@ -235,7 +235,7 @@ pbproc_frso__rx_sound__pbdma (pbproc_t *ctx)
pbproc_fsm_change_state (ctx, PBPROC_FSM_STATE_IDLE);
}
-static void ARCH_ILRAM
+static void ARCH_ILRAM_PRIO (2)
pbproc_frso_vcs_restart (pbproc_t *ctx)
{
dbg_claim (ctx);
diff --git a/cesar/mac/pbproc/src/fsm_tx_sound.c b/cesar/mac/pbproc/src/fsm_tx_sound.c
index 3a694cffdc..4308b71749 100644
--- a/cesar/mac/pbproc/src/fsm_tx_sound.c
+++ b/cesar/mac/pbproc/src/fsm_tx_sound.c
@@ -32,7 +32,7 @@ pbproc_ftso_init (pbproc_t *ctx)
pbproc_ftso__tx_sound_wait_ack__access;
}
-void ARCH_ILRAM
+void ARCH_ILRAM_PRIO (2)
pbproc_ftso__handle (pbproc_t *ctx)
{
dbg_claim (ctx);
@@ -50,7 +50,7 @@ pbproc_ftso__handle (pbproc_t *ctx)
ctx->stats.tx_sound++;
}
-void ARCH_ILRAM
+void ARCH_ILRAM_PRIO (2)
pbproc_ftso__tx_sound_wait_ack__rx_fc (pbproc_t *ctx, u32 rx_date,
const pbproc_fc_t *fc_av)
{
@@ -98,7 +98,7 @@ pbproc_ftso__tx_sound_wait_ack__rx_fc (pbproc_t *ctx, u32 rx_date,
}
}
-void ARCH_ILRAM
+void ARCH_ILRAM_PRIO (2)
pbproc_ftso__tx_sound_wait_ack__access (pbproc_t *ctx)
{
dbg_claim (ctx);
diff --git a/cesar/mac/pbproc/src/prep_mpdu.c b/cesar/mac/pbproc/src/prep_mpdu.c
index 5bf45befb1..411ba4707d 100644
--- a/cesar/mac/pbproc/src/prep_mpdu.c
+++ b/cesar/mac/pbproc/src/prep_mpdu.c
@@ -85,7 +85,7 @@ pbproc_prep_mpdu_init (pbproc_t *ctx)
slist_init (prep->main_commit_return_);
}
-void ARCH_ILRAM
+void ARCH_ILRAM_PRIO (1)
pbproc_prep_beacon (pbproc_t *ctx, mfs_tx_t *mfs)
{
ca_access_param_t *access;
diff --git a/cesar/mac/pbproc/test/int/sparc-Config b/cesar/mac/pbproc/test/int/sparc-Config
index fc03d019b6..c9c832ab38 100644
--- a/cesar/mac/pbproc/test/int/sparc-Config
+++ b/cesar/mac/pbproc/test/int/sparc-Config
@@ -2,3 +2,4 @@ CONFIG_TRACE = y
CONFIG_DEBUG_CLAIM = n
CONFIG_STATS = n
CONFIG_INTERFACE_SNIFFER = n
+CONFIG_ARCH_ILRAM_PRIO = 0
diff --git a/cesar/mac/sar/src/sar.c b/cesar/mac/sar/src/sar.c
index 4edf0ccb52..7849e22ad1 100644
--- a/cesar/mac/sar/src/sar.c
+++ b/cesar/mac/sar/src/sar.c
@@ -1818,7 +1818,7 @@ sar_tx_mac_framing (sar_t *ctx, sar_msdu_t *md_data)
&ctx->job_tx->job);
}
-pb_t * ARCH_ILRAM
+pb_t * ARCH_ILRAM_PRIO (1)
sar_tx_job_desc_create (sar_t *ctx, sar_msdu_t *md_data, mfs_tx_t * mfs,
sar_job_mfs_t *job_mfs)
{
diff --git a/cesar/projects/plc/Config.traces b/cesar/projects/plc/Config.traces
new file mode 100644
index 0000000000..cb793a0b04
--- /dev/null
+++ b/cesar/projects/plc/Config.traces
@@ -0,0 +1,10 @@
+CONFIG_DEBUG_CLAIM = n
+CONFIG_BLK_NB = 6144
+CONFIG_GPIO_LED_TRAFFIC = y
+CONFIG_BLK_SLACK = 512
+CONFIG_STATS_ON_FATAL = y
+
+CONFIG_TRACE = y
+CONFIG_TRACE_ON_FATAL = y
+CONFIG_TRACE_ALL_FAST = y
+CONFIG_ARCH_ILRAM_PRIO = 0