mirror of https://github.com/PentHertz/srsLTE.git
Fix multiple issues with DCI sizes when using CA.
This commit is contained in:
parent
a5b7dcdf16
commit
72e6fa40fc
|
@ -148,8 +148,10 @@ static uint32_t dci_format0_sizeof_(srslte_cell_t* cell, srslte_dl_sf_cfg_t* sf,
|
|||
/* SRS request – 0 or 1 bit */
|
||||
n += (cfg->srs_request_enabled) ? 1 : 0;
|
||||
|
||||
/* Resource allocation type – 1 bit (N^UL_RB ≤ N^DL_RB) */
|
||||
n += (cfg->ra_format_enabled) ? 1 : 0;
|
||||
/* Resource allocation type – 1 bit (N^UL_RB ≤ N^DL_RB)
|
||||
* This is a release10 field only, but it is backwards compatible to release 8 because a padding bit will be added.
|
||||
*/
|
||||
n++;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
@ -484,13 +486,6 @@ static int dci_format0_unpack(srslte_cell_t* cell,
|
|||
uint8_t* y = msg->payload;
|
||||
uint32_t n_ul_hop;
|
||||
|
||||
/* Make sure it's a SRSLTE_DCI_FORMAT0 message */
|
||||
uint32_t msg_len = srslte_dci_format_sizeof(cell, sf, cfg, SRSLTE_DCI_FORMAT0);
|
||||
if (msg->nof_bits != msg_len) {
|
||||
ERROR("Invalid message length for format 0 (%d != %d)\n", msg->nof_bits, msg_len);
|
||||
return SRSLTE_ERROR;
|
||||
}
|
||||
|
||||
if (cfg->cif_enabled) {
|
||||
dci->cif = srslte_bit_pack(&y, 3);
|
||||
dci->cif_present = true;
|
||||
|
@ -624,7 +619,7 @@ static int dci_format1_pack(srslte_cell_t* cell,
|
|||
msg->nof_bits = (y - msg->payload);
|
||||
|
||||
if (msg->nof_bits != dci_format1_sizeof(cell, sf, cfg)) {
|
||||
ERROR("Invalid message length for format 1A (Cross scheduling %s)\n", dci->cif_present ? "enabled" : "disabled");
|
||||
ERROR("Invalid message length for format 1 (Cross scheduling %s)\n", dci->cif_present ? "enabled" : "disabled");
|
||||
}
|
||||
|
||||
return SRSLTE_SUCCESS;
|
||||
|
@ -782,12 +777,6 @@ static int dci_format1As_unpack(srslte_cell_t* cell,
|
|||
/* pack bits */
|
||||
uint8_t* y = msg->payload;
|
||||
|
||||
/* Make sure it's a SRSLTE_DCI_FORMAT0 message */
|
||||
if (msg->nof_bits != srslte_dci_format_sizeof(cell, sf, cfg, SRSLTE_DCI_FORMAT1A)) {
|
||||
ERROR("Invalid message length for format 1A (Cross scheduling %s)\n", cfg->cif_enabled ? "enabled" : "disabled");
|
||||
return SRSLTE_ERROR;
|
||||
}
|
||||
|
||||
if (cfg->cif_enabled) {
|
||||
dci->cif = srslte_bit_pack(&y, 3);
|
||||
dci->cif_present = true;
|
||||
|
|
|
@ -539,7 +539,7 @@ static int find_dl_dci_type_siprarnti(srslte_ue_dl_t* q,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
srslte_dci_cfg_t* dci_cfg = &dl_cfg->cfg.dci;
|
||||
srslte_dci_cfg_t dci_cfg = dl_cfg->cfg.dci;
|
||||
|
||||
// Configure and run DCI blind search
|
||||
dci_blind_search_t search_space;
|
||||
|
@ -550,11 +550,16 @@ static int find_dl_dci_type_siprarnti(srslte_ue_dl_t* q,
|
|||
sf->tti,
|
||||
sf->cfi,
|
||||
rnti);
|
||||
|
||||
// Disable extended CSI request and SRS request for non C-RNTI
|
||||
dci_cfg.multiple_csi_request_enabled = false;
|
||||
dci_cfg.srs_request_enabled = false;
|
||||
|
||||
// Search for RNTI only if there is room for the common search space
|
||||
if (search_space.nof_locations > 0) {
|
||||
for (uint32_t f = 0; f < nof_common_formats; f++) {
|
||||
search_space.format = common_formats[f];
|
||||
if ((ret = dci_blind_search(q, sf, rnti, &search_space, dci_cfg, dci_msg))) {
|
||||
if ((ret = dci_blind_search(q, sf, rnti, &search_space, &dci_cfg, dci_msg))) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -575,9 +580,33 @@ static int find_dl_dci_type_crnti(srslte_ue_dl_t* q,
|
|||
|
||||
uint32_t sf_idx = sf->tti % 10;
|
||||
uint32_t cfi = sf->cfi;
|
||||
srslte_dci_cfg_t* dci_cfg = &cfg->cfg.dci;
|
||||
srslte_dci_cfg_t dci_cfg = cfg->cfg.dci;
|
||||
|
||||
// Search first Common SS
|
||||
|
||||
// Disable extended CSI request and SRS request in common SS
|
||||
dci_cfg.multiple_csi_request_enabled = false;
|
||||
dci_cfg.srs_request_enabled = false;
|
||||
|
||||
// Search Format 1A in the Common SS also
|
||||
if (q->pregen_rnti == rnti) {
|
||||
current_ss = &q->current_ss_common[MI_IDX(sf_idx)][cfi - 1];
|
||||
} else {
|
||||
// If locations are not pre-generated, generate them now
|
||||
current_ss->nof_locations = srslte_pdcch_common_locations(&q->pdcch, current_ss->loc, MAX_CANDIDATES_COM, cfi);
|
||||
}
|
||||
|
||||
// Search for RNTI only if there is room for the common search space
|
||||
if (current_ss->nof_locations > 0) {
|
||||
current_ss->format = SRSLTE_DCI_FORMAT1A;
|
||||
INFO("Searching DL C-RNTI in %d ue locations, format 1A\n", current_ss->nof_locations);
|
||||
if ((ret = dci_blind_search(q, sf, rnti, current_ss, &dci_cfg, dci_msg))) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
// Search UE-specific search space
|
||||
dci_cfg = cfg->cfg.dci;
|
||||
if (q->pregen_rnti == rnti) {
|
||||
current_ss = &q->current_ss_ue[MI_IDX(sf_idx)][cfi - 1][sf_idx];
|
||||
} else {
|
||||
|
@ -595,25 +624,11 @@ static int find_dl_dci_type_crnti(srslte_ue_dl_t* q,
|
|||
INFO("Searching DL C-RNTI %s in %d ue locations\n", srslte_dci_format_string(format), current_ss->nof_locations);
|
||||
|
||||
current_ss->format = format;
|
||||
if ((ret = dci_blind_search(q, sf, rnti, current_ss, dci_cfg, dci_msg))) {
|
||||
if ((ret = dci_blind_search(q, sf, rnti, current_ss, &dci_cfg, dci_msg))) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
// Search Format 1A in the Common SS also
|
||||
if (q->pregen_rnti == rnti) {
|
||||
current_ss = &q->current_ss_common[MI_IDX(sf_idx)][cfi - 1];
|
||||
} else {
|
||||
// If locations are not pre-generated, generate them now
|
||||
current_ss->nof_locations = srslte_pdcch_common_locations(&q->pdcch, current_ss->loc, MAX_CANDIDATES_COM, cfi);
|
||||
}
|
||||
|
||||
// Search for RNTI only if there is room for the common search space
|
||||
if (current_ss->nof_locations > 0) {
|
||||
current_ss->format = SRSLTE_DCI_FORMAT1A;
|
||||
INFO("Searching DL C-RNTI in %d ue locations, format 1A\n", current_ss->nof_locations);
|
||||
return dci_blind_search(q, sf, rnti, current_ss, dci_cfg, dci_msg);
|
||||
}
|
||||
return SRSLTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ public:
|
|||
|
||||
void set_tdd_config(srslte_tdd_config_t config);
|
||||
void set_config(srslte::phy_cfg_t& phy_cfg);
|
||||
void upd_config_dci(srslte_dci_cfg_t& dci_cfg);
|
||||
void set_crnti(uint16_t rnti);
|
||||
void enable_pregen_signals(bool enabled);
|
||||
|
||||
|
|
|
@ -916,6 +916,11 @@ void cc_worker::set_config(srslte::phy_cfg_t& phy_cfg)
|
|||
}
|
||||
}
|
||||
|
||||
void cc_worker::upd_config_dci(srslte_dci_cfg_t &dci_cfg)
|
||||
{
|
||||
ue_dl_cfg.cfg.dci = dci_cfg;
|
||||
}
|
||||
|
||||
int cc_worker::read_ce_abs(float* ce_abs, uint32_t tx_antenna, uint32_t rx_antenna)
|
||||
{
|
||||
int sz = srslte_symbol_sz(cell.nof_prb);
|
||||
|
|
|
@ -186,6 +186,11 @@ void sf_worker::set_config(uint32_t cc_idx, srslte::phy_cfg_t& phy_cfg)
|
|||
if (cc_idx < cc_workers.size()) {
|
||||
Info("Setting configuration for cc_worker=%d, cc=%d\n", get_id(), cc_idx);
|
||||
cc_workers[cc_idx]->set_config(phy_cfg);
|
||||
if (cc_idx > 0) {
|
||||
// Update DCI config for PCell
|
||||
srslte_dci_cfg_t dci_cfg = phy_cfg.dl_cfg.dci;
|
||||
cc_workers[0]->upd_config_dci(dci_cfg);
|
||||
}
|
||||
} else {
|
||||
Error("Setting config for cc=%d; Invalid cc_idx\n", cc_idx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue