summaryrefslogtreecommitdiff
path: root/ce
diff options
context:
space:
mode:
authorlacour2007-12-10 15:10:45 +0000
committerlacour2007-12-10 15:10:45 +0000
commit0bdafd9d8f1404a0641825f754c41cfe432fcd2e (patch)
treee3efae3715149e1051903cd80353218588c16bc8 /ce
parentda3357b0f885c5ce78be37f44b07be8691c255d0 (diff)
add PHY_CHANDATA_NRJ_LAST_SIZE constant and modify initialisation in overide of pbproc for maximus
test. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1118 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'ce')
-rwxr-xr-xce/test/common/print_utils.h2
-rwxr-xr-xce/test/common/src/print_utils.c7
-rw-r--r--ce/test/maximus/overide/mac/pbproc/src/pbproc.c12
3 files changed, 15 insertions, 6 deletions
diff --git a/ce/test/common/print_utils.h b/ce/test/common/print_utils.h
index 2dc915f9a3..9a2a72f870 100755
--- a/ce/test/common/print_utils.h
+++ b/ce/test/common/print_utils.h
@@ -27,7 +27,7 @@ void
ce_print_byte (u8 c);
void
-ce_print_nibble (u8 c);
+ce_print_nibble (u32 c);
void
ce_print_buffer (u8 *buf, int length);
diff --git a/ce/test/common/src/print_utils.c b/ce/test/common/src/print_utils.c
index 90ff0cae3e..257ece70ce 100755
--- a/ce/test/common/src/print_utils.c
+++ b/ce/test/common/src/print_utils.c
@@ -122,9 +122,12 @@ ce_print_tonemaps (tonemaps_t *tms)
void
ce_print_chandata (phy_chandata_t *f)
{
- while (f)
+ uint i;
+ for(i=0; i<PHY_CHANDATA_BLK_NB; i++)
+ //while (f)
{
- ce_print ("%d->", f->last);
+ ce_print("{size:%d, last:%d, type:%d, @0x%x}",f->size, f->last, f->type, f->address);
+ if( (i+1) < PHY_CHANDATA_BLK_NB) ce_print ("->\n");
f = (phy_chandata_t *) f->blk.next;
}
ce_print ("\n");
diff --git a/ce/test/maximus/overide/mac/pbproc/src/pbproc.c b/ce/test/maximus/overide/mac/pbproc/src/pbproc.c
index de469ec5c6..3cf89633e4 100644
--- a/ce/test/maximus/overide/mac/pbproc/src/pbproc.c
+++ b/ce/test/maximus/overide/mac/pbproc/src/pbproc.c
@@ -156,23 +156,27 @@ int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
time_noise->blk.next = NULL;
time_noise->last=0;
time_noise->type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
- time_noise->size = 128; //pb_nb; // if one word by pb
+ time_noise->size = (pb_nb * sizeof(noise_t)+ 3)/4;
phy_chandata_t *last_chan;
phy_chandata_t *freq_noise = (phy_chandata_t *) blk_alloc_desc_range(PHY_CHANDATA_BLK_NB-1, (blk_t **) &last_chan); // if 4 bytes per freq_noise
last_chan->blk.next = NULL;
last_chan->last = 1;
last_chan->type = PHY_CHANDATA_TYPE_NRJ;
- last_chan->size = PHY_CARRIER_NB % (512/PHY_CHANDATA_UNIT_BYTES);
- if (last_chan->size == 0) last_chan->size = 128;
+ last_chan->size = PHY_CHANDATA_NRJ_LAST_SIZE;
phy_chandata_t *browser = freq_noise;
+ uint address=0;
while (browser != last_chan)
{
browser->last = 0;
browser->type = PHY_CHANDATA_TYPE_NRJ;
browser->size = 128;
+ browser->address = address;
browser = (phy_chandata_t *)browser->blk.next;
+ address+= 128;
}
+ last_chan->address = address;
+
/** registering reception status to be able to run pbproc_rx_cb that wake
@@ -185,6 +189,8 @@ int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
time_noise->blk.next = (blk_t *) freq_noise;
rx_pb_nb = pb_nb;
+ ce_print_chandata (time_noise);
+
phy_pbdma_start_chandata(ctx, time_noise);
//phy_pbdma_start_chandata(ctx, freq_noise);