SRSENB: select highest with/without SR correlation PUCCH result

This commit is contained in:
Xavier Arteaga 2021-04-27 12:42:58 +02:00 committed by Xavier Arteaga
parent ada6c71b5a
commit 217f3cb416
1 changed files with 18 additions and 2 deletions

View File

@ -235,11 +235,27 @@ int srsran_enb_ul_get_pucch(srsran_enb_ul_t* q,
// If we are looking for SR and ACK at the same time and ret=0, means there is no SR.
// try again to decode ACK only
if (cfg->uci_cfg.is_scheduling_request_tti && srsran_uci_cfg_total_ack(&cfg->uci_cfg) && !res->detected) {
if (cfg->uci_cfg.is_scheduling_request_tti && srsran_uci_cfg_total_ack(&cfg->uci_cfg)) {
// Disable SR
cfg->uci_cfg.is_scheduling_request_tti = false;
if (get_pucch(q, ul_sf, cfg, res)) {
// Init PUCCH result without SR
srsran_pucch_res_t res_no_sr = {};
// Actual decode without SR
if (get_pucch(q, ul_sf, cfg, &res_no_sr)) {
return SRSRAN_ERROR;
}
// Override PUCCH result if PUCCH without SR was detected, and
// - no PUCCH with SR was detected; or
// - PUCCH without SR has better correlation
if (res_no_sr.detected && (!res->detected || res_no_sr.correlation > res->correlation)) {
*res = res_no_sr;
} else {
// If the PUCCH decode result is not overridden, flag SR
cfg->uci_cfg.is_scheduling_request_tti = true;
}
}
return SRSRAN_SUCCESS;