fix DLSCH ACK/NAK cce_index issue
This commit is contained in:
@@ -751,7 +751,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
|||||||
// Allocate CCEs for good after scheduling is done
|
// Allocate CCEs for good after scheduling is done
|
||||||
|
|
||||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
|
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
|
||||||
allocate_CCEs(module_idP, CC_id, subframeP, 0);
|
allocate_CCEs(module_idP, CC_id, frameP, subframeP, 2);
|
||||||
|
|
||||||
|
|
||||||
stop_meas(&RC.mac[module_idP]->eNB_scheduler);
|
stop_meas(&RC.mac[module_idP]->eNB_scheduler);
|
||||||
|
|||||||
@@ -3063,7 +3063,7 @@ get_nCCE_max(COMMON_channels_t * cc, int num_pdcch_symbols, int subframe)
|
|||||||
|
|
||||||
// Allocate the CCEs
|
// Allocate the CCEs
|
||||||
int
|
int
|
||||||
allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
|
allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_onlyP)
|
||||||
{
|
{
|
||||||
int *CCE_table = RC.mac[module_idP]->CCE_table[CC_idP];
|
int *CCE_table = RC.mac[module_idP]->CCE_table[CC_idP];
|
||||||
nfapi_dl_config_request_body_t *DL_req =
|
nfapi_dl_config_request_body_t *DL_req =
|
||||||
@@ -3081,6 +3081,11 @@ allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
|
|||||||
int i, j, idci;
|
int i, j, idci;
|
||||||
int nCCE = 0;
|
int nCCE = 0;
|
||||||
|
|
||||||
|
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||||
|
COMMON_channels_t *cc = &eNB->common_channels[CC_idP];
|
||||||
|
int ackNAK_absSF = get_pucch1_absSF(cc, (frameP*10+subframeP));
|
||||||
|
nfapi_ul_config_request_body_t *ul_req = &eNB->UL_req_tmp[CC_idP][ackNAK_absSF % 10].ul_config_request_body;
|
||||||
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"Allocate CCEs subframe %d, test %d : (DL PDU %d, DL DCI %d, UL %d)\n",
|
"Allocate CCEs subframe %d, test %d : (DL PDU %d, DL DCI %d, UL %d)\n",
|
||||||
subframeP, test_onlyP, DL_req->number_pdu, DL_req->number_dci,
|
subframeP, test_onlyP, DL_req->number_pdu, DL_req->number_dci,
|
||||||
@@ -3176,7 +3181,7 @@ allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
|
|||||||
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.
|
||||||
aggregation_level;
|
aggregation_level;
|
||||||
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
|
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
|
||||||
if (test_onlyP == 0) {
|
if ((test_onlyP%2) == 0) {
|
||||||
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.cce_idx = fCCE;
|
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.cce_idx = fCCE;
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"Allocate COMMON DCI CCEs subframe %d, test %d => L %d fCCE %d\n",
|
"Allocate COMMON DCI CCEs subframe %d, test %d => L %d fCCE %d\n",
|
||||||
@@ -3270,7 +3275,7 @@ allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
|
|||||||
// the allocation is feasible, rnti rule passes
|
// the allocation is feasible, rnti rule passes
|
||||||
nCCE += hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.aggregation_level;
|
nCCE += hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.aggregation_level;
|
||||||
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
|
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
|
||||||
if (test_onlyP == 0) {
|
if ((test_onlyP%2) == 0) {
|
||||||
hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.cce_index = fCCE;
|
hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.cce_index = fCCE;
|
||||||
LOG_D(MAC, "Allocate CCEs subframe %d, test %d\n",
|
LOG_D(MAC, "Allocate CCEs subframe %d, test %d\n",
|
||||||
subframeP, test_onlyP);
|
subframeP, test_onlyP);
|
||||||
@@ -3365,11 +3370,20 @@ allocate_CCEs(int module_idP, int CC_idP, int subframeP, int test_onlyP)
|
|||||||
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.
|
||||||
aggregation_level;
|
aggregation_level;
|
||||||
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
|
LOG_D(MAC, "Allocating at nCCE %d\n", fCCE);
|
||||||
if (test_onlyP == 0) {
|
if ((test_onlyP%2) == 0) {
|
||||||
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.cce_idx = fCCE;
|
dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.cce_idx = fCCE;
|
||||||
LOG_D(MAC, "Allocate CCEs subframe %d, test %d\n",
|
LOG_D(MAC, "Allocate CCEs subframe %d, test %d\n",
|
||||||
subframeP, test_onlyP);
|
subframeP, test_onlyP);
|
||||||
}
|
}
|
||||||
|
if ((test_onlyP/2) == 1) {
|
||||||
|
for(int ack_int = 0;ack_int < ul_req->number_of_pdus; ack_int++){
|
||||||
|
if(((ul_req->ul_config_pdu_list[ack_int].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE) ||
|
||||||
|
(ul_req->ul_config_pdu_list[ack_int].pdu_type == NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE)) &&
|
||||||
|
(ul_req->ul_config_pdu_list[ack_int].uci_harq_pdu.ue_information.ue_information_rel8.rnti == dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.rnti)){
|
||||||
|
ul_req->ul_config_pdu_list[ack_int].uci_harq_pdu.harq_information.harq_information_rel9_fdd.n_pucch_1_0 = fCCE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
idci++;
|
idci++;
|
||||||
}
|
}
|
||||||
} // for i = 0 ... num_DL_DCIs
|
} // for i = 0 ... num_DL_DCIs
|
||||||
@@ -3546,7 +3560,7 @@ CCE_allocation_infeasible(int module_idP,
|
|||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
||||||
aggregation_level,
|
aggregation_level,
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type);
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type);
|
||||||
ret = allocate_CCEs(module_idP, CC_idP, subframe, 0);
|
ret = allocate_CCEs(module_idP, CC_idP, 0, subframe, 0);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
DL_req->number_pdu--;
|
DL_req->number_pdu--;
|
||||||
@@ -3563,7 +3577,7 @@ CCE_allocation_infeasible(int module_idP,
|
|||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level =
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level =
|
||||||
aggregation;
|
aggregation;
|
||||||
HI_DCI0_req->number_of_dci++;
|
HI_DCI0_req->number_of_dci++;
|
||||||
ret = allocate_CCEs(module_idP, CC_idP, subframe, 0);
|
ret = allocate_CCEs(module_idP, CC_idP, 0, subframe, 0);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
HI_DCI0_req->number_of_dci--;
|
HI_DCI0_req->number_of_dci--;
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ int get_nCCE_offset(int *CCE_table,
|
|||||||
const unsigned short rnti,
|
const unsigned short rnti,
|
||||||
const unsigned char subframe);
|
const unsigned char subframe);
|
||||||
|
|
||||||
int allocate_CCEs(int module_idP, int CC_idP, int subframe, int test_only);
|
int allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_only);
|
||||||
|
|
||||||
boolean_t CCE_allocation_infeasible(int module_idP,
|
boolean_t CCE_allocation_infeasible(int module_idP,
|
||||||
int CC_idP,
|
int CC_idP,
|
||||||
|
|||||||
Reference in New Issue
Block a user