Commit 049db2eb authored by Robert Schmidt's avatar Robert Schmidt

nr_schedule_pucch() for multiple UEs

parent 95a39f98
...@@ -303,7 +303,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -303,7 +303,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
const int bwp_id = 1; const int bwp_id = 1;
gNB_MAC_INST *gNB = RC.nrmac[module_idP]; gNB_MAC_INST *gNB = RC.nrmac[module_idP];
NR_UE_info_t *UE_info = &gNB->UE_info;
NR_COMMON_channels_t *cc = gNB->common_channels; NR_COMMON_channels_t *cc = gNB->common_channels;
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
NR_TDD_UL_DL_Pattern_t *tdd_pattern = &scc->tdd_UL_DL_ConfigurationCommon->pattern1; NR_TDD_UL_DL_Pattern_t *tdd_pattern = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
...@@ -425,8 +424,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -425,8 +424,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_ue_spec(module_idP, frame, slot); nr_schedule_ue_spec(module_idP, frame, slot);
if (UE_info->active[UE_id]) nr_schedule_pucch(module_idP, frame, slot);
nr_schedule_pucch(module_idP, UE_id, nr_ulmix_slots, frame, slot);
stop_meas(&RC.nrmac[module_idP]->eNB_scheduler); stop_meas(&RC.nrmac[module_idP]->eNB_scheduler);
......
...@@ -80,20 +80,19 @@ void nr_fill_nfapi_pucch(module_id_t mod_id, ...@@ -80,20 +80,19 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
} }
void nr_schedule_pucch(int Mod_idP, void nr_schedule_pucch(int Mod_idP,
int UE_id,
int nr_ulmix_slots,
frame_t frameP, frame_t frameP,
sub_frame_t slotP) { sub_frame_t slotP) {
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info; NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
AssertFatal(UE_info->active[UE_id],"Cannot find UE_id %d is not active\n",UE_id); const NR_UE_list_t *UE_list = &UE_info->list;
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch); const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch);
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[i]; NR_sched_pucch_t *curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[i];
const uint16_t O_ack = curr_pucch->dai_c; const uint16_t O_ack = curr_pucch->dai_c;
const uint16_t O_csi = curr_pucch->csi_bits; const uint16_t O_csi = curr_pucch->csi_bits;
const uint8_t O_sr = 0; // no SR in PUCCH implemented for now const uint8_t O_sr = curr_pucch->sr_flag;
if (O_ack + O_csi + O_sr == 0 if (O_ack + O_csi + O_sr == 0
|| frameP != curr_pucch->frame || frameP != curr_pucch->frame
|| slotP != curr_pucch->ul_slot) || slotP != curr_pucch->ul_slot)
...@@ -102,6 +101,7 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -102,6 +101,7 @@ void nr_schedule_pucch(int Mod_idP,
nr_fill_nfapi_pucch(Mod_idP, frameP, slotP, curr_pucch, UE_id); nr_fill_nfapi_pucch(Mod_idP, frameP, slotP, curr_pucch, UE_id);
memset(curr_pucch, 0, sizeof(*curr_pucch)); memset(curr_pucch, 0, sizeof(*curr_pucch));
} }
}
} }
......
...@@ -196,8 +196,6 @@ void config_uldci(NR_BWP_Uplink_t *ubwp, ...@@ -196,8 +196,6 @@ void config_uldci(NR_BWP_Uplink_t *ubwp,
int n_ubwp, int bwp_id); int n_ubwp, int bwp_id);
void nr_schedule_pucch(int Mod_idP, void nr_schedule_pucch(int Mod_idP,
int UE_id,
int nr_ulmix_slots,
frame_t frameP, frame_t frameP,
sub_frame_t slotP); sub_frame_t slotP);
......
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