summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/src/bitloading.c
diff options
context:
space:
mode:
authordufour2010-02-04 09:08:29 +0000
committerdufour2010-02-04 09:08:29 +0000
commit1c6368a9fc2835136bd7371f47caf452514c0433 (patch)
treeb59fe5de8e013319759ff606691a56421095497b /cesar/ce/rx/bitloading/src/bitloading.c
parentb4935c2d88932d7a04d2cfa22e7ea48605303e82 (diff)
cesar/ce/rx/bl: add a margin to apply to the BER target
Even if the TNS team does not said it should be FEC rate dependant, I think it will in the future. Also, there is no advanced test on the impact of this margin on the bit loading algorithm (no test vector delivered yet). git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6685 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/ce/rx/bitloading/src/bitloading.c')
-rw-r--r--cesar/ce/rx/bitloading/src/bitloading.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cesar/ce/rx/bitloading/src/bitloading.c b/cesar/ce/rx/bitloading/src/bitloading.c
index 96ff2a2362..f47c63c3a2 100644
--- a/cesar/ce/rx/bitloading/src/bitloading.c
+++ b/cesar/ce/rx/bitloading/src/bitloading.c
@@ -227,6 +227,11 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
tm[fec_rate] = tonemap_alloc ();
/* Get initial BER consign from initial bits per tone. */
ber_cur = ce_rx_bl_ber_pt_bpt (fec_rate, bpt_initial[fec_rate]);
+ /* Apply BER target margin. */
+ if (ber_cur > ce_rx_bl_ber_margin_[fec_rate])
+ ber_cur = ber_cur - ce_rx_bl_ber_margin_[fec_rate];
+ else
+ ber_cur = 0;
do
{
/* Optimize tone map to reach BER consign. */
@@ -238,6 +243,11 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
ber_cur = ce_rx_bl_ber_pt_bpt
(fec_rate, (tm[fec_rate]->bits_per_symbol *
CE_RX_BL_BPT_QUANT_FACTOR) / tone_en);
+ /* Apply BER target margin. */
+ if (ber_cur > ce_rx_bl_ber_margin_[fec_rate])
+ ber_cur = ber_cur - ce_rx_bl_ber_margin_[fec_rate];
+ else
+ ber_cur = 0;
}
/* Repeat until no modification of the BER consign or until maximum
* number of iterations is reached. */