Commit bfb12919 authored by Robert Schmidt's avatar Robert Schmidt

Add max_bits to know when PUCCH full

parent 8844c11f
...@@ -52,6 +52,14 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -52,6 +52,14 @@ void nr_schedule_pucch(int Mod_idP,
|| slotP != curr_pucch->ul_slot) || slotP != curr_pucch->ul_slot)
continue; continue;
AssertFatal(curr_pucch->max_bits > 0,
"%d.%d inconsistent PUCCH %d for UE %04x: O_uci = %d but max_bits = 0\n",
frameP,
slotP,
i,
UE_info->rnti[UE_id],
O_ack + O_csi + O_sr);
nfapi_nr_ul_tti_request_t *future_ul_tti_req = nfapi_nr_ul_tti_request_t *future_ul_tti_req =
&RC.nrmac[Mod_idP]->UL_tti_req_ahead[0][curr_pucch->ul_slot]; &RC.nrmac[Mod_idP]->UL_tti_req_ahead[0][curr_pucch->ul_slot];
AssertFatal(future_ul_tti_req->SFN == curr_pucch->frame AssertFatal(future_ul_tti_req->SFN == curr_pucch->frame
...@@ -221,7 +229,8 @@ void nr_csi_meas_reporting(int Mod_idP, ...@@ -221,7 +229,8 @@ void nr_csi_meas_reporting(int Mod_idP,
// find free PUCCH that is in order with possibly existing PUCCH // find free PUCCH that is in order with possibly existing PUCCH
// schedulings (other CSI, SR) // schedulings (other CSI, SR)
NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[1]; NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[1];
AssertFatal(curr_pucch->csi_bits == 0 AssertFatal(curr_pucch->max_bits == 0
&& curr_pucch->csi_bits == 0
&& !curr_pucch->sr_flag && !curr_pucch->sr_flag
&& curr_pucch->dai_c == 0, && curr_pucch->dai_c == 0,
"PUCCH not free at index 1 for UE %04x\n", "PUCCH not free at index 1 for UE %04x\n",
...@@ -231,6 +240,7 @@ void nr_csi_meas_reporting(int Mod_idP, ...@@ -231,6 +240,7 @@ void nr_csi_meas_reporting(int Mod_idP,
curr_pucch->resource_indicator = res_index; curr_pucch->resource_indicator = res_index;
curr_pucch->csi_bits += curr_pucch->csi_bits +=
nr_get_csi_bitlen(&UE_info->csi_report_template[UE_id][csi_report_id]); nr_get_csi_bitlen(&UE_info->csi_report_template[UE_id][csi_report_id]);
curr_pucch->max_bits = curr_pucch->csi_bits;
// going through the list of PUCCH resources to find the one indexed by resource_id // going through the list of PUCCH resources to find the one indexed by resource_id
uint16_t *vrb_map_UL = uint16_t *vrb_map_UL =
...@@ -460,6 +470,7 @@ bool nr_acknack_scheduling(int mod_id, ...@@ -460,6 +470,7 @@ bool nr_acknack_scheduling(int mod_id,
const int pucch_res = 0; const int pucch_res = 0;
curr_pucch->resource_indicator = pucch_res; curr_pucch->resource_indicator = pucch_res;
curr_pucch->ul_slot = first_ul_slot_tdd; curr_pucch->ul_slot = first_ul_slot_tdd;
curr_pucch->max_bits = max_acknacks;
/* verify that at that slot and symbol, resources are free. /* verify that at that slot and symbol, resources are free.
* Note: this does not handle potential mux of PUCCH in the same symbol! */ * Note: this does not handle potential mux of PUCCH in the same symbol! */
......
...@@ -278,6 +278,7 @@ typedef struct NR_sched_pucch { ...@@ -278,6 +278,7 @@ typedef struct NR_sched_pucch {
int csi_bits; int csi_bits;
bool simultaneous_harqcsi; bool simultaneous_harqcsi;
uint8_t dai_c; uint8_t dai_c;
uint8_t max_bits;
uint8_t timing_indicator; uint8_t timing_indicator;
uint8_t resource_indicator; uint8_t resource_indicator;
} NR_sched_pucch_t; } NR_sched_pucch_t;
......
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