gNB scheduler was not updating Msg3 future frame

The fix added in this commit may not be correct and
should be reviewed by Eurecom. For now we set the
future frame based on the PRACH recevied frame + 1.
Also fixed the copying of RACH ind into UL_INFO global.
RAR is being passed to NR UE.
This commit is contained in:
Melissa Elkadi
2021-06-03 12:24:13 -07:00
parent 6299d4515e
commit 5ba3d16fbc
4 changed files with 7 additions and 22 deletions
-5
View File
@@ -227,11 +227,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
if (nr_prach == 1)
{
L1_nsa_prach_procedures(ul_info.frame_tx, ul_info.slot_tx);
/* Fill rach indication here and send to proxy. Basically take pieces from
L1_nr_prach_procedures() and send it to the proxy. prach from ue->gNb->gnb sends rach->ue receives rach
The UE is basically filling the rach and proxy will receive and think that it came from the gNB. The
received rach in the proxy will trigger gNB to send back the RAR. RAR will go to proxy then goes to UE
and the UE will get the DCI for RAR and the payload. have to handle receving the RAR once we get it. */
LOG_I(NR_PHY, "Calling nr_Msg1_transmitted for slot %d\n", ul_info.slot_tx);
nr_Msg1_transmitted(mod_id, CC_id, ul_info.frame_tx, gNB_id); //This is called when phy layer has sent the prach
}
+1 -15
View File
@@ -704,21 +704,7 @@ int phy_nr_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_nr_rach_ind
{
if(NFAPI_MODE == NFAPI_MODE_VNF)
{
for (int i = 0; i < ind->number_of_pdus; i++) {
LOG_I(NR_MAC, "%s() NFAPI SFN:%d/SLOT:%d number_of_preambles:%u\n", __FUNCTION__, ind->sfn, ind->slot, ind->pdu_list[i].num_preamble);
UL_INFO.rach_ind = *ind;
const int num_p = ind->pdu_list[i].num_preamble;
if (num_p > 0)
{
UL_INFO.rach_ind.pdu_list[i].preamble_list = calloc(num_p, sizeof(nfapi_nr_prach_indication_preamble_t));
for (int j = 0; j < num_p; j++)
{
UL_INFO.rach_ind.pdu_list[i].preamble_list[j] = ind->pdu_list[i].preamble_list[j];
}
}
}
UL_INFO.rach_ind = *ind;
}
else {
LOG_E(NR_MAC, "NFAPI_MODE = %d not NFAPI_MODE_VNF(2)\n", nfapi_getmode());
@@ -286,7 +286,11 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
}else if (N_RA_slot <= 1) { //1 PRACH slot in a subframe
slot_index = 0;
}
const uint8_t slots_per_frame[5] = {10, 20, 40, 80, 160};
const int n = slots_per_frame[*scc->ssbSubcarrierSpacing];
for (int i = 0; i < n; ++i) {
RC.nrmac[module_idP]->UL_tti_req_ahead[0][i].SFN = (frameP != 1023) ? frameP + 1 : 0;
}
UL_tti_req->SFN = frameP;
UL_tti_req->Slot = slotP;
for (int fdm_index=0; fdm_index < fdm; fdm_index++) { // one structure per frequency domain occasion
+1 -1
View File
@@ -57,7 +57,7 @@ extern NR_UL_IND_t UL_INFO;
void handle_nr_rach(NR_UL_IND_t *UL_info) {
if (UL_INFO.rach_ind.number_of_pdus>0) {
LOG_I(MAC,"Melissa UL_INFO[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n",
LOG_I(MAC,"UL_INFO[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n",
UL_INFO.frame,UL_INFO.slot, UL_INFO.rach_ind.sfn,UL_INFO.rach_ind.slot);
int npdus = UL_INFO.rach_ind.number_of_pdus;
for(int i = 0; i < npdus; i++) {