Commit 3a11d687 authored by Robert Schmidt's avatar Robert Schmidt

nr_schedule_pucch() for multiple UEs

parent 3730d7e3
...@@ -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;
...@@ -430,8 +429,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -430,8 +429,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,27 +80,27 @@ void nr_fill_nfapi_pucch(module_id_t mod_id, ...@@ -80,27 +80,27 @@ 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;
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch); NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
for (int i = 0; i < n; i++) { const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch);
NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[i]; for (int i = 0; i < n; i++) {
const uint16_t O_ack = curr_pucch->dai_c; NR_sched_pucch_t *curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[i];
const uint16_t O_csi = curr_pucch->csi_bits; const uint16_t O_ack = curr_pucch->dai_c;
const uint8_t O_sr = 0; // no SR in PUCCH implemented for now const uint16_t O_csi = curr_pucch->csi_bits;
if (O_ack + O_csi + O_sr == 0 const uint8_t O_sr = curr_pucch->sr_flag;
|| frameP != curr_pucch->frame if (O_ack + O_csi + O_sr == 0
|| slotP != curr_pucch->ul_slot) || frameP != curr_pucch->frame
continue; || slotP != curr_pucch->ul_slot)
continue;
nr_fill_nfapi_pucch(Mod_idP, frameP, slotP, curr_pucch, UE_id);
memset(curr_pucch, 0, sizeof(*curr_pucch)); nr_fill_nfapi_pucch(Mod_idP, frameP, slotP, curr_pucch, UE_id);
memset(curr_pucch, 0, sizeof(*curr_pucch));
}
} }
} }
......
...@@ -205,8 +205,6 @@ void config_uldci(NR_BWP_Uplink_t *ubwp, ...@@ -205,8 +205,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