summaryrefslogtreecommitdiff
path: root/cesar/ce/rx
diff options
context:
space:
mode:
authorCyril Jourdan2013-05-03 09:43:01 +0200
committerCyril Jourdan2013-05-24 08:54:42 +0200
commit9dd47c8fc3c78d83a3cb732e2f23fbef98005207 (patch)
treec25b6ba04800c32f73b1edd4a8019a0f12c4f567 /cesar/ce/rx
parent9614c785f923edc816a17920776df7f118d63b8f (diff)
cesar/ce/rx/bl: remove useless global variables
A structure has been created for this parameters, this globals should not be used anymore.
Diffstat (limited to 'cesar/ce/rx')
-rw-r--r--cesar/ce/rx/bitloading/bitloading.h23
-rw-r--r--cesar/ce/rx/bitloading/src/bitloading.c6
-rw-r--r--cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c27
3 files changed, 13 insertions, 43 deletions
diff --git a/cesar/ce/rx/bitloading/bitloading.h b/cesar/ce/rx/bitloading/bitloading.h
index c4543b55cc..aa500aefcb 100644
--- a/cesar/ce/rx/bitloading/bitloading.h
+++ b/cesar/ce/rx/bitloading/bitloading.h
@@ -24,29 +24,6 @@
#include "common/module.h"
-/**
- * Comparisons factors to know when to restart CE.
- */
-extern uint ce_rx_bl_pb_false_factor_;
-extern uint ce_rx_bl_pb_total_factor_;
-
-/**
- * Minimum PB per frame (for high PB error rate criteria).
- */
-extern uint ce_rx_bl_min_pb_per_frame_;
-
-/**
- * How many frames with "high PB error rate" we must have before restarting
- * CE.
- */
-extern uint ce_rx_bl_min_frame_with_high_pb_err_rate_;
-
-/**
- * BER lower bound.
- * In CE_RX_BL_BER_LOWER_BOUND_UNIT of BER consign.
- */
-extern uint ce_rx_bl_ber_lower_bound_;
-
BEGIN_DECLS
/**
diff --git a/cesar/ce/rx/bitloading/src/bitloading.c b/cesar/ce/rx/bitloading/src/bitloading.c
index 1e0109168a..9c5da4523a 100644
--- a/cesar/ce/rx/bitloading/src/bitloading.c
+++ b/cesar/ce/rx/bitloading/src/bitloading.c
@@ -27,12 +27,6 @@
#define LIB_HEAPSORT_USER_PREFIX ce_rx_bl_ber_impact
#include "lib/heapsort.h"
-uint ce_rx_bl_pb_false_factor_ = CE_RX_BL_PB_FALSE_FACTOR;
-uint ce_rx_bl_pb_total_factor_ = CE_RX_BL_PB_TOTAL_FACTOR;
-uint ce_rx_bl_min_pb_per_frame_ = CE_RX_BL_MIN_PB_PER_FRAME;
-uint ce_rx_bl_min_frame_with_high_pb_err_rate_ = CE_RX_BL_MIN_FRAME_WITH_HIGH_PB_ERR_RATE;
-
-
/**
* Number of LSB to remove of the BER to compute the BER weighted sum.
* It corresponds to the sum of BER weighted by the number of bits of a tone:
diff --git a/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c b/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c
index f6482c90f2..8a681246be 100644
--- a/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c
+++ b/cesar/ce/rx/bitloading/test/intervals/src/test_intervals_fsm.c
@@ -31,12 +31,6 @@
#include <cyg/kernel/kapi.h>
#include <string.h>
-uint ce_rx_bl_pb_false_factor_ = CE_RX_BL_PB_FALSE_FACTOR;
-uint ce_rx_bl_pb_total_factor_ = CE_RX_BL_PB_TOTAL_FACTOR;
-uint ce_rx_bl_min_pb_per_frame_ = CE_RX_BL_MIN_PB_PER_FRAME;
-uint ce_rx_bl_min_frame_with_high_pb_err_rate_
- = CE_RX_BL_MIN_FRAME_WITH_HIGH_PB_ERR_RATE;
-
/**
* The configuration of the BER module.
*/
@@ -273,14 +267,14 @@ test_ce_rx_bl_fsm_INTERVAL_TRACKING (test_t t)
sta.rx_tonemaps->tm[tested_tmi]->ber_target = 1664;
sta.intervals = ce_rx_bl_intervals_alloc (&sta.ce_rx_bt, tested_tmi);
measure.rx_params.tmi_av = tested_tmi;
- measure.false_pb_count = ce_rx_bl_min_pb_per_frame_;
- measure.total_pb_count = 1 + ce_rx_bl_min_pb_per_frame_ +
- CEIL_DIV (ce_rx_bl_min_pb_per_frame_
- * ce_rx_bl_pb_false_factor_, ce_rx_bl_pb_total_factor_);
+ measure.false_pb_count = ce_rx_bl_pber_conf.min_pb_per_frame;
+ measure.total_pb_count = 1 + ce_rx_bl_pber_conf.min_pb_per_frame +
+ CEIL_DIV (ce_rx_bl_pber_conf.min_pb_per_frame
+ * ce_rx_bl_pber_conf.pb_false_factor, ce_rx_bl_pber_conf.pb_total_factor);
measure.rx_params.pb_size = PHY_PB_SIZE_520;
sta.intervals->intervals[tested_fsm_id]->high_pb_error_rate_frame_counter =
- ce_rx_bl_min_frame_with_high_pb_err_rate_ - 2;
+ ce_rx_bl_pber_conf.min_frame_with_high_pb_err_rate - 2;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[0] = 1;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[2] = 1;
@@ -302,7 +296,7 @@ test_ce_rx_bl_fsm_INTERVAL_TRACKING (test_t t)
} test_end;
sta.intervals->intervals[tested_fsm_id]->high_pb_error_rate_frame_counter =
- ce_rx_bl_min_frame_with_high_pb_err_rate_ - 1;
+ ce_rx_bl_pber_conf.min_frame_with_high_pb_err_rate - 1;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[0] = 1;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[2] = 1;
@@ -324,7 +318,7 @@ test_ce_rx_bl_fsm_INTERVAL_TRACKING (test_t t)
} test_end;
sta.intervals->intervals[tested_fsm_id]->high_pb_error_rate_frame_counter =
- ce_rx_bl_min_frame_with_high_pb_err_rate_ - 2;
+ ce_rx_bl_pber_conf.min_frame_with_high_pb_err_rate - 2;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[0] = 0;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[2] = 0;
@@ -346,7 +340,7 @@ test_ce_rx_bl_fsm_INTERVAL_TRACKING (test_t t)
} test_end;
sta.intervals->intervals[tested_fsm_id]->high_pb_error_rate_frame_counter =
- ce_rx_bl_min_frame_with_high_pb_err_rate_ - 1;
+ ce_rx_bl_pber_conf.min_frame_with_high_pb_err_rate - 1;
sta.intervals->intervals[tested_fsm_id]->next_date_min_for_restart_rtc_date[0] = 0;
test_begin (t, "High PB error rate, not too soon and enough frames.")
@@ -762,6 +756,11 @@ main (int argc, char **argv)
test_init (t, argc, argv);
test_suite_begin (t, "CE:RX:BL:INTERVALS: SUB FSM");
+ ce_rx_bl_pber_conf.pb_false_factor = CE_RX_BL_PB_FALSE_FACTOR;
+ ce_rx_bl_pber_conf.pb_total_factor = CE_RX_BL_PB_TOTAL_FACTOR;
+ ce_rx_bl_pber_conf.min_pb_per_frame = CE_RX_BL_MIN_PB_PER_FRAME;
+ ce_rx_bl_pber_conf.min_frame_with_high_pb_err_rate =
+ CE_RX_BL_MIN_FRAME_WITH_HIGH_PB_ERR_RATE;
ce_rx_bl_ber_conf_init();
test_ce_rx_bl_fsm_INTERVAL_TRACKING (t);
test_ce_rx_bl_fsm_INTERVAL_SOUND (t);