Commit 623d0e36 authored by francescomani's avatar francescomani

further fixes in ulsch (and dlsch) scheduler

parent 22617b21
...@@ -1386,7 +1386,7 @@ int64_t *get_prach_config_info(frequency_range_t freq_range, ...@@ -1386,7 +1386,7 @@ int64_t *get_prach_config_info(frequency_range_t freq_range,
void find_aggregation_candidates(uint8_t *aggregation_level, void find_aggregation_candidates(uint8_t *aggregation_level,
uint8_t *nr_of_candidates, uint8_t *nr_of_candidates,
NR_SearchSpace_t *ss, const NR_SearchSpace_t *ss,
int L) { int L) {
AssertFatal(L>=1 && L<=16,"L %d not ok\n",L); AssertFatal(L>=1 && L<=16,"L %d not ok\n",L);
*nr_of_candidates = 0; *nr_of_candidates = 0;
...@@ -3931,7 +3931,7 @@ uint8_t get_BG(uint32_t A, uint16_t R) { ...@@ -3931,7 +3931,7 @@ uint8_t get_BG(uint32_t A, uint16_t R) {
return 1; return 1;
} }
uint32_t get_Y(NR_SearchSpace_t *ss, int slot, rnti_t rnti) { uint32_t get_Y(const NR_SearchSpace_t *ss, int slot, rnti_t rnti) {
if(ss->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common) if(ss->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common)
return 0; return 0;
......
...@@ -50,7 +50,7 @@ typedef enum { ...@@ -50,7 +50,7 @@ typedef enum {
typeB = 1 typeB = 1
} mappingType_t; } mappingType_t;
uint32_t get_Y(NR_SearchSpace_t *ss, int slot, rnti_t rnti); uint32_t get_Y(const NR_SearchSpace_t *ss, int slot, rnti_t rnti);
uint8_t get_BG(uint32_t A, uint16_t R); uint8_t get_BG(uint32_t A, uint16_t R);
...@@ -90,7 +90,7 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDLBWP, ...@@ -90,7 +90,7 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDLBWP,
void find_aggregation_candidates(uint8_t *aggregation_level, void find_aggregation_candidates(uint8_t *aggregation_level,
uint8_t *nr_of_candidates, uint8_t *nr_of_candidates,
NR_SearchSpace_t *ss, const NR_SearchSpace_t *ss,
int maxL); int maxL);
void find_monitoring_periodicity_offset_common(NR_SearchSpace_t *ss, void find_monitoring_periodicity_offset_common(NR_SearchSpace_t *ss,
......
...@@ -792,20 +792,13 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t ...@@ -792,20 +792,13 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
} }
uint8_t aggregation_level; uint8_t aggregation_level;
uint8_t nr_of_candidates; int CCEIndex = get_cce_index(nr_mac,
for (int i=0; i<5; i++) { CC_id, slot, 0,
// for now taking the lowest value among the available aggregation levels &aggregation_level,
find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss, 1<<i); ss,
if(nr_of_candidates>0) break; coreset,
} &ra->sched_pdcch,
AssertFatal(nr_of_candidates>0,"nr_of_candidates is 0\n"); true);
int CCEIndex = find_pdcch_candidate(nr_mac,
CC_id,
aggregation_level,
nr_of_candidates,
&ra->sched_pdcch,
coreset,
0);
if (CCEIndex < 0) { if (CCEIndex < 0) {
LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, ra->rnti); LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, ra->rnti);
return; return;
...@@ -1188,21 +1181,13 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1188,21 +1181,13 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
} }
uint8_t aggregation_level; uint8_t aggregation_level;
uint8_t nr_of_candidates; int CCEIndex = get_cce_index(nr_mac,
for (int i=0; i<5; i++) { CC_id, slotP, 0,
// for now taking the lowest value among the available aggregation levels &aggregation_level,
find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss, 1<<i); ss,
if(nr_of_candidates>0) break; coreset,
} &ra->sched_pdcch,
AssertFatal(nr_of_candidates>0,"nr_of_candidates is 0\n"); true);
int CCEIndex = find_pdcch_candidate(nr_mac,
CC_id,
aggregation_level,
nr_of_candidates,
&ra->sched_pdcch,
coreset,
0);
if (CCEIndex < 0) { if (CCEIndex < 0) {
LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, ra->rnti); LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, ra->rnti);
...@@ -1444,21 +1429,13 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1444,21 +1429,13 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// get CCEindex, needed also for PUCCH and then later for PDCCH // get CCEindex, needed also for PUCCH and then later for PDCCH
uint8_t aggregation_level; uint8_t aggregation_level;
uint8_t nr_of_candidates; int CCEIndex = get_cce_index(nr_mac,
for (int i=0; i<5; i++) { CC_id, slotP, 0,
// for now taking the lowest value among the available aggregation levels &aggregation_level,
find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss, 1<<i); ss,
if(nr_of_candidates>0) break; coreset,
} &ra->sched_pdcch,
AssertFatal(nr_of_candidates>0,"nr_of_candidates is 0\n"); true);
int CCEIndex = find_pdcch_candidate(nr_mac,
CC_id,
aggregation_level,
nr_of_candidates,
&ra->sched_pdcch,
coreset,
0);
if (CCEIndex < 0) { if (CCEIndex < 0) {
LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, ra->rnti); LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, ra->rnti);
...@@ -1468,7 +1445,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1468,7 +1445,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
const int delta_PRI=0; const int delta_PRI=0;
int r_pucch = nr_get_pucch_resource(coreset, ra->UL_BWP.pucch_Config, CCEIndex); int r_pucch = nr_get_pucch_resource(coreset, ra->UL_BWP.pucch_Config, CCEIndex);
LOG_D(NR_MAC,"[RAPROC] Msg4 r_pucch %d (CCEIndex %d, nb_of_candidates %d, delta_PRI %d)\n", r_pucch, CCEIndex, nr_of_candidates, delta_PRI); LOG_D(NR_MAC,"[RAPROC] Msg4 r_pucch %d (CCEIndex %d, delta_PRI %d)\n", r_pucch, CCEIndex, delta_PRI);
int alloc = nr_acknack_scheduling(nr_mac, UE, frameP, slotP, r_pucch, 1); int alloc = nr_acknack_scheduling(nr_mac, UE, frameP, slotP, r_pucch, 1);
if (alloc<0) { if (alloc<0) {
......
...@@ -385,6 +385,7 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -385,6 +385,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
NR_UE_info_t *UE, NR_UE_info_t *UE,
int current_harq_pid) { int current_harq_pid) {
int CC_id = 0;
gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
const NR_ServingCellConfigCommon_t *scc = nr_mac->common_channels->ServingCellConfigCommon; const NR_ServingCellConfigCommon_t *scc = nr_mac->common_channels->ServingCellConfigCommon;
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
...@@ -400,11 +401,11 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -400,11 +401,11 @@ bool allocate_dl_retransmission(module_id_t module_id,
int pm_index = (curInfo->nrOfLayers < retInfo->nrOfLayers) ? curInfo->pm_index : retInfo->pm_index; int pm_index = (curInfo->nrOfLayers < retInfo->nrOfLayers) ? curInfo->pm_index : retInfo->pm_index;
const int coresetid = sched_ctrl->coreset->controlResourceSetId; const int coresetid = sched_ctrl->coreset->controlResourceSetId;
const uint16_t bwpSize = coresetid == 0 ? RC.nrmac[module_id]->cset0_bwp_size : dl_bwp->BWPSize; const uint16_t bwpSize = coresetid == 0 ? nr_mac->cset0_bwp_size : dl_bwp->BWPSize;
int rbStart = 0; // start wrt BWPstart int rbStart = 0; // start wrt BWPstart
int rbSize = 0; int rbSize = 0;
const int tda = get_dl_tda(RC.nrmac[module_id], scc, slot); const int tda = get_dl_tda(nr_mac, scc, slot);
AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n"); AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n");
if (tda == retInfo->time_domain_allocation && if (tda == retInfo->time_domain_allocation &&
...@@ -476,28 +477,13 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -476,28 +477,13 @@ bool allocate_dl_retransmission(module_id_t module_id,
} }
/* Find a free CCE */ /* Find a free CCE */
int CCEIndex = get_cce_index(nr_mac,
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, UE->rnti); CC_id, slot, UE->rnti,
uint8_t nr_of_candidates; &sched_ctrl->aggregation_level,
sched_ctrl->search_space,
for (int i=0; i<5; i++) { sched_ctrl->coreset,
// for now taking the lowest value among the available aggregation levels &sched_ctrl->sched_pdcch,
find_aggregation_candidates(&sched_ctrl->aggregation_level, false);
&nr_of_candidates,
sched_ctrl->search_space,
1<<i);
if(nr_of_candidates>0) break;
}
int CCEIndex = find_pdcch_candidate(RC.nrmac[module_id],
/* CC_id = */ 0,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
if (CCEIndex<0) { if (CCEIndex<0) {
LOG_D(MAC, "%4d.%2d could not find CCE for DL DCI retransmission RNTI %04x\n", LOG_D(MAC, "%4d.%2d could not find CCE for DL DCI retransmission RNTI %04x\n",
frame, slot, UE->rnti); frame, slot, UE->rnti);
...@@ -519,7 +505,7 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -519,7 +505,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
} }
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(nr_mac,
/* CC_id = */ 0, /* CC_id = */ 0,
&sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
...@@ -560,6 +546,7 @@ void pf_dl(module_id_t module_id, ...@@ -560,6 +546,7 @@ void pf_dl(module_id_t module_id,
UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0}; UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0};
int remainUEs = max_num_ue; int remainUEs = max_num_ue;
int curUE = 0; int curUE = 0;
int CC_id = 0;
/* Loop UE_info->list to check retransmission */ /* Loop UE_info->list to check retransmission */
UE_iterator(UE_list, UE) { UE_iterator(UE_list, UE) {
...@@ -569,7 +556,8 @@ void pf_dl(module_id_t module_id, ...@@ -569,7 +556,8 @@ void pf_dl(module_id_t module_id,
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP; NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP;
if (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0) continue; if (sched_ctrl->ul_failure==1)
continue;
const NR_mac_dir_stats_t *stats = &UE->mac_stats.dl; const NR_mac_dir_stats_t *stats = &UE->mac_stats.dl;
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
...@@ -580,6 +568,9 @@ void pf_dl(module_id_t module_id, ...@@ -580,6 +568,9 @@ void pf_dl(module_id_t module_id,
const uint32_t b = UE->mac_stats.dl.current_bytes; const uint32_t b = UE->mac_stats.dl.current_bytes;
UE->dl_thr_ue = (1 - a) * UE->dl_thr_ue + a * b; UE->dl_thr_ue = (1 - a) * UE->dl_thr_ue + a * b;
if (remainUEs == 0)
continue;
/* retransmission */ /* retransmission */
if (sched_pdsch->dl_harq_pid >= 0) { if (sched_pdsch->dl_harq_pid >= 0) {
/* Allocate retransmission */ /* Allocate retransmission */
...@@ -589,15 +580,9 @@ void pf_dl(module_id_t module_id, ...@@ -589,15 +580,9 @@ void pf_dl(module_id_t module_id,
LOG_D(NR_MAC, "%4d.%2d retransmission can NOT be allocated\n", frame, slot); LOG_D(NR_MAC, "%4d.%2d retransmission can NOT be allocated\n", frame, slot);
continue; continue;
} }
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
remainUEs--; remainUEs--;
// we have filled all with mandatory retransmissions
// no need to schedule new transmissions
if (remainUEs == 0)
return;
} else { } else {
/* skip this UE if there are no free HARQ processes. This can happen e.g. /* skip this UE if there are no free HARQ processes. This can happen e.g.
* if the UE disconnected in L2sim, in which case the gNB is not notified * if the UE disconnected in L2sim, in which case the gNB is not notified
...@@ -659,7 +644,7 @@ void pf_dl(module_id_t module_id, ...@@ -659,7 +644,7 @@ void pf_dl(module_id_t module_id,
const int coresetid = sched_ctrl->coreset->controlResourceSetId; const int coresetid = sched_ctrl->coreset->controlResourceSetId;
const uint16_t bwpSize = coresetid == 0 ? const uint16_t bwpSize = coresetid == 0 ?
RC.nrmac[module_id]->cset0_bwp_size : mac->cset0_bwp_size :
dl_bwp->BWPSize; dl_bwp->BWPSize;
int rbStart = 0; // start wrt BWPstart int rbStart = 0; // start wrt BWPstart
...@@ -669,28 +654,13 @@ void pf_dl(module_id_t module_id, ...@@ -669,28 +654,13 @@ void pf_dl(module_id_t module_id,
continue; continue;
} }
/* Find a free CCE */ int CCEIndex = get_cce_index(mac,
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, iterator->UE->rnti); CC_id, slot, iterator->UE->rnti,
uint8_t nr_of_candidates; &sched_ctrl->aggregation_level,
sched_ctrl->search_space,
for (int i=0; i<5; i++) { sched_ctrl->coreset,
// for now taking the lowest value among the available aggregation levels &sched_ctrl->sched_pdcch,
find_aggregation_candidates(&sched_ctrl->aggregation_level, false);
&nr_of_candidates,
sched_ctrl->search_space,
1<<i);
if(nr_of_candidates>0) break;
}
int CCEIndex = find_pdcch_candidate(mac,
/* CC_id = */ 0,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
if (CCEIndex<0) { if (CCEIndex<0) {
LOG_D(NR_MAC, "%4d.%2d could not find CCE for DL DCI RNTI %04x\n", frame, slot, rnti); LOG_D(NR_MAC, "%4d.%2d could not find CCE for DL DCI RNTI %04x\n", frame, slot, rnti);
iterator++; iterator++;
...@@ -722,7 +692,7 @@ void pf_dl(module_id_t module_id, ...@@ -722,7 +692,7 @@ void pf_dl(module_id_t module_id,
/* MCS has been set above */ /* MCS has been set above */
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
sched_pdsch->time_domain_allocation = get_dl_tda(RC.nrmac[module_id], scc, slot); sched_pdsch->time_domain_allocation = get_dl_tda(mac, scc, slot);
AssertFatal(sched_pdsch->time_domain_allocation>=0,"Unable to find PDSCH time domain allocation in list\n"); AssertFatal(sched_pdsch->time_domain_allocation>=0,"Unable to find PDSCH time domain allocation in list\n");
sched_pdsch->tda_info = nr_get_pdsch_tda_info(dl_bwp, sched_pdsch->time_domain_allocation); sched_pdsch->tda_info = nr_get_pdsch_tda_info(dl_bwp, sched_pdsch->time_domain_allocation);
......
...@@ -250,27 +250,13 @@ void nr_preprocessor_phytest(module_id_t module_id, ...@@ -250,27 +250,13 @@ void nr_preprocessor_phytest(module_id_t module_id,
0); 0);
sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer; sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer;
uint8_t nr_of_candidates; int CCEIndex = get_cce_index(RC.nrmac[module_id],
for (int i=0; i<5; i++) { CC_id, slot, UE->rnti,
// for now taking the lowest value among the available aggregation levels &sched_ctrl->aggregation_level,
find_aggregation_candidates(&sched_ctrl->aggregation_level, sched_ctrl->search_space,
&nr_of_candidates, sched_ctrl->coreset,
sched_ctrl->search_space, &sched_ctrl->sched_pdcch,
1<<i); false);
if(nr_of_candidates>0) break;
}
AssertFatal(nr_of_candidates>0,"nr_of_candidates is 0\n");
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, UE->rnti);
int CCEIndex = find_pdcch_candidate(RC.nrmac[module_id],
CC_id,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
AssertFatal(CCEIndex >= 0, AssertFatal(CCEIndex >= 0,
"%s(): could not find CCE for UE %04x\n", "%s(): could not find CCE for UE %04x\n",
__func__, __func__,
...@@ -412,27 +398,13 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_ ...@@ -412,27 +398,13 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
sched_ctrl->sched_pusch.slot = sched_slot; sched_ctrl->sched_pusch.slot = sched_slot;
sched_ctrl->sched_pusch.frame = sched_frame; sched_ctrl->sched_pusch.frame = sched_frame;
uint8_t nr_of_candidates; int CCEIndex = get_cce_index(nr_mac,
for (int i=0; i<5; i++) { CC_id, slot, UE->rnti,
// for now taking the lowest value among the available aggregation levels &sched_ctrl->aggregation_level,
find_aggregation_candidates(&sched_ctrl->aggregation_level, sched_ctrl->search_space,
&nr_of_candidates, sched_ctrl->coreset,
sched_ctrl->search_space, &sched_ctrl->sched_pdcch,
1<<i); false);
if(nr_of_candidates>0) break;
}
AssertFatal(nr_of_candidates>0,"nr_of_candidates is 0\n");
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, UE->rnti);
int CCEIndex = find_pdcch_candidate(nr_mac,
CC_id,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
if (CCEIndex < 0) { if (CCEIndex < 0) {
LOG_E(MAC, "%s(): CCE list not empty, couldn't schedule PUSCH\n", __func__); LOG_E(MAC, "%s(): CCE list not empty, couldn't schedule PUSCH\n", __func__);
return false; return false;
......
...@@ -114,10 +114,6 @@ uint8_t nr_ss_first_symb_idx_scs_240_120_set1_mux2[6] = {0,1,2,3,0,1}; ...@@ -114,10 +114,6 @@ uint8_t nr_ss_first_symb_idx_scs_240_120_set1_mux2[6] = {0,1,2,3,0,1};
// Mux pattern type 3 // Mux pattern type 3
uint8_t nr_ss_first_symb_idx_scs_120_120_mux3[4] = {4,8,2,6}; uint8_t nr_ss_first_symb_idx_scs_120_120_mux3[4] = {4,8,2,6};
/// Search space max values indexed by scs
uint8_t nr_max_number_of_candidates_per_slot[4] = {44, 36, 22, 20};
uint8_t nr_max_number_of_cces_per_slot[4] = {56, 56, 48, 32};
// CQI TABLES (10 times the value in 214 to adequately compare with R) // CQI TABLES (10 times the value in 214 to adequately compare with R)
// Table 1 (38.214 5.2.2.1-2) // Table 1 (38.214 5.2.2.1-2)
uint16_t cqi_table1[16][2] = {{0,0},{2,780},{2,1200},{2,1930},{2,3080},{2,4490},{2,6020},{4,3780}, uint16_t cqi_table1[16][2] = {{0,0},{2,780},{2,1200},{2,1930},{2,3080},{2,4490},{2,6020},{4,3780},
...@@ -132,16 +128,6 @@ uint16_t cqi_table3[16][2] = {{0,0},{2,300},{2,500},{2,780},{2,1200},{2,1930},{2 ...@@ -132,16 +128,6 @@ uint16_t cqi_table3[16][2] = {{0,0},{2,300},{2,500},{2,780},{2,1200},{2,1930},{2
{2,6020},{4,3780},{4,4900},{4,6160},{6,4660},{6,5670},{6,6660},{6,7720}}; {2,6020},{4,3780},{4,4900},{4,6160},{6,4660},{6,5670},{6,6660},{6,7720}};
static inline uint8_t get_max_candidates(uint8_t scs) {
AssertFatal(scs<4, "Invalid PDCCH subcarrier spacing %d\n", scs);
return (nr_max_number_of_candidates_per_slot[scs]);
}
static inline uint8_t get_max_cces(uint8_t scs) {
AssertFatal(scs<4, "Invalid PDCCH subcarrier spacing %d\n", scs);
return (nr_max_number_of_cces_per_slot[scs]);
}
uint8_t get_dl_nrOfLayers(const NR_UE_sched_ctrl_t *sched_ctrl, uint8_t get_dl_nrOfLayers(const NR_UE_sched_ctrl_t *sched_ctrl,
const nr_dci_format_t dci_format) { const nr_dci_format_t dci_format) {
...@@ -431,16 +417,15 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, ...@@ -431,16 +417,15 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
return pdcch; return pdcch;
} }
int find_pdcch_candidate(const gNB_MAC_INST *mac,
int find_pdcch_candidate(gNB_MAC_INST *mac,
int cc_id, int cc_id,
int aggregation, int aggregation,
int nr_of_candidates, int nr_of_candidates,
NR_sched_pdcch_t *pdcch, const NR_sched_pdcch_t *pdcch,
NR_ControlResourceSet_t *coreset, const NR_ControlResourceSet_t *coreset,
uint32_t Y){ uint32_t Y){
uint16_t *vrb_map = mac->common_channels[cc_id].vrb_map; const uint16_t *vrb_map = mac->common_channels[cc_id].vrb_map;
const int N_ci = 0; const int N_ci = 0;
const int N_rb = pdcch->n_rb; // nb of rbs of coreset per symbol const int N_rb = pdcch->n_rb; // nb of rbs of coreset per symbol
...@@ -475,6 +460,39 @@ int find_pdcch_candidate(gNB_MAC_INST *mac, ...@@ -475,6 +460,39 @@ int find_pdcch_candidate(gNB_MAC_INST *mac,
return -1; return -1;
} }
int get_cce_index(const gNB_MAC_INST *nrmac,
const int CC_id,
const int slot,
const rnti_t rnti,
uint8_t *aggregation_level,
const NR_SearchSpace_t *ss,
const NR_ControlResourceSet_t *coreset,
NR_sched_pdcch_t *sched_pdcch,
bool is_common)
{
const uint32_t Y = is_common ? 0 : get_Y(ss, slot, rnti);
uint8_t nr_of_candidates;
for (int i=0; i<5; i++) {
// for now taking the lowest value among the available aggregation levels
find_aggregation_candidates(aggregation_level,
&nr_of_candidates,
ss,
1<<i);
if(nr_of_candidates>0)
break;
}
int CCEIndex = find_pdcch_candidate(nrmac,
CC_id,
*aggregation_level,
nr_of_candidates,
sched_pdcch,
coreset,
Y);
return CCEIndex;
}
void fill_pdcch_vrb_map(gNB_MAC_INST *mac, void fill_pdcch_vrb_map(gNB_MAC_INST *mac,
int CC_id, int CC_id,
NR_sched_pdcch_t *pdcch, NR_sched_pdcch_t *pdcch,
......
...@@ -1383,7 +1383,6 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, ...@@ -1383,7 +1383,6 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
int *n_rb_sched, int *n_rb_sched,
NR_UE_info_t* UE, NR_UE_info_t* UE,
int harq_pid, int harq_pid,
const NR_SIB1_t *sib1,
const NR_ServingCellConfigCommon_t *scc, const NR_ServingCellConfigCommon_t *scc,
const int tda) const int tda)
{ {
...@@ -1450,24 +1449,13 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, ...@@ -1450,24 +1449,13 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
} }
/* Find a free CCE */ /* Find a free CCE */
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, UE->rnti); int CCEIndex = get_cce_index(nrmac,
uint8_t nr_of_candidates; CC_id, slot, UE->rnti,
for (int i=0; i<5; i++) { &sched_ctrl->aggregation_level,
// for now taking the lowest value among the available aggregation levels sched_ctrl->search_space,
find_aggregation_candidates(&sched_ctrl->aggregation_level, sched_ctrl->coreset,
&nr_of_candidates, &sched_ctrl->sched_pdcch,
sched_ctrl->search_space, false);
1<<i);
if(nr_of_candidates>0) break;
}
int CCEIndex = find_pdcch_candidate(nrmac,
CC_id,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
if (CCEIndex<0) { if (CCEIndex<0) {
LOG_D(NR_MAC, "%4d.%2d no free CCE for retransmission UL DCI UE %04x\n", frame, slot, UE->rnti); LOG_D(NR_MAC, "%4d.%2d no free CCE for retransmission UL DCI UE %04x\n", frame, slot, UE->rnti);
return false; return false;
...@@ -1518,6 +1506,7 @@ static int comparator(const void *p, const void *q) { ...@@ -1518,6 +1506,7 @@ static int comparator(const void *p, const void *q) {
return ((UEsched_t*)p)->coef < ((UEsched_t*)q)->coef; return ((UEsched_t*)p)->coef < ((UEsched_t*)q)->coef;
} }
void pf_ul(module_id_t module_id, void pf_ul(module_id_t module_id,
frame_t frame, frame_t frame,
sub_frame_t slot, sub_frame_t slot,
...@@ -1529,12 +1518,11 @@ void pf_ul(module_id_t module_id, ...@@ -1529,12 +1518,11 @@ void pf_ul(module_id_t module_id,
const int CC_id = 0; const int CC_id = 0;
gNB_MAC_INST *nrmac = RC.nrmac[module_id]; gNB_MAC_INST *nrmac = RC.nrmac[module_id];
NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
const int min_rb = 5; const int min_rb = 5;
// UEs that could be scheduled // UEs that could be scheduled
UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0}; UEsched_t UE_sched[MAX_MOBILES_PER_GNB] = {0};
int remainUEs=max_num_ue; int remainUEs = max_num_ue;
int curUE=0; int curUE=0;
/* Loop UE_list to calculate throughput and coeff */ /* Loop UE_list to calculate throughput and coeff */
...@@ -1558,13 +1546,16 @@ void pf_ul(module_id_t module_id, ...@@ -1558,13 +1546,16 @@ void pf_ul(module_id_t module_id,
const uint32_t b = stats->current_bytes; const uint32_t b = stats->current_bytes;
UE->ul_thr_ue = (1 - a) * UE->ul_thr_ue + a * b; UE->ul_thr_ue = (1 - a) * UE->ul_thr_ue + a * b;
if(remainUEs == 0)
continue;
/* Check if retransmission is necessary */ /* Check if retransmission is necessary */
sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head; sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head;
LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n",UE->rnti,sched_pusch->ul_harq_pid); LOG_D(NR_MAC,"pf_ul: UE %04x harq_pid %d\n",UE->rnti,sched_pusch->ul_harq_pid);
if (sched_pusch->ul_harq_pid >= 0) { if (sched_pusch->ul_harq_pid >= 0) {
/* Allocate retransmission*/ /* Allocate retransmission*/
const int tda = get_ul_tda(nrmac, scc, sched_pusch->slot); const int tda = get_ul_tda(nrmac, scc, sched_pusch->slot);
bool r = allocate_ul_retransmission(nrmac, frame, slot, rballoc_mask, &n_rb_sched, UE, sched_pusch->ul_harq_pid, sib1, scc, tda); bool r = allocate_ul_retransmission(nrmac, frame, slot, rballoc_mask, &n_rb_sched, UE, sched_pusch->ul_harq_pid, scc, tda);
if (!r) { if (!r) {
LOG_D(NR_MAC, "%4d.%2d UL retransmission UE RNTI %04x can NOT be allocated\n", frame, slot, UE->rnti); LOG_D(NR_MAC, "%4d.%2d UL retransmission UE RNTI %04x can NOT be allocated\n", frame, slot, UE->rnti);
continue; continue;
...@@ -1573,12 +1564,6 @@ void pf_ul(module_id_t module_id, ...@@ -1573,12 +1564,6 @@ void pf_ul(module_id_t module_id,
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
remainUEs--; remainUEs--;
// we have filled all with mandatory retransmissions
// no need to schedule new transmissions
if (remainUEs < 0)
return;
continue; continue;
} }
...@@ -1604,44 +1589,25 @@ void pf_ul(module_id_t module_id, ...@@ -1604,44 +1589,25 @@ void pf_ul(module_id_t module_id,
if (bo->harq_round_max == 1) if (bo->harq_round_max == 1)
sched_pusch->mcs = max_mcs; sched_pusch->mcs = max_mcs;
else else
sched_pusch->mcs = get_mcs_from_bler(bo, stats, &UE->UE_sched_ctrl.ul_bler_stats, max_mcs, frame); sched_pusch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->ul_bler_stats, max_mcs, frame);
/* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled /* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled
* based on data to transmit) */ * based on data to transmit) */
if (B == 0 && do_sched) { if (B == 0 && do_sched) {
/* if no data, pre-allocate 5RB */ /* if no data, pre-allocate 5RB */
/* Find a free CCE */ /* Find a free CCE */
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, UE->rnti); int CCEIndex = get_cce_index(nrmac,
uint8_t nr_of_candidates; CC_id, slot, UE->rnti,
for (int i=0; i<5; i++) { &sched_ctrl->aggregation_level,
// for now taking the lowest value among the available aggregation levels sched_ctrl->search_space,
find_aggregation_candidates(&sched_ctrl->aggregation_level, sched_ctrl->coreset,
&nr_of_candidates, &sched_ctrl->sched_pdcch,
sched_ctrl->search_space, false);
1<<i);
if(nr_of_candidates>0) break;
}
int CCEIndex = find_pdcch_candidate(RC.nrmac[module_id],
CC_id,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
if (CCEIndex<0) { if (CCEIndex<0) {
LOG_D(NR_MAC, "%4d.%2d no free CCE for UL DCI UE %04x (BSR 0)\n", frame, slot, UE->rnti); LOG_D(NR_MAC, "%4d.%2d no free CCE for UL DCI UE %04x (BSR 0)\n", frame, slot, UE->rnti);
continue; continue;
} }
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
remainUEs--;
// we have filled all with mandatory retransmissions
// no need to schedule new transmissions
if (remainUEs < 0)
return;
sched_pusch->nrOfLayers = 1; sched_pusch->nrOfLayers = 1;
sched_pusch->time_domain_allocation = get_ul_tda(nrmac, scc, sched_pusch->slot); sched_pusch->time_domain_allocation = get_ul_tda(nrmac, scc, sched_pusch->slot);
sched_pusch->tda_info = nr_get_pusch_tda_info(current_BWP, sched_pusch->time_domain_allocation); sched_pusch->tda_info = nr_get_pusch_tda_info(current_BWP, sched_pusch->time_domain_allocation);
...@@ -1658,11 +1624,11 @@ void pf_ul(module_id_t module_id, ...@@ -1658,11 +1624,11 @@ void pf_ul(module_id_t module_id,
if (rbStart + min_rb >= bwpSize) { if (rbStart + min_rb >= bwpSize) {
LOG_W(NR_MAC, "cannot allocate continuous UL data for RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d\n", LOG_W(NR_MAC, "cannot allocate continuous UL data for RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d\n",
UE->rnti,rbStart,min_rb,bwpSize); UE->rnti,rbStart,min_rb,bwpSize);
return; continue;
} }
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(nrmac,
CC_id, CC_id,
&sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
...@@ -1688,6 +1654,7 @@ void pf_ul(module_id_t module_id, ...@@ -1688,6 +1654,7 @@ void pf_ul(module_id_t module_id,
for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++) for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++)
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= slbitmap; rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= slbitmap;
remainUEs--;
continue; continue;
} }
...@@ -1705,30 +1672,18 @@ void pf_ul(module_id_t module_id, ...@@ -1705,30 +1672,18 @@ void pf_ul(module_id_t module_id,
qsort(UE_sched, sizeof(*UE_sched), sizeofArray(UE_sched), comparator); qsort(UE_sched, sizeof(*UE_sched), sizeofArray(UE_sched), comparator);
UEsched_t *iterator=UE_sched; UEsched_t *iterator=UE_sched;
const int min_rbSize = 5;
/* Loop UE_sched to find max coeff and allocate transmission */ /* Loop UE_sched to find max coeff and allocate transmission */
while (remainUEs> 0 && n_rb_sched >= min_rbSize && iterator->UE != NULL) { while (remainUEs> 0 && n_rb_sched >= min_rb && iterator->UE != NULL) {
NR_UE_sched_ctrl_t *sched_ctrl = &iterator->UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &iterator->UE->UE_sched_ctrl;
int CCEIndex = get_cce_index(nrmac,
CC_id, slot, iterator->UE->rnti,
&sched_ctrl->aggregation_level,
sched_ctrl->search_space,
sched_ctrl->coreset,
&sched_ctrl->sched_pdcch,
false);
const uint32_t Y = get_Y(sched_ctrl->search_space, slot, iterator->UE->rnti);
uint8_t nr_of_candidates;
for (int i=0; i<5; i++) {
// for now taking the lowest value among the available aggregation levels
find_aggregation_candidates(&sched_ctrl->aggregation_level,
&nr_of_candidates,
sched_ctrl->search_space,
1<<i);
if(nr_of_candidates>0)
break;
}
int CCEIndex = find_pdcch_candidate(RC.nrmac[module_id],
CC_id,
sched_ctrl->aggregation_level,
nr_of_candidates,
&sched_ctrl->sched_pdcch,
sched_ctrl->coreset,
Y);
if (CCEIndex<0) { if (CCEIndex<0) {
LOG_D(NR_MAC, "%4d.%2d no free CCE for UL DCI UE %04x\n", frame, slot, iterator->UE->rnti); LOG_D(NR_MAC, "%4d.%2d no free CCE for UL DCI UE %04x\n", frame, slot, iterator->UE->rnti);
iterator++; iterator++;
...@@ -1738,7 +1693,6 @@ void pf_ul(module_id_t module_id, ...@@ -1738,7 +1693,6 @@ void pf_ul(module_id_t module_id,
NR_UE_UL_BWP_t *current_BWP = &iterator->UE->current_UL_BWP; NR_UE_UL_BWP_t *current_BWP = &iterator->UE->current_UL_BWP;
const uint16_t bwpSize = current_BWP->BWPSize;
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
sched_pusch->nrOfLayers = 1; sched_pusch->nrOfLayers = 1;
...@@ -1749,10 +1703,9 @@ void pf_ul(module_id_t module_id, ...@@ -1749,10 +1703,9 @@ void pf_ul(module_id_t module_id,
&sched_pusch->tda_info, &sched_pusch->tda_info,
sched_pusch->nrOfLayers); sched_pusch->nrOfLayers);
update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm);
int rbStart = 0; int rbStart = 0;
const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols);
const uint16_t bwpSize = current_BWP->BWPSize;
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap) while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
rbStart++; rbStart++;
sched_pusch->rbStart = rbStart; sched_pusch->rbStart = rbStart;
...@@ -1763,7 +1716,7 @@ void pf_ul(module_id_t module_id, ...@@ -1763,7 +1716,7 @@ void pf_ul(module_id_t module_id,
if (rbStart + min_rb >= bwpSize) { if (rbStart + min_rb >= bwpSize) {
LOG_W(NR_MAC, "cannot allocate UL data for RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", LOG_W(NR_MAC, "cannot allocate UL data for RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d)\n",
iterator->UE->rnti,rbStart,min_rb,bwpSize); iterator->UE->rnti,rbStart,min_rb,bwpSize);
return; continue;
} }
else else
LOG_D(NR_MAC,"allocating UL data for RNTI %04x (rbStsart %d, min_rb %d, bwpSize %d)\n", iterator->UE->rnti,rbStart,min_rb,bwpSize); LOG_D(NR_MAC,"allocating UL data for RNTI %04x (rbStsart %d, min_rb %d, bwpSize %d)\n", iterator->UE->rnti,rbStart,min_rb,bwpSize);
...@@ -1771,24 +1724,24 @@ void pf_ul(module_id_t module_id, ...@@ -1771,24 +1724,24 @@ void pf_ul(module_id_t module_id,
/* Calculate the current scheduling bytes */ /* Calculate the current scheduling bytes */
const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0); const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0);
/* adjust rbSize and MCS according to PHR and BPRE */ /* adjust rbSize and MCS according to PHR and BPRE */
sched_pusch->mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; sched_pusch->mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing;
if(sched_ctrl->pcmax!=0 || if(sched_ctrl->pcmax!=0 ||
sched_ctrl->ph!=0) // verify if the PHR related parameter have been initialized sched_ctrl->ph!=0) // verify if the PHR related parameter have been initialized
nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, sched_pusch, current_BWP, min_rbSize, B, &max_rbSize, &sched_pusch->mcs); nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, sched_pusch, current_BWP, min_rb, B, &max_rbSize, &sched_pusch->mcs);
if (sched_pusch->mcs < sched_ctrl->ul_bler_stats.mcs) if (sched_pusch->mcs < sched_ctrl->ul_bler_stats.mcs)
sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; /* force estimated MCS down */ sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; /* force estimated MCS down */
update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm);
uint16_t rbSize = 0; uint16_t rbSize = 0;
uint32_t TBS = 0; uint32_t TBS = 0;
nr_find_nb_rb(sched_pusch->Qm, nr_find_nb_rb(sched_pusch->Qm,
sched_pusch->R, sched_pusch->R,
1, // layers 1, // layers
sched_pusch->tda_info.nrOfSymbols, sched_pusch->tda_info.nrOfSymbols,
sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb,
B, B,
min_rbSize, min_rb,
max_rbSize, max_rbSize,
&TBS, &TBS,
&rbSize); &rbSize);
...@@ -1802,7 +1755,7 @@ void pf_ul(module_id_t module_id, ...@@ -1802,7 +1755,7 @@ void pf_ul(module_id_t module_id,
/* Mark the corresponding RBs as used */ /* Mark the corresponding RBs as used */
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(nrmac,
CC_id, CC_id,
&sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
......
...@@ -269,12 +269,12 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, ...@@ -269,12 +269,12 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
NR_BWP_t *bwp, NR_BWP_t *bwp,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config); NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config);
int find_pdcch_candidate(gNB_MAC_INST *mac, int find_pdcch_candidate(const gNB_MAC_INST *mac,
int cc_id, int cc_id,
int aggregation, int aggregation,
int nr_of_candidates, int nr_of_candidates,
NR_sched_pdcch_t *pdcch, const NR_sched_pdcch_t *pdcch,
NR_ControlResourceSet_t *coreset, const NR_ControlResourceSet_t *coreset,
uint32_t Y); uint32_t Y);
void fill_pdcch_vrb_map(gNB_MAC_INST *mac, void fill_pdcch_vrb_map(gNB_MAC_INST *mac,
...@@ -473,7 +473,15 @@ void set_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl, ...@@ -473,7 +473,15 @@ void set_sched_pucch_list(NR_UE_sched_ctrl_t *sched_ctrl,
const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot); const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot);
const int get_ul_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot); const int get_ul_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot);
bool find_free_CCE(sub_frame_t slot, NR_UE_info_t *UE); int get_cce_index(const gNB_MAC_INST *nrmac,
const int CC_id,
const int slot,
const rnti_t rnti,
uint8_t *aggregation_level,
const NR_SearchSpace_t *ss,
const NR_ControlResourceSet_t *coreset,
NR_sched_pdcch_t *sched_pdcch,
bool is_common);
bool nr_find_nb_rb(uint16_t Qm, bool nr_find_nb_rb(uint16_t Qm,
uint16_t R, uint16_t R,
......
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