removing flag init_UL_tti_req_ahead
This commit is contained in:
@@ -68,8 +68,7 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
|||||||
NR_ServingCellConfigCommon_t *scc = gNB->common_channels->ServingCellConfigCommon;
|
NR_ServingCellConfigCommon_t *scc = gNB->common_channels->ServingCellConfigCommon;
|
||||||
const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||||
|
|
||||||
if(gNB->init_UL_tti_req_ahead == false)
|
UL_tti_req_ahead_initialization(gNB, scc, num_slots, CC_idP);
|
||||||
UL_tti_req_ahead_initialization(gNB, scc, num_slots);
|
|
||||||
|
|
||||||
nfapi_nr_dl_tti_request_t *DL_req = &gNB->DL_req[0];
|
nfapi_nr_dl_tti_request_t *DL_req = &gNB->DL_req[0];
|
||||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t **pdcch = (nfapi_nr_dl_tti_pdcch_pdu_rel15_t **)gNB->pdcch_pdu_idx[CC_idP];
|
nfapi_nr_dl_tti_pdcch_pdu_rel15_t **pdcch = (nfapi_nr_dl_tti_pdcch_pdu_rel15_t **)gNB->pdcch_pdu_idx[CC_idP];
|
||||||
|
|||||||
@@ -2995,18 +2995,19 @@ void schedule_nr_bwp_switch(module_id_t module_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UL_tti_req_ahead_initialization(gNB_MAC_INST * gNB, NR_ServingCellConfigCommon_t *scc, int n) {
|
void UL_tti_req_ahead_initialization(gNB_MAC_INST * gNB, NR_ServingCellConfigCommon_t *scc, int n, int CCid) {
|
||||||
|
|
||||||
gNB->UL_tti_req_ahead[0] = calloc(n, sizeof(nfapi_nr_ul_tti_request_t));
|
if(gNB->UL_tti_req_ahead[CCid]) return;
|
||||||
AssertFatal(gNB->UL_tti_req_ahead[0],
|
|
||||||
|
gNB->UL_tti_req_ahead[CCid] = calloc(n, sizeof(nfapi_nr_ul_tti_request_t));
|
||||||
|
AssertFatal(gNB->UL_tti_req_ahead[CCid],
|
||||||
"could not allocate memory for RC.nrmac[]->UL_tti_req_ahead[]\n");
|
"could not allocate memory for RC.nrmac[]->UL_tti_req_ahead[]\n");
|
||||||
/* fill in slot/frame numbers: slot is fixed, frame will be updated by scheduler
|
/* fill in slot/frame numbers: slot is fixed, frame will be updated by scheduler
|
||||||
* consider that scheduler runs sl_ahead: the first sl_ahead slots are
|
* consider that scheduler runs sl_ahead: the first sl_ahead slots are
|
||||||
* already "in the past" and thus we put frame 1 instead of 0! */
|
* already "in the past" and thus we put frame 1 instead of 0! */
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
nfapi_nr_ul_tti_request_t *req = &gNB->UL_tti_req_ahead[0][i];
|
nfapi_nr_ul_tti_request_t *req = &gNB->UL_tti_req_ahead[CCid][i];
|
||||||
req->SFN = i < (gNB->if_inst->sl_ahead-1);
|
req->SFN = i < (gNB->if_inst->sl_ahead-1);
|
||||||
req->Slot = i;
|
req->Slot = i;
|
||||||
}
|
}
|
||||||
gNB->init_UL_tti_req_ahead = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
|
|||||||
int max_mcs,
|
int max_mcs,
|
||||||
frame_t frame);
|
frame_t frame);
|
||||||
|
|
||||||
void UL_tti_req_ahead_initialization(gNB_MAC_INST * gNB, NR_ServingCellConfigCommon_t *scc, int n);
|
void UL_tti_req_ahead_initialization(gNB_MAC_INST * gNB, NR_ServingCellConfigCommon_t *scc, int n, int CCid);
|
||||||
|
|
||||||
void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t frameP, sub_frame_t slotP);
|
void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t frameP, sub_frame_t slotP);
|
||||||
|
|
||||||
|
|||||||
@@ -850,7 +850,6 @@ typedef struct gNB_MAC_INST_s {
|
|||||||
uint8_t harq_round_max;
|
uint8_t harq_round_max;
|
||||||
uint8_t min_grant_prb;
|
uint8_t min_grant_prb;
|
||||||
uint8_t min_grant_mcs;
|
uint8_t min_grant_mcs;
|
||||||
bool init_UL_tti_req_ahead;
|
|
||||||
} gNB_MAC_INST;
|
} gNB_MAC_INST;
|
||||||
|
|
||||||
#endif /*__LAYER2_NR_MAC_GNB_H__ */
|
#endif /*__LAYER2_NR_MAC_GNB_H__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user