fixed CCE allocation bug.
This commit is contained in:
@@ -251,7 +251,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint8_t Num_ue_spec_dci ;
|
||||
uint8_t Num_common_dci ;
|
||||
uint32_t nCCE;
|
||||
// uint32_t nCCE;
|
||||
uint32_t num_pdcch_symbols;
|
||||
DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ;
|
||||
} DCI_PDU;
|
||||
|
||||
@@ -108,8 +108,6 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
DCI_pdu[CC_id] = &eNB_mac_inst[module_idP].common_channels[CC_id].DCI_pdu;
|
||||
DCI_pdu[CC_id]->nCCE=0;
|
||||
DCI_pdu[CC_id]->num_pdcch_symbols=1;
|
||||
mbsfn_status[CC_id]=0;
|
||||
// clear vrb_map
|
||||
memset(eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map,0,100);
|
||||
@@ -661,7 +659,28 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++)
|
||||
allocate_CCEs(module_idP,CC_id,subframeP,0);
|
||||
|
||||
/*
|
||||
int dummy=0;
|
||||
for (i=0;
|
||||
i<DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci;
|
||||
i++)
|
||||
if (DCI_pdu[CC_id]->dci_alloc[i].rnti==2)
|
||||
dummy=1;
|
||||
|
||||
if (dummy==1)
|
||||
for (i=0;
|
||||
i<DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci;
|
||||
i++)
|
||||
LOG_I(MAC,"Frame %d, subframe %d: DCI %d/%d, format %d, rnti %x, NCCE %d(num_pdcch_symb %d)\n",
|
||||
frameP,subframeP,i,DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci,
|
||||
DCI_pdu[CC_id]->dci_alloc[i].format,
|
||||
DCI_pdu[CC_id]->dci_alloc[i].rnti,
|
||||
DCI_pdu[CC_id]->dci_alloc[i].firstCCE,
|
||||
DCI_pdu[CC_id]->num_pdcch_symbols);
|
||||
|
||||
|
||||
LOG_D(MAC,"frameP %d, subframeP %d\n",frameP,subframeP);
|
||||
*/
|
||||
|
||||
stop_meas(&eNB_mac_inst[module_idP].eNB_scheduler);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
|
||||
|
||||
@@ -251,6 +251,8 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
|
||||
}
|
||||
|
||||
if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,2,RA_template->RA_rnti)) {
|
||||
LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x\n",
|
||||
frameP,subframeP,RA_template->RA_rnti);
|
||||
add_common_dci(DCI_pdu,
|
||||
(void*)&RA_template->RA_alloc_pdu1[0],
|
||||
RA_template->RA_rnti,
|
||||
|
||||
@@ -993,17 +993,19 @@ int allocate_CCEs(int module_idP,
|
||||
|
||||
int *CCE_table = eNB_mac_inst[module_idP].CCE_table[CC_idP];
|
||||
DCI_PDU *DCI_pdu = &eNB_mac_inst[module_idP].common_channels[CC_idP].DCI_pdu;
|
||||
int nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP);
|
||||
int nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,1,subframeP);
|
||||
int fCCE;
|
||||
int i,j;
|
||||
int allocation_is_feasible = 1;
|
||||
DCI_ALLOC_t *dci_alloc;
|
||||
int nCCE=0;
|
||||
|
||||
LOG_D(MAC,"Allocate CCEs subframe %d, test %d : (common %d,uspec %d)\n",subframeP,test_onlyP,DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
|
||||
DCI_pdu->num_pdcch_symbols=1;
|
||||
|
||||
while (allocation_is_feasible == 1) {
|
||||
init_CCE_table(module_idP,CC_idP);
|
||||
DCI_pdu->nCCE=0;
|
||||
nCCE=0;
|
||||
|
||||
for (i=0;i<DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci;i++) {
|
||||
dci_alloc = &DCI_pdu->dci_alloc[i];
|
||||
@@ -1011,9 +1013,9 @@ int allocate_CCEs(int module_idP,
|
||||
i,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci,
|
||||
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci,
|
||||
dci_alloc->rnti,1<<dci_alloc->L,
|
||||
DCI_pdu->nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
|
||||
nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
|
||||
|
||||
if (DCI_pdu->nCCE + (1<<dci_alloc->L) > nCCE_max) {
|
||||
if (nCCE + (1<<dci_alloc->L) > nCCE_max) {
|
||||
if (DCI_pdu->num_pdcch_symbols == 3)
|
||||
allocation_is_feasible = 0;
|
||||
else {
|
||||
@@ -1032,7 +1034,7 @@ int allocate_CCEs(int module_idP,
|
||||
|
||||
LOG_D(MAC,"Allocating at nCCE %d\n",fCCE);
|
||||
if (test_onlyP == 0) {
|
||||
DCI_pdu->nCCE += (1<<dci_alloc->L);
|
||||
nCCE += (1<<dci_alloc->L);
|
||||
dci_alloc->firstCCE=fCCE;
|
||||
LOG_D(MAC,"Allocate CCEs subframe %d, test %d\n",subframeP,test_onlyP);
|
||||
}
|
||||
@@ -1049,7 +1051,7 @@ int allocate_CCEs(int module_idP,
|
||||
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci,
|
||||
DCI_pdu->dci_alloc[j].rnti,DCI_pdu->dci_alloc[j].format,
|
||||
1<<DCI_pdu->dci_alloc[j].L,
|
||||
DCI_pdu->nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
|
||||
nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user