#ifndef ce_rx_param_h #define ce_rx_param_h /* Cesar project {{{ * * Copyright (C) 2012 Spidcom * * <<>> * * }}} */ /** * \file ce/rx/ce_rx_param.h * \brief Channel estimation rx parameters. * \ingroup ce_rx */ /** * Quantize information */ /** * Quantification of margin: divided margin by a factor. * See specification, part 6. */ #define CE_RX_BL_NSR_MARGIN_QUANT_FACTOR (1 << 6) /** * Default value of margin to apply to NSR. * To convert a dB value to this one, you need to apply the following formula: * round (10^(default_value / 10) * CE_RX_BL_NSR_MARGIN_QUANT_FACTOR). * * Set it to a disable value by default. */ #define CE_RX_BL_NSR_MARGIN_DEFAULT CE_RX_BL_NSR_MARGIN_QUANT_FACTOR #define CE_RX_BL_PBER_SLIDING_MEAN_COEF 6912 #define CE_RX_BL_PBER_MEAN_INIT 0 /* Restart CE if current frame PBER > CE_RX_BL_PB_FALSE_FACTOR/CE_RX_BL_PB_TOTAL_FACTOR * and number of PBs in current frame > = CE_RX_BL_MIN_PB_PER_FRAME * and number of consecutive frames in this state > CE_RX_BL_MIN_FRAME_WITH_HIGH_PB_ERR_RATE */ #define CE_RX_BL_PB_FALSE_FACTOR 1 #define CE_RX_BL_PB_TOTAL_FACTOR 4 #define CE_RX_BL_MIN_PB_PER_FRAME 2 #define CE_RX_BL_MIN_FRAME_WITH_HIGH_PB_ERR_RATE 4 /** * Degree maximum of polynomial. */ #define CE_RX_BL_BER_POLY_MAX_DEGREE 2 /** * Default theoretical BER value when NSR is under range. */ #define CE_RX_BL_BER_DEFAULT_UNDER 0 /** * Default theoretical BER value when NSR is over range. */ #define CE_RX_BL_BER_DEFAULT_OVER (1ll << 52) /** * BER quantification factor. */ #define CE_RX_BL_BER_QUANT_FACTOR (1ll << 53) /** * Number maximum of polynomial per modulation. */ #define CE_RX_BL_BER_POLY_PER_MOD 10 /* Imported from 2 files: * http://stestephe/svn/spidcom_digital_svn/projects/DSP_350/DSP_chain/SW/Bit_Loading/BER_vs_NSR/Polynomes_BERinq_vs_NSRq_normalises.m * http://stestephe/svn/spidcom_digital_svn/projects/DSP_350/DSP_chain/SW/Bit_Loading/BitAllocationNSRLines.m * Revision: 19108. */ #define CE_RX_BL_BER_POLY_COEF \ {\ 5,\ { 1,1,1,1,1 },\ {\ { 48707229072ll, -231502078889845ll },\ { 51034114569ll, -255095996583158ll },\ { 49101951152ll, -221873016034784ll },\ { 34830906051ll, 169909117254752ll },\ { 31231854645ll, 327698216309011ll },\ },\ { 5461,10138,17193,27451,43840,133705 },\ },\ {\ 8,\ { 1,1,1,1,1,1,1,1 },\ {\ { 106867077906ll, -247035833261242ll },\ { 115226016318ll, -288276656914692ll },\ { 109008654922ll, -238837611246974ll },\ { 87714814011ll, -20038024183413ll },\ { 69036631737ll, 223512099062993ll },\ { 58835483755ll, 396512911174249ll },\ { 39647808559ll, 816495774781217ll },\ { 40020862919ll, 805934726920136ll },\ },\ { 2654,4932,7950,10274,13038,16957,21887,28308,92392 },\ },\ {\ 7,\ { 1,1,1,1,1,1,1 },\ {\ { 233587358663ll, -171155435491478ll },\ { 277235450254ll, -238059028343662ll },\ { 250979527275ll, -173894916650781ll },\ { 170121467858ll, 138759948740058ll },\ { 120561024923ll, 454916356836180ll },\ { 73528170603ll, 941003011986941ll },\ { 46281993046ll, 1388661227541923ll },\ },\ { 854,1531,2442,3865,6378,10334,16429,67302 },\ },\ {\ 7,\ { 1,1,1,1,1,1,1 },\ {\ { 416967936517ll, -189160325514678ll },\ { 464351365540ll, -234875159184782ll },\ { 396074764261ll, -130220392038170ll },\ { 273650540604ll, 170471217490103ll },\ { 185629177496ll, 509911263344670ll },\ { 109564768618ll, 973610181232647ll },\ { 75999460853ll, 1316904718037186ll },\ },\ { 607,963,1531,2455,3855,6095,10226,41929 },\ },\ {\ 9,\ { 1,1,1,1,1,1,1,1,1 },\ {\ { 1195842099902ll, -116472031098039ll },\ { 1541877600934ll, -182922717796973ll },\ { 1432873345932ll, -149753660819387ll },\ { 1051908742909ll, 32981592496052ll },\ { 723479068330ll, 285933360045175ll },\ { 552405600686ll, 494199375182367ll },\ { 416730011388ll, 758328584740550ll },\ { 236934801623ll, 1311288936216613ll },\ { 121246948902ll, 1880002881788720ll },\ },\ { 121,191,303,478,769,1216,1945,3074,4914,21637 },\ },\ {\ 7,\ { 1,1,1,1,1,1,1 },\ {\ { 4928645393988ll, -136377286929978ll },\ { 4256324898860ll, -84804952052015ll },\ { 2698880614434ll, 154178754550135ll },\ { 1686129960873ll, 463628500311706ll },\ { 1057111588868ll, 848637525966814ll },\ { 489834158584ll, 1535265641130321ll },\ { 188319045722ll, 2275983211494540ll },\ },\ { 39,76,152,305,611,1209,2456,11828 },\ },\ {\ 8,\ { 1,1,1,1,1,1,1,1 },\ {\ { 15193205993312ll, -96041022323229ll },\ { 15420451694819ll, -99599159146680ll },\ { 10303752668273ll, 57836000947648ll },\ { 6595162108049ll, 286536853846374ll },\ { 3893159790166ll, 613725600089774ll },\ { 2248929120557ll, 1009209348320871ll },\ { 995369059154ll, 1606569684183974ll },\ { 439141615597ll, 2153227132873060ll },\ },\ { 8,15,30,61,120,240,476,982,5351 },\ },\ #define CE_RX_BL_BER_CONSIGN_COEFS_AV \ { -106541828252ll, 841188148187808ll },\ { -5639041049ll, 127893477397182ll },\ #define CE_RX_BL_BER_CONSIGN_DEGREES_AV \ 1, 1, \ #define CE_RX_BL_BER_CONSIGN_COEFS_EOC \ { 520279884440399ll },\ { 39597018917606ll },\ #define CE_RX_BL_BER_CONSIGN_DEGREES_EOC \ 0, 0, \ #define CE_RX_BL_BER_MARGIN_1_2_DEFAULT 0ll #define CE_RX_BL_BER_MARGIN_16_21_DEFAULT 0ll /** * BER sliding means factor of divisor. * Factors are expressed by this divisor. */ #define CE_RX_BL_BER_SLIDING_MEAN_FACTOR_DIV (256) /** * BER sliding means factors. * For each sliding mean of BER, we have a factor for the old value of the * sliding mean (and one for the new value which can be computed with the used * of the factor of divisor). * For example, for the BER sliding mean fast, the formula is the following: * \verbatim * factor_prev = factor * factor_new = CE_RX_BL_BER_SLIDING_MEAN_FACTOR_DIV - factor_prev * ber_sliding_mean = (factor_prev * ber_sliding_mean + factor_new * ber_new) * / (CE_RX_BL_BER_SLIDING_MEAN_FACTOR_DIV) * \endverbatim */ #define CE_RX_BL_BER_SLIDING_MEAN_FAST_FACTOR (122 * 2) #define CE_RX_BL_BER_SLIDING_MEAN_SLOW_FACTOR 253 /* Restart CE if both fast and slow ber < ber_target - (ber_target * * CE_RX_BL_BER_LOWER_BOUND / CE_RX_BL_BER_LOWER_BOUND_UNIT) */ #define CE_RX_BL_BER_LOWER_BOUND_UNIT (128) #define CE_RX_BL_BER_LOWER_BOUND 70 /* Pber limits values for BMU */ #define CE_RX_BL_BER_MARGIN_UPDATE_PBER_LIMIT_MIN 0 #define CE_RX_BL_BER_MARGIN_UPDATE_PBER_LIMIT_MAX (uint) -1 /* Polynomial definitions for BMU. */ #define CE_RX_BL_BMU_POLY_SUP_A 1374389535ll #define CE_RX_BL_BMU_POLY_SUP_B -(4*4503874506616ll)/5 #define CE_RX_BL_BMU_POLY_INF_A 34378623109ll #define CE_RX_BL_BMU_POLY_INF_B -(22547998136852ll) #define CE_RX_BL_BMU_POLY_FEC_RATE_1_2_FACTOR 3 #define CE_RX_BL_BMU_POLY_FEC_RATE_16_21_FACTOR 1 /* Set min value for internal counters. */ #define CE_RX_BL_BMU_PB_COUNT_MIN 15915 #define CE_RX_BL_BMU_OSCILLATION_COUNT_MIN 10 /* Set minimum time between two consecutive CE restart for the same reason. */ #define CE_RX_BL_MIN_TIME_BETWEEN_CE_RESTART_PBER_MS 3000 #define CE_RX_BL_MIN_TIME_BETWEEN_CE_RESTART_BER_MS 3000 #define CE_RX_BL_MIN_TIME_BETWEEN_CE_RESTART_BER_MARGIN_UPDATE 3000 #endif /* ce_rx_param_h */