fix msg3 retx issue. Now nof_prb for pucch above 1 are forbidden for prb==6

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent c661025cda
commit 179e959d05

@ -991,11 +991,12 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_
}
}
// Check PRACH configuration
// Check PUCCH and PRACH configuration
uint32_t nrb_pucch = std::max(rrc_cfg_->sr_cfg.nof_prb, rrc_cfg_->cqi_cfg.nof_prb);
uint32_t prach_freq_offset = rrc_cfg_->sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset;
if (args_->enb.n_prb > 10) {
uint32_t lower_bound = SRSLTE_MAX(rrc_cfg_->sr_cfg.nof_prb, rrc_cfg_->cqi_cfg.nof_prb);
uint32_t upper_bound = args_->enb.n_prb - lower_bound;
if (args_->enb.n_prb > 6) {
uint32_t lower_bound = nrb_pucch;
uint32_t upper_bound = args_->enb.n_prb - nrb_pucch;
if (prach_freq_offset + 6 > upper_bound or prach_freq_offset < lower_bound) {
fprintf(stderr,
"ERROR: Invalid PRACH configuration - prach_freq_offset=%d collides with PUCCH.\n",
@ -1009,7 +1010,7 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_
} else { // 6 PRB case
if (prach_freq_offset + 6 > args_->enb.n_prb) {
fprintf(stderr,
"WARNING: Invalid PRACH configuration - prach=(%d, %d) does not fit into the eNB PRBs=(0, %d).\n",
"ERROR: Invalid PRACH configuration - prach=(%d, %d) does not fit into the eNB PRBs=(0, %d).\n",
prach_freq_offset,
prach_freq_offset + 6,
args_->enb.n_prb);
@ -1019,6 +1020,18 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_
// patch PRACH config for PHY and in RRC for SIB2
rrc_cfg_->sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset = 0;
phy_cfg_->prach_cnfg.prach_cfg_info.prach_freq_offset = 0;
return SRSLTE_ERROR;
}
if (nrb_pucch > 1) {
fprintf(stderr,
"ERROR: Invalid PUCCH configuration - \"cqi_report_cnfg=%d\" and \"sched_request_cnfg.nof_prb=%d\""
" in rr.conf for 6 PRBs.\n Consider decreasing these values to 1 to leave enough space for the "
"transmission of Msg3.\n",
rrc_cfg_->cqi_cfg.nof_prb,
rrc_cfg_->sr_cfg.nof_prb);
rrc_cfg_->cqi_cfg.nof_prb = 1;
rrc_cfg_->sr_cfg.nof_prb = 1;
return SRSLTE_ERROR;
}
}

@ -354,6 +354,9 @@ int cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, u
// Notify MAC new received data and HARQ Indication value
if (pusch_res.data) {
static bool test_flag = false;
pusch_res.crc = pusch_res.crc && test_flag;
test_flag = true;
phy->stack->crc_info(tti_rx, rnti, cc_idx, grant.tb.tbs / 8, pusch_res.crc);
// Save metrics stats

@ -64,10 +64,21 @@ bool sched_cell_params_t::set_cfg(uint32_t enb_cc_id
return false;
}
// PRACH has to fit within the PUSCH space
bool invalid_prach = cfg.cell.nof_prb == 6 and (cfg.prach_freq_offset + 6 > cfg.cell.nof_prb);
invalid_prach |= cfg.cell.nof_prb > 6 and ((cfg.prach_freq_offset + 6) > (cfg.cell.nof_prb - cfg.nrb_pucch) or
(int) cfg.prach_freq_offset < cfg.nrb_pucch);
bool invalid_prach;
if (cfg.cell.nof_prb == 6) {
// PUCCH has to allow space for Msg3
if (cfg.nrb_pucch > 1) {
Console("Invalid PUCCH configuration: nrb_pucch=%d does not allow space for Msg3 transmission..\n",
cfg.nrb_pucch);
return false;
}
// PRACH has to fit within the PUSCH+PUCCH space
invalid_prach = cfg.prach_freq_offset + 6 > cfg.cell.nof_prb;
} else {
// PRACH has to fit within the PUSCH space
invalid_prach = (cfg.prach_freq_offset + 6) > (cfg.cell.nof_prb - cfg.nrb_pucch) or
((int)cfg.prach_freq_offset < cfg.nrb_pucch);
}
if (invalid_prach) {
Error("Invalid PRACH configuration: frequency offset=%d outside bandwidth limits\n", cfg.prach_freq_offset);
Console("Invalid PRACH configuration: frequency offset=%d outside bandwidth limits\n", cfg.prach_freq_offset);

@ -53,7 +53,7 @@ int test_pdcch_one_ue()
sched_interface::ue_cfg_t ue_cfg = generate_default_ue_cfg();
sched_interface::cell_cfg_t cell_cfg = generate_default_cell_cfg(nof_prb);
sched_interface::sched_args_t sched_args{};
cell_params[ENB_CC_IDX].set_cfg(ENB_CC_IDX, cell_cfg, sched_args);
TESTASSERT(cell_params[ENB_CC_IDX].set_cfg(ENB_CC_IDX, cell_cfg, sched_args));
pdcch_grid_t pdcch;
sched_ue sched_ue{};

@ -106,7 +106,7 @@ inline srsenb::sched_interface::cell_cfg_t generate_default_cell_cfg(uint32_t no
cell_cfg.sibs[1].len = 41;
cell_cfg.sibs[1].period_rf = 16;
cell_cfg.si_window_ms = 40;
cell_cfg.nrb_pucch = 2;
cell_cfg.nrb_pucch = (cell_cfg_phy.nof_prb == 6) ? 1 : 2;
cell_cfg.prach_freq_offset = (cell_cfg_phy.nof_prb == 6) ? 0 : 2;
cell_cfg.prach_rar_window = 3;
cell_cfg.maxharq_msg3tx = 3;

Loading…
Cancel
Save