summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/pber.h
diff options
context:
space:
mode:
authorJalil Chemseddine2012-06-25 16:41:09 +0200
committerJalil Chemseddine2012-06-28 17:29:19 +0200
commit175b1d7f1c45bcf5216de55c71f24032656b9b6b (patch)
tree35e822c09e6dea9a5b955e70685937a9000f0c2b /cesar/ce/rx/bitloading/pber.h
parent1006ad3a131dcd72b9af70386fdbe84b3b2a61ce (diff)
cesar/ce/rx/bl: compute PBER sliding mean by PB not by frame, closes #3215
Diffstat (limited to 'cesar/ce/rx/bitloading/pber.h')
-rw-r--r--cesar/ce/rx/bitloading/pber.h68
1 files changed, 10 insertions, 58 deletions
diff --git a/cesar/ce/rx/bitloading/pber.h b/cesar/ce/rx/bitloading/pber.h
index 363845d634..3b986acd9a 100644
--- a/cesar/ce/rx/bitloading/pber.h
+++ b/cesar/ce/rx/bitloading/pber.h
@@ -12,33 +12,14 @@
* \brief PB Error Rate functions
* \ingroup ce_rx
*
- * This module is used to manage PBER. Basically, it can compute a PBER
- * quantified and maintain (update and reset) a PBER sliding mean.
- * This is used by the BER margin update.
+ * This module is used to manage PBER.
+ * Basically, it can:
+ * - maintain (update, initialize, reset) a PBER sliding mean (by PB and not
+ * by frame).
+ * This module is used by the BER margin update.
*/
/**
- * Coefficients of PBER sliding mean.
- * PBER sliding mean is computed using the following formula:
- * PBER_sliding_mean = ((old * C) + (new * (D - C)) / D
- */
-typedef enum ce_rx_bl_pber_coef_t
-{
- /**
- * C PBER mean coefficient (previous).
- */
- CE_RX_BL_PBER_COEF_C,
- /**
- * D PBER mean coefficient.
- */
- CE_RX_BL_PBER_COEF_D,
- /**
- * Number of coefficient.
- */
- CE_RX_BL_PBER_COEF_NB
-} ce_rx_bl_pber_coef_t;
-
-/**
* The PBER context.
*/
typedef struct ce_rx_bl_pber_t
@@ -50,28 +31,6 @@ typedef struct ce_rx_bl_pber_t
u32 mean_q16;
} ce_rx_bl_pber_t;
-/**
- * Configuration of the PBER module.
- */
-typedef struct ce_rx_bl_pber_conf_t
-{
- /**
- * Coefficient of sliding mean.
- */
- uint mean_coef[CE_RX_BL_PBER_COEF_NB];
- /**
- * Initial value of PBER sliding mean (after a CE restart for PBER too
- * high or BER too low). A value over CE_RX_BL_PBER_MAX will initialize
- * PBER sliding mean to the PBER of first received frame.
- */
- uint mean_init;
-} ce_rx_bl_pber_conf_t;
-
-/**
- * The configuration of the PBER module.
- */
-extern ce_rx_bl_pber_conf_t ce_rx_bl_pber_conf;
-
BEGIN_DECLS
/**
@@ -82,23 +41,16 @@ void
ce_rx_bl_pber_reset (ce_rx_bl_pber_t *ctx);
/**
- * Compute a quantified PBER (Q16U32)
+ * Update PBER sliding mean with a received frame.
+ * \param ctx the PBER context
* \param pb_total total number of PB (whatever CRC)
* \param pb_crc_false number of PB with a CRC wrong
- * \return the quantified PBER
*
- * This function is used to compute a quantified PBER of a received frame.
- */
-u32
-ce_rx_bl_pber_compute (uint pb_total, uint pb_crc_false);
-
-/**
- * Update PBER sliding mean with a new quantified PBER.
- * \param ctx the PBER context
- * \param pber_q16 the quantified PBER
+ * This function simulates we have received PB one by one and compute the PBER
+ * sliding mean by PB and not by frame.
*/
void
-ce_rx_bl_pber_update (ce_rx_bl_pber_t *ctx, u32 pber_q16);
+ce_rx_bl_pber_update (ce_rx_bl_pber_t *ctx, uint pb_total, uint pb_crc_false);
END_DECLS