Simplify allocate_rn_CCEs()
This commit is contained in:
@@ -689,8 +689,7 @@ void nr_generate_Msg2(module_id_t module_idP,
|
||||
bwp,
|
||||
coreset,
|
||||
aggregation_level,
|
||||
ss->searchSpaceType->present - 1, // 0 common, 1 ue-specific
|
||||
UE_id,
|
||||
0, /* n_RNTI 0: common search space */
|
||||
0); // m
|
||||
|
||||
if (CCEIndex < 0) {
|
||||
|
||||
@@ -494,8 +494,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
|
||||
sched_ctrl->active_bwp,
|
||||
sched_ctrl->coreset,
|
||||
sched_ctrl->aggregation_level,
|
||||
sched_ctrl->search_space->searchSpaceType->present - 1,
|
||||
UE_id,
|
||||
UE_info->rnti[UE_id],
|
||||
0); // m
|
||||
if (sched_ctrl->cce_index < 0) {
|
||||
LOG_E(MAC, "%s(): could not find CCE for UE %d\n", __func__, UE_id);
|
||||
|
||||
@@ -422,8 +422,7 @@ int configure_fapi_dl_pdu_phytest(int Mod_idP,
|
||||
bwp,
|
||||
coreset,
|
||||
aggregation_level,
|
||||
ss->searchSpaceType->present - 1, // 0 common, 1 ue-specific
|
||||
UE_id,
|
||||
UE_info->rnti[UE_id],
|
||||
0); // m
|
||||
if (CCEIndex < 0) {
|
||||
LOG_E(MAC, "%s(): CCE list not empty, couldn't schedule PDSCH\n", __func__);
|
||||
@@ -1129,8 +1128,7 @@ void schedule_fapi_ul_pdu(int Mod_idP,
|
||||
bwp,
|
||||
coreset,
|
||||
aggregation_level,
|
||||
ss->searchSpaceType->present - 1, // 0 common, 1 ue-specific
|
||||
UE_id,
|
||||
UE_info->rnti[UE_id],
|
||||
0); // m
|
||||
if (CCEIndex < 0) {
|
||||
LOG_E(MAC, "%s(): CCE list not empty, couldn't schedule PUSCH\n", __func__);
|
||||
|
||||
@@ -173,17 +173,12 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
|
||||
NR_BWP_Downlink_t *bwp,
|
||||
NR_ControlResourceSet_t *coreset,
|
||||
int aggregation,
|
||||
int search_space, // 0 common, 1 ue-specific
|
||||
int UE_id,
|
||||
uint16_t n_RNTI,
|
||||
int m) {
|
||||
// uncomment these when we allocate for common search space
|
||||
// NR_COMMON_channels_t *cc = nr_mac->common_channels;
|
||||
// NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
|
||||
NR_UE_info_t *UE_info = &nr_mac->UE_info;
|
||||
|
||||
AssertFatal(UE_info->active[UE_id],"UE_id %d is not active\n",UE_id);
|
||||
|
||||
int coreset_id = coreset->controlResourceSetId;
|
||||
int *cce_list = nr_mac->cce_list[bwp->bwp_Id][coreset_id];
|
||||
|
||||
@@ -195,17 +190,14 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
|
||||
n_rb*=6;
|
||||
|
||||
uint16_t N_reg = n_rb * coreset->duration;
|
||||
uint16_t Y=0, N_cce, M_s_max, n_CI=0;
|
||||
uint16_t n_RNTI = search_space == 1 ? UE_info->rnti[UE_id]:0;
|
||||
uint32_t A[3]={39827,39829,39839};
|
||||
uint16_t n_CI=0;
|
||||
const uint32_t A[3]={39827,39829,39839};
|
||||
/* if n_RNTI is zero, this results in zero, too! */
|
||||
uint16_t Y = (A[0]*n_RNTI)%65537; // Candidate 0, antenna port 0
|
||||
|
||||
N_cce = N_reg / NR_NB_REG_PER_CCE;
|
||||
uint16_t N_cce = N_reg / NR_NB_REG_PER_CCE;
|
||||
|
||||
M_s_max = (aggregation==4)?4:(aggregation==8)?2:1;
|
||||
|
||||
if (search_space == 1) {
|
||||
Y = (A[0]*n_RNTI)%65537; // Candidate 0, antenna port 0
|
||||
}
|
||||
uint16_t M_s_max = (aggregation==4)?4:(aggregation==8)?2:1;
|
||||
int first_cce = aggregation * (( Y + (m*N_cce)/(aggregation*M_s_max) + n_CI ) % CEILIDIV(N_cce,aggregation));
|
||||
|
||||
for (int i=0;i<aggregation;i++)
|
||||
|
||||
@@ -313,8 +313,7 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
|
||||
NR_BWP_Downlink_t *bwp,
|
||||
NR_ControlResourceSet_t *coreset,
|
||||
int aggregation,
|
||||
int search_space, // 0 common, 1 ue-specific
|
||||
int UE_id,
|
||||
uint16_t n_RNTI,
|
||||
int m);
|
||||
|
||||
int get_dlscs(nfapi_nr_config_request_t *cfg);
|
||||
|
||||
Reference in New Issue
Block a user