Add EPRE measurement to PUSCH decoder

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 567790c1a2
commit 834a081c09

@ -96,6 +96,7 @@ typedef struct SRSLTE_API {
bool crc; bool crc;
float avg_iterations_block; float avg_iterations_block;
float evm; float evm;
float epre_dbfs;
} srslte_pusch_res_t; } srslte_pusch_res_t;
SRSLTE_API int srslte_pusch_init_ue(srslte_pusch_t* q, uint32_t max_prb); SRSLTE_API int srslte_pusch_init_ue(srslte_pusch_t* q, uint32_t max_prb);

@ -78,6 +78,7 @@ typedef struct SRSLTE_API {
bool meas_time_en; bool meas_time_en;
uint32_t meas_time_value; uint32_t meas_time_value;
bool meas_epre_en;
bool meas_ta_en; bool meas_ta_en;
bool meas_evm_en; bool meas_evm_en;

@ -489,6 +489,13 @@ int srslte_pusch_decode(srslte_pusch_t* q,
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }
// Measure Energy per Resource Element
if (cfg->meas_epre_en) {
out->epre_dbfs = srslte_convert_power_to_dB(srslte_vec_avg_power_cf(q->d, n));
} else {
out->epre_dbfs = NAN;
}
/* extract channel estimates */ /* extract channel estimates */
n = pusch_get(q, &cfg->grant, channel->ce, q->ce, sf->shortened); n = pusch_get(q, &cfg->grant, channel->ce, q->ce, sf->shortened);
if (n != cfg->grant.nof_re) { if (n != cfg->grant.nof_re) {
@ -602,6 +609,11 @@ uint32_t srslte_pusch_rx_info(srslte_pusch_cfg_t* cfg,
len = srslte_print_check(str, str_len, len, ", snr=%.1f dB", chest_res->snr_db); len = srslte_print_check(str, str_len, len, ", snr=%.1f dB", chest_res->snr_db);
// Append Energy Per Resource Element
if (cfg->meas_epre_en) {
len = srslte_print_check(str, str_len, len, ", epre=%.1f dBfs", res->epre_dbfs);
}
// Append Time Aligment information if available // Append Time Aligment information if available
if (cfg->meas_ta_en) { if (cfg->meas_ta_en) {
len = srslte_print_check(str, str_len, len, ", ta=%.1f us", chest_res->ta_us); len = srslte_print_check(str, str_len, len, ", ta=%.1f us", chest_res->ta_us);

@ -53,6 +53,7 @@ struct phy_args_t {
std::string equalizer_mode = "mmse"; std::string equalizer_mode = "mmse";
float estimator_fil_w = 1.0f; float estimator_fil_w = 1.0f;
bool pregenerate_signals = false; bool pregenerate_signals = false;
bool pusch_meas_epre = true;
bool pusch_meas_evm = true; bool pusch_meas_evm = true;
bool pusch_meas_ta = true; bool pusch_meas_ta = true;

@ -101,6 +101,7 @@ inline void phy_ue_db::_set_common_config_rnti(uint16_t rnti)
scell_info.phy_cfg.ul_cfg.pucch.rnti = rnti; scell_info.phy_cfg.ul_cfg.pucch.rnti = rnti;
scell_info.phy_cfg.ul_cfg.pusch.rnti = rnti; scell_info.phy_cfg.ul_cfg.pusch.rnti = rnti;
scell_info.phy_cfg.ul_cfg.pusch.meas_time_en = true; scell_info.phy_cfg.ul_cfg.pusch.meas_time_en = true;
scell_info.phy_cfg.ul_cfg.pusch.meas_epre_en = phy_args->pusch_meas_epre;
scell_info.phy_cfg.ul_cfg.pusch.meas_ta_en = phy_args->pusch_meas_ta; scell_info.phy_cfg.ul_cfg.pusch.meas_ta_en = phy_args->pusch_meas_ta;
scell_info.phy_cfg.ul_cfg.pusch.meas_evm_en = phy_args->pusch_meas_evm; scell_info.phy_cfg.ul_cfg.pusch.meas_evm_en = phy_args->pusch_meas_evm;
scell_info.phy_cfg.ul_cfg.pucch.threshold_format1 = SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT1; scell_info.phy_cfg.ul_cfg.pucch.threshold_format1 = SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT1;

Loading…
Cancel
Save