summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/test/src
diff options
context:
space:
mode:
authorYacine Belkadi2011-12-21 10:30:51 +0100
committerYacine Belkadi2012-01-12 10:22:31 +0100
commitd2617fdde159644deda9fb9c7be6517251114112 (patch)
tree0d03bad6782050fc2d3869fe06671c57d461785e /cesar/ce/rx/bitloading/test/src
parent7ed7f5d2760322b8b33d75760b396d951c953690 (diff)
cesar/ce/rx/bl: BER means: ignore (1 good PB && PB < 1 symbol), closes #2755
If we have: - A channel with low SNR on the last carriers, which results in a tonemap where the last carriers have less good modulations than the previous carriers. - A traffic of small packets, which results in frames of only one PB where the PB doesn't occupy the whole symbol. then the BER means decrease and cause a CE restart. With this commit, the BER means are not updated for frames with only one good PB that occupied less than a symbol.
Diffstat (limited to 'cesar/ce/rx/bitloading/test/src')
-rw-r--r--cesar/ce/rx/bitloading/test/src/test_fsm.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/cesar/ce/rx/bitloading/test/src/test_fsm.c b/cesar/ce/rx/bitloading/test/src/test_fsm.c
index 5b6504c56e..03c2a211d8 100644
--- a/cesar/ce/rx/bitloading/test/src/test_fsm.c
+++ b/cesar/ce/rx/bitloading/test/src/test_fsm.c
@@ -906,6 +906,51 @@ test_ce_rx_bl_fsm_base (test_t t)
ce_rx_bitloading_uninit (&sta.ce_rx_bt);
} test_end;
+ test_begin (t, "TRACKING, frame with only one good PB and size of "
+ "PB < tm.bits_per_symbol, no update of BER sliding means")
+ {
+ ce_rx_bitloading_init (&sta.ce_rx_bt);
+ test_ce_rx_bl_reset (&sta.ce_rx_bt);
+ test_ce_rx_bl_measure_empty (&measure);
+ measure.false_pb_count = 1;
+ measure.total_pb_count = 2;
+ tm.bits_per_symbol = PHY_CARRIER_NB
+ * CE_BIT_PER_MOD[CE_MOD_COUNT - 1];
+
+ s64 prev_ber_sliding_mean_fast =
+ sta.ce_rx_bt.ber_sliding_mean[CE_RX_BL_BER_SLIDING_MEAN_FAST] = 0x1;
+ s64 prev_ber_sliding_mean_slow =
+ sta.ce_rx_bt.ber_sliding_mean[CE_RX_BL_BER_SLIDING_MEAN_SLOW] = 0x2;
+
+ uint pos = 0;
+ scenario_test[pos++] = (scenario_entry_t)
+ SCENARIO_ACTION (TRACKING__data,
+ .sta = &sta,
+ .measure = measure,
+ .branch = ce_rx_bl_fsm_next_branch
+ (TRACKING, data, no_channel_change));
+
+ /* No SCENARIO_EVENT (ce_rx_bl_ber_sliding_mean_update) */
+
+ scenario_test[pos++] = (scenario_entry_t)
+ SCENARIO_EVENT (ce_rx_bl_pber_sliding_mean_update);
+ scenario_test[pos++] = (scenario_entry_t)
+ SCENARIO_END;
+
+ scenario_run (t, scenario_test, &globals);
+
+ /* Check that the BER sliding means have not been updated. */
+ test_fail_if (
+ sta.ce_rx_bt.ber_sliding_mean[CE_RX_BL_BER_SLIDING_MEAN_FAST]
+ != prev_ber_sliding_mean_fast);
+ test_fail_if (
+ sta.ce_rx_bt.ber_sliding_mean[CE_RX_BL_BER_SLIDING_MEAN_SLOW]
+ != prev_ber_sliding_mean_slow);
+
+ /* Clean. */
+ ce_rx_bitloading_uninit (&sta.ce_rx_bt);
+ }test_end;
+
}
int