Commit 312fad12 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/fjt_bug_fix_issue239' into develop_integration_w20

parents 87eb4598 9cf288f6
...@@ -1979,6 +1979,9 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci, ...@@ -1979,6 +1979,9 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
uint16_t numCCE = 0; uint16_t numCCE = 0;
uint8_t i; uint8_t i;
uint8_t nCCEmin = 0; uint8_t nCCEmin = 0;
uint16_t CCE_max_used_index = 0;
uint16_t firstCCE_max = dci_alloc[0].firstCCE;
uint8_t L = dci_alloc[0].L;
// check pdcch duration imposed by PHICH duration (Section 6.9 of 36-211) // check pdcch duration imposed by PHICH duration (Section 6.9 of 36-211)
if (frame_parms->Ncp==1) { // extended prefix if (frame_parms->Ncp==1) { // extended prefix
...@@ -1995,16 +1998,22 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci, ...@@ -1995,16 +1998,22 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
for (i=0; i<num_dci; i++) { for (i=0; i<num_dci; i++) {
// printf("dci %d => %d\n",i,dci_alloc[i].L); // printf("dci %d => %d\n",i,dci_alloc[i].L);
numCCE += (1<<(dci_alloc[i].L)); numCCE += (1<<(dci_alloc[i].L));
if(firstCCE_max < dci_alloc[i].firstCCE) {
firstCCE_max = dci_alloc[i].firstCCE;
L = dci_alloc[i].L;
}
} }
CCE_max_used_index = firstCCE_max + (1<<L) - 1;
//if ((9*numCCE) <= (frame_parms->N_RB_DL*2)) //if ((9*numCCE) <= (frame_parms->N_RB_DL*2))
if (numCCE <= get_nCCE(1, frame_parms, get_mi(frame_parms, subframe))) if (CCE_max_used_index < get_nCCE(1, frame_parms, get_mi(frame_parms, subframe)))
return(cmax(1,nCCEmin)); return(cmax(1,nCCEmin));
//else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 4 : 5))) //else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 4 : 5)))
else if (numCCE <= get_nCCE(2, frame_parms, get_mi(frame_parms, subframe))) else if (CCE_max_used_index < get_nCCE(2, frame_parms, get_mi(frame_parms, subframe)))
return(cmax(2,nCCEmin)); return(cmax(2,nCCEmin));
//else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 7 : 8))) //else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 7 : 8)))
else if (numCCE <= get_nCCE(3, frame_parms, get_mi(frame_parms, subframe))) else if (CCE_max_used_index < get_nCCE(3, frame_parms, get_mi(frame_parms, subframe)))
return(cmax(3,nCCEmin)); return(cmax(3,nCCEmin));
else if (frame_parms->N_RB_DL<=10) { else if (frame_parms->N_RB_DL<=10) {
if (frame_parms->Ncp == 0) { // normal CP if (frame_parms->Ncp == 0) { // normal CP
......
...@@ -612,17 +612,15 @@ schedule_ue_spec( ...@@ -612,17 +612,15 @@ schedule_ue_spec(
if (round > 0) { if (round > 0) {
if (frame_parms[CC_id]->frame_type == TDD) {
UE_list->UE_template[CC_id][UE_id].DAI++;
update_ul_dci(module_idP,CC_id,rnti,UE_list->UE_template[CC_id][UE_id].DAI);
LOG_D(MAC,"DAI update: CC_id %d subframeP %d: UE %d, DAI %d\n",
CC_id,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].DAI);
}
// get freq_allocation // get freq_allocation
nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
if (nb_rb <= nb_available_rb) { if (nb_rb <= nb_available_rb) {
if (frame_parms[CC_id]->frame_type == TDD) {
UE_list->UE_template[CC_id][UE_id].DAI++;
update_ul_dci(module_idP,CC_id,rnti,UE_list->UE_template[CC_id][UE_id].DAI);
LOG_D(MAC,"DAI update: CC_id %d subframeP %d: UE %d, DAI %d\n", CC_id,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].DAI);
}
if(nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { if(nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) {
for(j=0; j<frame_parms[CC_id]->N_RBG; j++) { // for indicating the rballoc for each sub-band for(j=0; j<frame_parms[CC_id]->N_RBG; j++) { // for indicating the rballoc for each sub-band
......
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