DCI NCCE find considers L and NCCE

master
Xavier Arteaga 4 years ago committed by Andre Puschmann
parent a36e0477b8
commit 090022568e

@ -93,7 +93,7 @@ SRSRAN_API void srsran_enb_dl_free(srsran_enb_dl_t* q);
SRSRAN_API int srsran_enb_dl_set_cell(srsran_enb_dl_t* q, srsran_cell_t cell); SRSRAN_API int srsran_enb_dl_set_cell(srsran_enb_dl_t* q, srsran_cell_t cell);
SRSRAN_API bool srsran_enb_dl_location_is_common_ncce(srsran_enb_dl_t* q, uint32_t ncce); SRSRAN_API bool srsran_enb_dl_location_is_common_ncce(srsran_enb_dl_t* q, const srsran_dci_location_t* loc);
SRSRAN_API void srsran_enb_dl_put_base(srsran_enb_dl_t* q, srsran_dl_sf_cfg_t* dl_sf); SRSRAN_API void srsran_enb_dl_put_base(srsran_enb_dl_t* q, srsran_dl_sf_cfg_t* dl_sf);

@ -229,8 +229,9 @@ SRSRAN_API char* srsran_dci_format_string_short(srsran_dci_format_t format);
SRSRAN_API bool SRSRAN_API bool
srsran_location_find(const srsran_dci_location_t* locations, uint32_t nof_locations, srsran_dci_location_t x); srsran_location_find(const srsran_dci_location_t* locations, uint32_t nof_locations, srsran_dci_location_t x);
SRSRAN_API bool SRSRAN_API bool srsran_location_find_location(const srsran_dci_location_t* locations,
srsran_location_find_ncce(const srsran_dci_location_t* locations, uint32_t nof_locations, uint32_t ncce); uint32_t nof_locations,
const srsran_dci_location_t* location);
SRSRAN_API int srsran_dci_location_set(srsran_dci_location_t* c, uint32_t L, uint32_t nCCE); SRSRAN_API int srsran_dci_location_set(srsran_dci_location_t* c, uint32_t L, uint32_t nCCE);

@ -356,11 +356,11 @@ void srsran_enb_dl_put_phich(srsran_enb_dl_t* q, srsran_phich_grant_t* grant, bo
srsran_phich_encode(&q->phich, &q->dl_sf, resource, ack, q->sf_symbols); srsran_phich_encode(&q->phich, &q->dl_sf, resource, ack, q->sf_symbols);
} }
bool srsran_enb_dl_location_is_common_ncce(srsran_enb_dl_t* q, uint32_t ncce) bool srsran_enb_dl_location_is_common_ncce(srsran_enb_dl_t* q, const srsran_dci_location_t* loc)
{ {
if (SRSRAN_CFI_ISVALID(q->dl_sf.cfi)) { if (SRSRAN_CFI_ISVALID(q->dl_sf.cfi)) {
return srsran_location_find_ncce( return srsran_location_find_location(
q->common_locations[SRSRAN_CFI_IDX(q->dl_sf.cfi)], q->nof_common_locations[SRSRAN_CFI_IDX(q->dl_sf.cfi)], ncce); q->common_locations[SRSRAN_CFI_IDX(q->dl_sf.cfi)], q->nof_common_locations[SRSRAN_CFI_IDX(q->dl_sf.cfi)], loc);
} else { } else {
return false; return false;
} }

@ -1380,10 +1380,12 @@ bool srsran_location_find(const srsran_dci_location_t* locations, uint32_t nof_l
return false; return false;
} }
bool srsran_location_find_ncce(const srsran_dci_location_t* locations, uint32_t nof_locations, uint32_t ncce) bool srsran_location_find_location(const srsran_dci_location_t* locations,
uint32_t nof_locations,
const srsran_dci_location_t* location)
{ {
for (uint32_t i = 0; i < nof_locations; i++) { for (uint32_t i = 0; i < nof_locations; i++) {
if (locations[i].ncce == ncce) { if (locations[i].ncce == location->ncce && locations[i].L == location->L) {
return true; return true;
} }
} }

@ -452,8 +452,8 @@ static int dci_blind_search(srsran_ue_dl_t* q,
* that only the PDCCH in the common search space is transmitted by the primary cell. * that only the PDCCH in the common search space is transmitted by the primary cell.
*/ */
// Find a matching ncce in the common SS // Find a matching ncce in the common SS
if (srsran_location_find_ncce( if (srsran_location_find_location(
q->current_ss_common.loc, q->current_ss_common.nof_locations, dci_msg[nof_dci].location.ncce)) { q->current_ss_common.loc, q->current_ss_common.nof_locations, &dci_msg[nof_dci].location)) {
srsran_dci_cfg_t cfg = *dci_cfg; srsran_dci_cfg_t cfg = *dci_cfg;
srsran_dci_cfg_set_common_ss(&cfg); srsran_dci_cfg_set_common_ss(&cfg);
// if the payload size is the same that it would have in the common SS (only Format0/1A is allowed there) // if the payload size is the same that it would have in the common SS (only Format0/1A is allowed there)

@ -463,7 +463,7 @@ int cc_worker::encode_pdcch_ul(stack_interface_phy_lte::ul_sched_grant_t* grants
} }
if (SRSRAN_RNTI_ISUSER(grants[i].dci.rnti)) { if (SRSRAN_RNTI_ISUSER(grants[i].dci.rnti)) {
if (srsran_enb_dl_location_is_common_ncce(&enb_dl, grants[i].dci.location.ncce) && if (srsran_enb_dl_location_is_common_ncce(&enb_dl, &grants[i].dci.location) &&
phy->ue_db.is_pcell(grants[i].dci.rnti, cc_idx)) { phy->ue_db.is_pcell(grants[i].dci.rnti, cc_idx)) {
// Disable extended CSI request and SRS request in common SS // Disable extended CSI request and SRS request in common SS
srsran_dci_cfg_set_common_ss(&dci_cfg); srsran_dci_cfg_set_common_ss(&dci_cfg);
@ -498,8 +498,10 @@ int cc_worker::encode_pdcch_dl(stack_interface_phy_lte::dl_sched_grant_t* grants
continue; continue;
} }
// Detect if the DCI location is in common SS, if that is the case, flag it as common SS
// This makes possible UE specific DCI fields to be disabled, so it uses a fallback DCI size
if (SRSRAN_RNTI_ISUSER(grants[i].dci.rnti) && grants[i].dci.format == SRSRAN_DCI_FORMAT1A) { if (SRSRAN_RNTI_ISUSER(grants[i].dci.rnti) && grants[i].dci.format == SRSRAN_DCI_FORMAT1A) {
if (srsran_enb_dl_location_is_common_ncce(&enb_dl, grants[i].dci.location.ncce) && if (srsran_enb_dl_location_is_common_ncce(&enb_dl, &grants[i].dci.location) &&
phy->ue_db.is_pcell(grants[i].dci.rnti, cc_idx)) { phy->ue_db.is_pcell(grants[i].dci.rnti, cc_idx)) {
srsran_dci_cfg_set_common_ss(&dci_cfg); srsran_dci_cfg_set_common_ss(&dci_cfg);
} }

Loading…
Cancel
Save