Commit fcf3ca76 authored by kn.raju's avatar kn.raju

review comments on vrb_map and parallel CFRA are incorporated

parent 762a2244
......@@ -376,7 +376,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
uint8_t ra_index = 0;
/* checking for free RA process */
for(; ra_index < NR_NB_RA_PROC_MAX; ra_index++) {
if(cc->ra[ra_index].state == RA_IDLE) break;
if((cc->ra[ra_index].state == RA_IDLE) && (!cc->ra[ra_index].cfra)) break;
}
if (ra_index == NR_NB_RA_PROC_MAX) {
LOG_E(MAC, "%s() %s:%d RA processes are not available for CFRA RNTI :%x\n", __FUNCTION__, __FILE__, __LINE__, rnti);
......
......@@ -500,8 +500,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
if (!(preamble_index == ra->preambles.preamble_list[beam_index])) {
LOG_E(MAC, "[gNB %d][RAPROC] FAILURE: preamble %d does not correspond to any of the ones in rach_ConfigDedicated\n",
module_idP, preamble_index);
//Add continue statement for multiple and parallel CFRA process
return; // if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
continue; // if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
}
}
int loop = 0;
......@@ -815,17 +814,15 @@ void nr_generate_Msg2(module_id_t module_idP,
locationAndBandwidth = scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth;
dci10_bw = NRRIV2BW(locationAndBandwidth,275);
}
int bwpStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth,275);
uint16_t *vrb_map = cc[CC_id].vrb_map;
int rbStart = 0,rbSize = 6;
while (((bwpStart+rbStart)< (bwpStart+dci10_bw)) && vrb_map[rbStart]) rbStart++;
for (int i=0;i < rbSize ; i++) {
for (int i=0;(i < rbSize) && (rbStart <= (dci10_bw - rbSize)); i++) {
if(vrb_map[rbStart + i]) {
rbStart += i;
i = 0;
}
}
if(((rbStart + bwpStart) >= (bwpStart+dci10_bw)) || ((rbStart + bwpStart + rbSize - 1) > (bwpStart+dci10_bw))) {
}
}
if(rbStart > (dci10_bw - rbSize)) {
LOG_E(MAC, "%s(): cannot find free vrb_map for RA RNTI %04x!\n", __func__, ra->RA_rnti);
return;
}
......@@ -858,7 +855,7 @@ void nr_generate_Msg2(module_id_t module_idP,
pdsch_pdu_rel15->pduIndex = 0;
pdsch_pdu_rel15->BWPSize = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth,275);
pdsch_pdu_rel15->BWPStart = bwpStart;
pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth,275);
pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing;
pdsch_pdu_rel15->CyclicPrefix = 0;
pdsch_pdu_rel15->NrOfCodewords = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment