Commit 72f98c54 authored by Florian Kaltenberger's avatar Florian Kaltenberger

adding msg2 scheduling every frame in slot 6

parent 94fa9c5f
...@@ -401,8 +401,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -401,8 +401,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// hardcoding dlsch to be in slot 1 // hardcoding dlsch to be in slot 1
if (!(slot_txP%num_slots_per_tdd)) { if (!(slot_txP%num_slots_per_tdd)) {
if(slot_txP==0) if(slot_txP==0)
*dlsch_in_slot_bitmap = 0x7e; *dlsch_in_slot_bitmap = 0x3e;
else else //this is never reached!?!
*dlsch_in_slot_bitmap = 0x00; *dlsch_in_slot_bitmap = 0x00;
} }
...@@ -466,6 +466,29 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -466,6 +466,29 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
else else
UE_list->fiveG_connected[UE_id] = true; UE_list->fiveG_connected[UE_id] = true;
if (get_softmodem_params()->phy_test == 1) {
if (slot_txP == 6){
NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[0].ra[0];
ra->Msg2_frame = frame_txP;
ra->Msg2_slot = slot_txP;
ra->state = Msg2;
ra->bwp_id = 1;
NR_CellGroupConfig_t *secondaryCellGroup = UE_list->secondaryCellGroup[UE_id];
NR_BWP_Downlink_t *bwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1];
struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList;
for (int i=0;i<commonSearchSpaceList->list.count;i++) {
NR_SearchSpace_t *ss=commonSearchSpaceList->list.array[i];
if(ss->searchSpaceId == *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace)
ra->ra_ss=ss;
}
AssertFatal(ra->ra_ss!=NULL,"no search space for RA'n");
nr_generate_Msg2(module_idP, 0/*CC_id*/,
frame_txP,
slot_txP);
}
}
// Phytest scheduling // Phytest scheduling
if (UE_list->fiveG_connected[UE_id] && (is_xlsch_in_slot(*dlsch_in_slot_bitmap,slot_txP%num_slots_per_tdd))) { if (UE_list->fiveG_connected[UE_id] && (is_xlsch_in_slot(*dlsch_in_slot_bitmap,slot_txP%num_slots_per_tdd))) {
ue_sched_ctl->current_harq_pid = slot_txP % num_slots_per_tdd; ue_sched_ctl->current_harq_pid = slot_txP % num_slots_per_tdd;
......
...@@ -435,7 +435,10 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t ...@@ -435,7 +435,10 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
NR_UE_list_t *UE_list = &mac->UE_list; NR_UE_list_t *UE_list = &mac->UE_list;
int UE_id = 0; int UE_id = 0;
AssertFatal(ra->state != RA_IDLE, "RA is not active for RA %X\n", ra->rnti); if (ra->state != RA_IDLE) {
LOG_W(MAC,"RA is not active for RA %X. skipping msg3 scheduling\n", ra->rnti);
return;
}
LOG_D(MAC, "[gNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n", module_idP, frameP, slotP, CC_id, ra->Msg3_frame, ra->Msg3_slot); LOG_D(MAC, "[gNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n", module_idP, frameP, slotP, CC_id, ra->Msg3_frame, ra->Msg3_slot);
......
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