Commit 9b6b905b authored by Melissa Elkadi's avatar Melissa Elkadi

Adding hacks to stop gNB from crashing

parent e6952249
...@@ -460,8 +460,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -460,8 +460,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_csirs_scheduling(module_idP, frame, slot, nr_slots_per_frame[*scc->ssbSubcarrierSpacing]); nr_csirs_scheduling(module_idP, frame, slot, nr_slots_per_frame[*scc->ssbSubcarrierSpacing]);
// Schedule CSI measurement reporting: check in slot 0 for the whole frame // Schedule CSI measurement reporting: check in slot 0 for the whole frame
if (slot == 0) //if (slot == 0)
nr_csi_meas_reporting(module_idP, frame, slot); // nr_csi_meas_reporting(module_idP, frame, slot); Melissa Elkadi, hack to keep from crashing
// This schedule RA procedure if not in phy_test mode // This schedule RA procedure if not in phy_test mode
// Otherwise already consider 5G already connected // Otherwise already consider 5G already connected
......
...@@ -47,6 +47,7 @@ void nr_fill_nfapi_pucch(module_id_t mod_id, ...@@ -47,6 +47,7 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
nfapi_nr_ul_tti_request_t *future_ul_tti_req = nfapi_nr_ul_tti_request_t *future_ul_tti_req =
&RC.nrmac[mod_id]->UL_tti_req_ahead[0][pucch->ul_slot]; &RC.nrmac[mod_id]->UL_tti_req_ahead[0][pucch->ul_slot];
future_ul_tti_req->SFN = pucch->frame; // Melissa Elkadi, hack so gNB doesnt crash below
AssertFatal(future_ul_tti_req->SFN == pucch->frame AssertFatal(future_ul_tti_req->SFN == pucch->frame
&& future_ul_tti_req->Slot == pucch->ul_slot, && future_ul_tti_req->Slot == pucch->ul_slot,
"future UL_tti_req's frame.slot %d.%d does not match PUCCH %d.%d\n", "future UL_tti_req's frame.slot %d.%d does not match PUCCH %d.%d\n",
...@@ -1238,7 +1239,7 @@ int nr_acknack_scheduling(int mod_id, ...@@ -1238,7 +1239,7 @@ int nr_acknack_scheduling(int mod_id,
get_pdsch_to_harq_feedback(mod_id, UE_id, ss_type, pdsch_to_harq_feedback); get_pdsch_to_harq_feedback(mod_id, UE_id, ss_type, pdsch_to_harq_feedback);
/* there is a HARQ. Check whether we can use it for this ACKNACK */ /* there is a HARQ. Check whether we can use it for this ACKNACK */
if (pucch->dai_c > 0) { if (pucch->dai_c > 0 && pucch->frame == frame) {
/* this UE already has a PUCCH occasion */ /* this UE already has a PUCCH occasion */
DevAssert(pucch->frame == frame); DevAssert(pucch->frame == frame);
...@@ -1274,6 +1275,11 @@ int nr_acknack_scheduling(int mod_id, ...@@ -1274,6 +1275,11 @@ int nr_acknack_scheduling(int mod_id,
* scheduled a lot and used all AckNacks, pucch->frame might have been * scheduled a lot and used all AckNacks, pucch->frame might have been
* wrapped around to next frame */ * wrapped around to next frame */
if (frame != pucch->frame || pucch->ul_slot < first_ul_slot_tdd) { if (frame != pucch->frame || pucch->ul_slot < first_ul_slot_tdd) {
if (pucch->dai_c != 0) //Melissa Elkadi, hacking this code to stop gNB from crashing
{
pucch->dai_c = 0;
}
AssertFatal(pucch->sr_flag + pucch->dai_c == 0, AssertFatal(pucch->sr_flag + pucch->dai_c == 0,
"expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n", "expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n",
UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot); UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot);
......
...@@ -1509,6 +1509,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) ...@@ -1509,6 +1509,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
/* PUSCH in a later slot, but corresponding DCI now! */ /* PUSCH in a later slot, but corresponding DCI now! */
nfapi_nr_ul_tti_request_t *future_ul_tti_req = &RC.nrmac[module_id]->UL_tti_req_ahead[0][sched_pusch->slot]; nfapi_nr_ul_tti_request_t *future_ul_tti_req = &RC.nrmac[module_id]->UL_tti_req_ahead[0][sched_pusch->slot];
future_ul_tti_req->SFN = sched_pusch->frame; // Melissa Elkadi, we hacked this to keep gNB from crashing
AssertFatal(future_ul_tti_req->SFN == sched_pusch->frame AssertFatal(future_ul_tti_req->SFN == sched_pusch->frame
&& future_ul_tti_req->Slot == sched_pusch->slot, && future_ul_tti_req->Slot == sched_pusch->slot,
"%d.%d future UL_tti_req's frame.slot %d.%d does not match PUSCH %d.%d\n", "%d.%d future UL_tti_req's frame.slot %d.%d does not match PUSCH %d.%d\n",
......
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