more correction of indentation
This commit is contained in:
@@ -235,35 +235,28 @@ schedule_SIB1_BR(module_id_t module_idP,
|
|||||||
memset((void *) dl_config_pdu, 0,
|
memset((void *) dl_config_pdu, 0,
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
sizeof(nfapi_dl_config_request_pdu_t));
|
||||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||||
dl_config_pdu->pdu_size =
|
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
||||||
(uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||||
eNB->pdu_index[CC_id];
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
|
||||||
getRIV(N_RB_DL, first_rb, 6);
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
|
||||||
dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme =
|
|
||||||
(cc->p_eNB == 1) ? 0 : 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||||
0;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
|
||||||
(cc->p_eNB == 1) ? 1 : 2;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||||
// Rel10 fields
|
// Rel10 fields
|
||||||
@@ -280,10 +273,7 @@ schedule_SIB1_BR(module_id_t module_idP,
|
|||||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||||
|
|
||||||
// Program TX Request
|
// Program TX Request
|
||||||
TX_req =
|
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||||
&eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->
|
|
||||||
TX_req
|
|
||||||
[CC_id].tx_request_body.number_of_pdus];
|
|
||||||
TX_req->pdu_length = bcch_sdu_length;
|
TX_req->pdu_length = bcch_sdu_length;
|
||||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||||
TX_req->num_segments = 1;
|
TX_req->num_segments = 1;
|
||||||
@@ -315,11 +305,8 @@ schedule_SIB1_BR(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int si_WindowLength_BR_r13tab
|
int si_WindowLength_BR_r13tab[SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
|
||||||
[SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare]
|
int si_TBS_r13tab[SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
|
||||||
= { 20, 40, 60, 80, 120, 160, 200 };
|
|
||||||
int si_TBS_r13tab[SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] =
|
|
||||||
{ 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
@@ -354,65 +341,40 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
|||||||
if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
|
if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
|
||||||
continue;
|
continue;
|
||||||
else {
|
else {
|
||||||
|
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL,
|
||||||
|
|
||||||
AssertFatal(cc->
|
|
||||||
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13
|
|
||||||
!= NULL,
|
|
||||||
"sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
|
"sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
|
||||||
|
|
||||||
SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 =
|
SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
|
||||||
cc->sib1_v13ext->
|
|
||||||
bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
|
|
||||||
AssertFatal(schedulingInfoList_BR_r13 != NULL,
|
AssertFatal(schedulingInfoList_BR_r13 != NULL,
|
||||||
"sib_v13ext->schedulingInfoList_BR_r13 is null\n");
|
"sib_v13ext->schedulingInfoList_BR_r13 is null\n");
|
||||||
|
|
||||||
SchedulingInfoList_t *schedulingInfoList =
|
SchedulingInfoList_t *schedulingInfoList = cc->schedulingInfoList;
|
||||||
cc->schedulingInfoList;
|
AssertFatal(schedulingInfoList_BR_r13->list.count == schedulingInfoList->list.count,
|
||||||
AssertFatal(schedulingInfoList_BR_r13->list.count ==
|
|
||||||
schedulingInfoList->list.count,
|
|
||||||
"schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n",
|
"schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n",
|
||||||
schedulingInfoList_BR_r13->list.count,
|
schedulingInfoList_BR_r13->list.count,
|
||||||
schedulingInfoList->list.count);
|
schedulingInfoList->list.count);
|
||||||
|
|
||||||
AssertFatal(cc->
|
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13<=SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
|
||||||
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
|
|
||||||
<=
|
|
||||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
|
|
||||||
"si_WindowLength_BR_r13 %d > %d\n",
|
"si_WindowLength_BR_r13 %d > %d\n",
|
||||||
(int) cc->
|
(int) cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
|
||||||
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
|
|
||||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
|
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
|
||||||
|
|
||||||
// check that SI frequency-hopping is disabled
|
// check that SI frequency-hopping is disabled
|
||||||
AssertFatal(cc->
|
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 == SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
|
||||||
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13
|
|
||||||
==
|
|
||||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
|
|
||||||
"Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n");
|
"Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n");
|
||||||
long si_WindowLength_BR_r13 =
|
long si_WindowLength_BR_r13 = si_WindowLength_BR_r13tab[cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13];
|
||||||
si_WindowLength_BR_r13tab[cc->
|
|
||||||
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13];
|
|
||||||
|
|
||||||
long si_RepetitionPattern_r13 =
|
long si_RepetitionPattern_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13;
|
||||||
cc->sib1_v13ext->
|
AssertFatal(si_RepetitionPattern_r13<=SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
|
||||||
bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13;
|
|
||||||
AssertFatal(si_RepetitionPattern_r13 <=
|
|
||||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
|
|
||||||
"si_RepetitionPattern_r13 %d > %d\n",
|
"si_RepetitionPattern_r13 %d > %d\n",
|
||||||
(int) si_RepetitionPattern_r13,
|
(int) si_RepetitionPattern_r13,
|
||||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
|
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
|
||||||
// cycle through SIB list
|
// cycle through SIB list
|
||||||
|
|
||||||
for (i = 0; i < schedulingInfoList_BR_r13->list.count; i++) {
|
for (i = 0; i < schedulingInfoList_BR_r13->list.count; i++) {
|
||||||
long si_Periodicity =
|
long si_Periodicity = schedulingInfoList->list.array[i]->si_Periodicity;
|
||||||
schedulingInfoList->list.array[i]->si_Periodicity;
|
long si_Narrowband_r13 = schedulingInfoList_BR_r13->list.array[i]->si_Narrowband_r13;
|
||||||
long si_Narrowband_r13 =
|
long si_TBS_r13 = si_TBS_r13tab[schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13];
|
||||||
schedulingInfoList_BR_r13->list.array[i]->
|
|
||||||
si_Narrowband_r13;
|
|
||||||
long si_TBS_r13 =
|
|
||||||
si_TBS_r13tab[schedulingInfoList_BR_r13->
|
|
||||||
list.array[i]->si_TBS_r13];
|
|
||||||
|
|
||||||
// check if the SI is to be scheduled now
|
// check if the SI is to be scheduled now
|
||||||
int period_in_sf = 80 << si_Periodicity; // 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms
|
int period_in_sf = 80 << si_Periodicity; // 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms
|
||||||
@@ -434,18 +396,14 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
|||||||
"RRC provided bcch with length %d > %d (si_TBS_r13 %d)\n",
|
"RRC provided bcch with length %d > %d (si_TBS_r13 %d)\n",
|
||||||
bcch_sdu_length,
|
bcch_sdu_length,
|
||||||
(int) (si_TBS_r13 >> 3),
|
(int) (si_TBS_r13 >> 3),
|
||||||
(int) schedulingInfoList_BR_r13->
|
(int) schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13);
|
||||||
list.array[i]->si_TBS_r13);
|
|
||||||
|
|
||||||
// allocate all 6 PRBs in narrowband for SIB1_BR
|
// allocate all 6 PRBs in narrowband for SIB1_BR
|
||||||
|
|
||||||
// check that SIB1 didn't take this narrowband
|
// check that SIB1 didn't take this narrowband
|
||||||
if (vrb_map[first_rb] > 0)
|
if (vrb_map[first_rb] > 0) continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
first_rb =
|
first_rb = narrowband_to_first_rb(cc,si_Narrowband_r13 - 1);
|
||||||
narrowband_to_first_rb(cc,
|
|
||||||
si_Narrowband_r13 - 1);
|
|
||||||
vrb_map[first_rb] = 1;
|
vrb_map[first_rb] = 1;
|
||||||
vrb_map[first_rb + 1] = 1;
|
vrb_map[first_rb + 1] = 1;
|
||||||
vrb_map[first_rb + 2] = 1;
|
vrb_map[first_rb + 2] = 1;
|
||||||
@@ -465,89 +423,54 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
dl_config_pdu =
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
&dl_req->dl_config_pdu_list[dl_req->
|
memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
|
||||||
number_pdu];
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||||
memset((void *) dl_config_pdu, 0,
|
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
|
||||||
dl_config_pdu->pdu_type =
|
|
||||||
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
|
||||||
dl_config_pdu->pdu_size =
|
|
||||||
(uint8_t) (2 +
|
|
||||||
sizeof(nfapi_dl_config_dlsch_pdu));
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = si_TBS_r13 >> 3;
|
||||||
si_TBS_r13 >> 3;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
||||||
eNB->pdu_index[CC_id];
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti =
|
|
||||||
0xFFFF;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
|
||||||
dlsch_pdu_rel8.resource_block_coding =
|
|
||||||
getRIV(N_RB_DL, first_rb, 6);
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
|
||||||
dlsch_pdu_rel8.redundancy_version = rvidx;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
|
||||||
dlsch_pdu_rel8.transport_block_to_codeword_swap_flag
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
|
||||||
= 0;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||||
dlsch_pdu_rel8.transmission_scheme =
|
|
||||||
(cc->p_eNB == 1) ? 0 : 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.
|
|
||||||
dlsch_pdu_rel8.number_of_layers = 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.
|
|
||||||
dlsch_pdu_rel8.number_of_subbands = 1;
|
|
||||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||||
dlsch_pdu_rel8.ue_category_capacity = 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||||
dlsch_pdu_rel8.delta_power_offset_index = 0;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
|
||||||
dlsch_pdu_rel8.transmission_mode =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||||
(cc->p_eNB == 1) ? 1 : 2;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||||
dl_config_pdu->dlsch_pdu.
|
|
||||||
dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
|
|
||||||
num_bf_vector = 1;
|
|
||||||
// Rel10 fields (for PDSCH starting symbol)
|
// Rel10 fields (for PDSCH starting symbol)
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = cc[CC_id].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
|
||||||
pdsch_start =
|
|
||||||
cc[CC_id].
|
|
||||||
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
|
|
||||||
// Rel13 fields
|
// Rel13 fields
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 1; // SI-BR
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 1; // SI-BR
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = absSF - sf_mod_period;
|
||||||
dlsch_pdu_rel13.initial_transmission_sf_io =
|
|
||||||
absSF - sf_mod_period;
|
|
||||||
|
|
||||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||||
dl_req->number_pdu++;
|
dl_req->number_pdu++;
|
||||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||||
|
|
||||||
// Program TX Request
|
// Program TX Request
|
||||||
TX_req =
|
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||||
&eNB->TX_req[CC_id].
|
|
||||||
tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].
|
|
||||||
tx_request_body.number_of_pdus];
|
|
||||||
TX_req->pdu_length = bcch_sdu_length;
|
TX_req->pdu_length = bcch_sdu_length;
|
||||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||||
TX_req->num_segments = 1;
|
TX_req->num_segments = 1;
|
||||||
TX_req->segments[0].segment_length =
|
TX_req->segments[0].segment_length = bcch_sdu_length;
|
||||||
bcch_sdu_length;
|
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i + 1].payload;
|
||||||
TX_req->segments[0].segment_data =
|
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||||
cc->BCCH_BR_pdu[i + 1].payload;
|
|
||||||
eNB->TX_req[CC_id].tx_request_body.
|
|
||||||
number_of_pdus++;
|
|
||||||
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||||
@@ -620,17 +543,14 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
module_idP, frameP, CC_id, mib_sdu_length,
|
module_idP, frameP, CC_id, mib_sdu_length,
|
||||||
(int) cc->mib->message.schedulingInfoSIB1_BR_r13);
|
(int) cc->mib->message.schedulingInfoSIB1_BR_r13);
|
||||||
|
|
||||||
dl_config_pdu =
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
|
||||||
memset((void *) dl_config_pdu, 0,
|
memset((void *) dl_config_pdu, 0,
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
sizeof(nfapi_dl_config_request_pdu_t));
|
||||||
dl_config_pdu->pdu_type =
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
|
||||||
NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
|
|
||||||
2 + sizeof(nfapi_dl_config_bch_pdu);
|
2 + sizeof(nfapi_dl_config_bch_pdu);
|
||||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG;
|
dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG;
|
||||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.length = mib_sdu_length;
|
dl_config_pdu->bch_pdu.bch_pdu_rel8.length = mib_sdu_length;
|
||||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index =
|
dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||||
eNB->pdu_index[CC_id];
|
|
||||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000;
|
dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000;
|
||||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||||
dl_req->number_pdu++;
|
dl_req->number_pdu++;
|
||||||
@@ -641,9 +561,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu);
|
LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu);
|
||||||
// DL request
|
// DL request
|
||||||
|
|
||||||
TX_req =
|
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||||
&eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req
|
|
||||||
[CC_id].tx_request_body.number_of_pdus];
|
|
||||||
TX_req->pdu_length = 3;
|
TX_req->pdu_length = 3;
|
||||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||||
TX_req->num_segments = 1;
|
TX_req->num_segments = 1;
|
||||||
@@ -753,88 +671,59 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dl_config_pdu =
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
|
||||||
memset((void *) dl_config_pdu, 0,
|
memset((void *) dl_config_pdu, 0,
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
sizeof(nfapi_dl_config_request_pdu_t));
|
||||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||||
dl_config_pdu->pdu_size =
|
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||||
(uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format =
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
|
||||||
NFAPI_DL_DCI_FORMAT_1A;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
|
||||||
aggregation_level = 4;
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFF;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFF;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||||
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
|
||||||
new_data_indicator_1 = 0;
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||||
redundancy_version_1 = 0;
|
|
||||||
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
|
||||||
dci_dl_pdu_rel8.resource_block_coding =
|
|
||||||
getRIV(N_RB_DL, first_rb, 4);
|
|
||||||
dl_config_request->sfn_sf = sfn_sf;
|
dl_config_request->sfn_sf = sfn_sf;
|
||||||
|
|
||||||
if (!CCE_allocation_infeasible
|
if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
|
||||||
(module_idP, CC_id, 0, subframeP,
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
|
|
||||||
LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP);
|
LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP);
|
||||||
dl_req->number_dci++;
|
dl_req->number_dci++;
|
||||||
dl_req->number_pdu++;
|
dl_req->number_pdu++;
|
||||||
dl_config_pdu =
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
|
||||||
memset((void *) dl_config_pdu, 0,
|
memset((void *) dl_config_pdu, 0,
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
sizeof(nfapi_dl_config_request_p du_t));
|
||||||
dl_config_pdu->pdu_type =
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||||
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
|
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
||||||
dl_config_pdu->pdu_size =
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||||
(uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index =
|
|
||||||
eNB->pdu_index[CC_id];
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = bcch_sdu_length;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = bcch_sdu_length;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
|
||||||
dlsch_pdu_rel8.resource_block_coding =
|
|
||||||
getRIV(N_RB_DL, first_rb, 4);
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 0;
|
||||||
redundancy_version = 0;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
|
||||||
dlsch_pdu_rel8.transport_block_to_codeword_swap_flag
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
|
||||||
= 0;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||||
dlsch_pdu_rel8.transmission_scheme =
|
|
||||||
(cc->p_eNB == 1) ? 0 : 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
|
|
||||||
number_of_layers = 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
|
|
||||||
number_of_subbands = 1;
|
|
||||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||||
dlsch_pdu_rel8.ue_category_capacity = 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||||
dlsch_pdu_rel8.delta_power_offset_index = 0;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
|
||||||
transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||||
dl_config_pdu->dlsch_pdu.
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||||
dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
|
||||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector =
|
|
||||||
1;
|
|
||||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||||
dl_req->number_pdu++;
|
dl_req->number_pdu++;
|
||||||
|
|
||||||
@@ -851,16 +740,12 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
dl_config_request->sfn_sf = sfn_sf;
|
dl_config_request->sfn_sf = sfn_sf;
|
||||||
|
|
||||||
// Program TX Request
|
// Program TX Request
|
||||||
TX_req =
|
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||||
&eNB->TX_req[CC_id].
|
|
||||||
tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].
|
|
||||||
tx_request_body.number_of_pdus];
|
|
||||||
TX_req->pdu_length = bcch_sdu_length;
|
TX_req->pdu_length = bcch_sdu_length;
|
||||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||||
TX_req->num_segments = 1;
|
TX_req->num_segments = 1;
|
||||||
TX_req->segments[0].segment_length = bcch_sdu_length;
|
TX_req->segments[0].segment_length = bcch_sdu_length;
|
||||||
TX_req->segments[0].segment_data =
|
TX_req->segments[0].segment_data = cc->BCCH_pdu.payload;
|
||||||
cc->BCCH_pdu.payload;
|
|
||||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||||
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||||
|
|||||||
@@ -104,10 +104,8 @@ schedule_next_dlue(module_id_t module_idP, int CC_id,
|
|||||||
|
|
||||||
for (next_ue = UE_list->head; next_ue >= 0;
|
for (next_ue = UE_list->head; next_ue >= 0;
|
||||||
next_ue = UE_list->next[next_ue]) {
|
next_ue = UE_list->next[next_ue]) {
|
||||||
if (eNB_dlsch_info[module_idP][CC_id][next_ue].status ==
|
if (eNB_dlsch_info[module_idP][CC_id][next_ue].status == S_DL_BUFFERED) {
|
||||||
S_DL_BUFFERED) {
|
eNB_dlsch_info[module_idP][CC_id][next_ue].status = S_DL_WAITING;
|
||||||
eNB_dlsch_info[module_idP][CC_id][next_ue].status =
|
|
||||||
S_DL_WAITING;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,8 +127,7 @@ generate_dlsch_header(unsigned char *mac_header,
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
|
||||||
SCH_SUBHEADER_FIXED *mac_header_ptr =
|
SCH_SUBHEADER_FIXED *mac_header_ptr = (SCH_SUBHEADER_FIXED *) mac_header;
|
||||||
(SCH_SUBHEADER_FIXED *) mac_header;
|
|
||||||
uint8_t first_element = 0, last_size = 0, i;
|
uint8_t first_element = 0, last_size = 0, i;
|
||||||
uint8_t mac_header_control_elements[16], *ce_ptr;
|
uint8_t mac_header_control_elements[16], *ce_ptr;
|
||||||
|
|
||||||
@@ -244,18 +241,15 @@ generate_dlsch_header(unsigned char *mac_header,
|
|||||||
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->E = 0;
|
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->E = 0;
|
||||||
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->F = 0;
|
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->F = 0;
|
||||||
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->LCID = sdu_lcids[i];
|
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->LCID = sdu_lcids[i];
|
||||||
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->L =
|
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->L = (unsigned char) sdu_lengths[i];
|
||||||
(unsigned char) sdu_lengths[i];
|
|
||||||
last_size = 2;
|
last_size = 2;
|
||||||
} else {
|
} else {
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->R = 0;
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->R = 0;
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->E = 0;
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->E = 0;
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->F = 1;
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->F = 1;
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->LCID = sdu_lcids[i];
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->LCID = sdu_lcids[i];
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_MSB =
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_MSB = ((unsigned short) sdu_lengths[i] >> 8) & 0x7f;
|
||||||
((unsigned short) sdu_lengths[i] >> 8) & 0x7f;
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_LSB = (unsigned short) sdu_lengths[i] & 0xff;
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_LSB =
|
|
||||||
(unsigned short) sdu_lengths[i] & 0xff;
|
|
||||||
((SCH_SUBHEADER_LONG *) mac_header_ptr)->padding = 0x00;
|
((SCH_SUBHEADER_LONG *) mac_header_ptr)->padding = 0x00;
|
||||||
last_size = 3;
|
last_size = 3;
|
||||||
#ifdef DEBUG_HEADER_PARSING
|
#ifdef DEBUG_HEADER_PARSING
|
||||||
@@ -527,18 +521,15 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
// store the global enb stats:
|
// store the global enb stats:
|
||||||
eNB->eNB_stats[CC_id].num_dlactive_UEs = UE_list->num_UEs;
|
eNB->eNB_stats[CC_id].num_dlactive_UEs = UE_list->num_UEs;
|
||||||
eNB->eNB_stats[CC_id].available_prbs =
|
eNB->eNB_stats[CC_id].available_prbs = total_nb_available_rb[CC_id];
|
||||||
total_nb_available_rb[CC_id];
|
eNB->eNB_stats[CC_id].total_available_prbs += total_nb_available_rb[CC_id];
|
||||||
eNB->eNB_stats[CC_id].total_available_prbs +=
|
|
||||||
total_nb_available_rb[CC_id];
|
|
||||||
eNB->eNB_stats[CC_id].dlsch_bytes_tx = 0;
|
eNB->eNB_stats[CC_id].dlsch_bytes_tx = 0;
|
||||||
eNB->eNB_stats[CC_id].dlsch_pdus_tx = 0;
|
eNB->eNB_stats[CC_id].dlsch_pdus_tx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// CALLING Pre_Processor for downlink scheduling (Returns estimation of RBs required by each UE and the allocation on sub-band)
|
/// CALLING Pre_Processor for downlink scheduling (Returns estimation of RBs required by each UE and the allocation on sub-band)
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_IN);
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_IN);
|
|
||||||
start_meas(&eNB->schedule_dlsch_preprocessor);
|
start_meas(&eNB->schedule_dlsch_preprocessor);
|
||||||
dlsch_scheduler_pre_processor(module_idP,
|
dlsch_scheduler_pre_processor(module_idP,
|
||||||
frameP, subframeP, N_RBG, mbsfn_flag);
|
frameP, subframeP, N_RBG, mbsfn_flag);
|
||||||
@@ -631,23 +622,18 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id];
|
nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id];
|
||||||
|
|
||||||
if (cc->tdd_Config)
|
if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||||
harq_pid = ((frameP * 10) + subframeP) % 10;
|
else harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||||
else
|
|
||||||
harq_pid = ((frameP * 10) + subframeP) & 7;
|
|
||||||
|
|
||||||
round = ue_sched_ctl->round[CC_id][harq_pid];
|
round = ue_sched_ctl->round[CC_id][harq_pid];
|
||||||
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].crnti = rnti;
|
UE_list->eNB_UE_stats[CC_id][UE_id].crnti = rnti;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status =
|
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||||
mac_eNB_get_rrc_status(module_idP, rnti);
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid;
|
UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round;
|
UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round;
|
||||||
|
|
||||||
|
|
||||||
if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status <
|
if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < RRC_CONNECTED) continue;
|
||||||
RRC_CONNECTED)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
sdu_length_total = 0;
|
sdu_length_total = 0;
|
||||||
num_sdus = 0;
|
num_sdus = 0;
|
||||||
@@ -670,9 +656,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
// initializing the rb allocation indicator for each UE
|
// initializing the rb allocation indicator for each UE
|
||||||
for (j = 0; j < N_RBG[CC_id]; j++) {
|
for (j = 0; j < N_RBG[CC_id]; j++) {
|
||||||
UE_list->
|
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0;
|
||||||
UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]
|
|
||||||
= 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
@@ -690,9 +674,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
// 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];
|
||||||
TBS =
|
TBS = get_TBS_DL(UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid],
|
||||||
get_TBS_DL(UE_list->
|
|
||||||
UE_template[CC_id][UE_id].oldmcs1[harq_pid],
|
|
||||||
nb_rb);
|
nb_rb);
|
||||||
|
|
||||||
if (nb_rb <= nb_available_rb) {
|
if (nb_rb <= nb_available_rb) {
|
||||||
@@ -709,36 +691,24 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
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 < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band
|
for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
||||||
rballoc_subband[harq_pid][j] =
|
|
||||||
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nb_rb_temp = nb_rb;
|
nb_rb_temp = nb_rb;
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) {
|
while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) {
|
||||||
if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] ==
|
if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) {
|
||||||
1) {
|
if (UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j])
|
||||||
if (UE_list->
|
printf("WARN: rballoc_subband not free for retrans?\n");
|
||||||
UE_template[CC_id]
|
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
||||||
[UE_id].rballoc_subband[harq_pid][j])
|
|
||||||
printf
|
|
||||||
("WARN: rballoc_subband not free for retrans?\n");
|
|
||||||
UE_list->
|
|
||||||
UE_template[CC_id]
|
|
||||||
[UE_id].rballoc_subband[harq_pid][j] =
|
|
||||||
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
|
||||||
|
|
||||||
if ((j == N_RBG[CC_id] - 1) &&
|
if ((j == N_RBG[CC_id] - 1) &&
|
||||||
((N_RB_DL[CC_id] == 25) ||
|
((N_RB_DL[CC_id] == 25) ||
|
||||||
(N_RB_DL[CC_id] == 50))) {
|
(N_RB_DL[CC_id] == 50))) {
|
||||||
nb_rb_temp =
|
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1;
|
||||||
nb_rb_temp - min_rb_unit[CC_id] +
|
|
||||||
1;
|
|
||||||
} else {
|
} else {
|
||||||
nb_rb_temp =
|
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
|
||||||
nb_rb_temp - min_rb_unit[CC_id];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -763,70 +733,42 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
default:
|
default:
|
||||||
LOG_D(MAC,"retransmission DL_REQ: rnti:%x\n",rnti);
|
LOG_D(MAC,"retransmission DL_REQ: rnti:%x\n",rnti);
|
||||||
|
|
||||||
dl_config_pdu =
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
&dl_req->dl_config_pdu_list[dl_req->
|
|
||||||
number_pdu];
|
|
||||||
memset((void *) dl_config_pdu, 0,
|
memset((void *) dl_config_pdu, 0,
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
sizeof(nfapi_dl_config_request_pdu_t));
|
||||||
dl_config_pdu->pdu_type =
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||||
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||||
dl_config_pdu->pdu_size =
|
|
||||||
(uint8_t) (2 +
|
|
||||||
sizeof(nfapi_dl_config_dci_dl_pdu));
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
|
||||||
dci_format = NFAPI_DL_DCI_FORMAT_1;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id),
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.aggregation_level =
|
|
||||||
get_aggregation(get_bw_index
|
|
||||||
(module_idP, CC_id),
|
|
||||||
ue_sched_ctl->dl_cqi[CC_id],
|
ue_sched_ctl->dl_cqi[CC_id],
|
||||||
format1);
|
format1);
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti =
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
|
||||||
rnti;
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||||
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
|
||||||
harq_process = harq_pid;
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
|
||||||
dci_dl_pdu_rel8.new_data_indicator_1 =
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid];
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3;
|
||||||
oldNDI[harq_pid];
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 =
|
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
|
||||||
oldmcs1[harq_pid];
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.redundancy_version_1 =
|
|
||||||
round & 3;
|
|
||||||
|
|
||||||
if (cc[CC_id].tdd_Config != NULL) { //TDD
|
if (cc[CC_id].tdd_Config != NULL) { //TDD
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3;
|
||||||
dci_dl_pdu_rel8.downlink_assignment_index =
|
|
||||||
(UE_list->UE_template[CC_id][UE_id].DAI -
|
|
||||||
1) & 3;
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n",
|
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n",
|
||||||
module_idP, CC_id, harq_pid, round,
|
module_idP, CC_id, harq_pid, round,
|
||||||
(UE_list->UE_template[CC_id][UE_id].DAI -
|
(UE_list->UE_template[CC_id][UE_id].DAI - 1),
|
||||||
1),
|
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]);
|
||||||
UE_list->
|
|
||||||
UE_template[CC_id][UE_id].oldmcs1
|
|
||||||
[harq_pid]);
|
|
||||||
} else {
|
} else {
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n",
|
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n",
|
||||||
module_idP, CC_id, harq_pid, round,
|
module_idP, CC_id, harq_pid, round,
|
||||||
UE_list->
|
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]);
|
||||||
UE_template[CC_id][UE_id].oldmcs1
|
|
||||||
[harq_pid]);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!CCE_allocation_infeasible
|
if (!CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
|
||||||
(module_idP, CC_id, 1, subframeP,
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, rnti)) {
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.aggregation_level, rnti)) {
|
|
||||||
dl_req->number_dci++;
|
dl_req->number_dci++;
|
||||||
dl_req->number_pdu++;
|
dl_req->number_pdu++;
|
||||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||||
@@ -878,16 +820,11 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
S_DL_SCHEDULED);
|
S_DL_SCHEDULED);
|
||||||
|
|
||||||
//eNB_UE_stats->dlsch_trials[round]++;
|
//eNB_UE_stats->dlsch_trials[round]++;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].
|
UE_list->eNB_UE_stats[CC_id][UE_id].num_retransmission += 1;
|
||||||
num_retransmission += 1;
|
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used_retx = nb_rb;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used_retx =
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_retx += nb_rb;
|
||||||
nb_rb;
|
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].
|
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = eNB_UE_stats->dlsch_mcs1;
|
||||||
total_rbs_used_retx += nb_rb;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 =
|
|
||||||
eNB_UE_stats->dlsch_mcs1;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 =
|
|
||||||
eNB_UE_stats->dlsch_mcs1;
|
|
||||||
} else {
|
} else {
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] Frame %d CC_id %d : don't schedule UE %d, its retransmission takes more resources than we have\n",
|
"[eNB %d] Frame %d CC_id %d : don't schedule UE %d, its retransmission takes more resources than we have\n",
|
||||||
@@ -906,8 +843,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
if (ue_sched_ctl->ta_timer == 0) {
|
if (ue_sched_ctl->ta_timer == 0) {
|
||||||
ta_update = ue_sched_ctl->ta_update;
|
ta_update = ue_sched_ctl->ta_update;
|
||||||
/* if we send TA then set timer to not send it for a while */
|
/* if we send TA then set timer to not send it for a while */
|
||||||
if (ta_update != 31)
|
if (ta_update != 31) ue_sched_ctl->ta_timer = 20;
|
||||||
ue_sched_ctl->ta_timer = 20;
|
|
||||||
/* reset ta_update */
|
/* reset ta_update */
|
||||||
ue_sched_ctl->ta_update = 31;
|
ue_sched_ctl->ta_update = 31;
|
||||||
} else {
|
} else {
|
||||||
@@ -943,11 +879,8 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
module_idP, CC_id, sdu_lengths[0]);
|
module_idP, CC_id, sdu_lengths[0]);
|
||||||
sdu_length_total = sdu_lengths[0];
|
sdu_length_total = sdu_lengths[0];
|
||||||
sdu_lcids[0] = DCCH;
|
sdu_lcids[0] = DCCH;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].
|
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[DCCH] += 1;
|
||||||
num_pdu_tx[DCCH] += 1;
|
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH] += sdu_lengths[0];
|
||||||
UE_list->
|
|
||||||
eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH]
|
|
||||||
+= sdu_lengths[0];
|
|
||||||
num_sdus = 1;
|
num_sdus = 1;
|
||||||
#ifdef DEBUG_eNB_SCHEDULER
|
#ifdef DEBUG_eNB_SCHEDULER
|
||||||
LOG_T(MAC,
|
LOG_T(MAC,
|
||||||
@@ -991,9 +924,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
header_len_dcch += 2;
|
header_len_dcch += 2;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].
|
UE_list->eNB_UE_stats[CC_id][UE_id].
|
||||||
num_pdu_tx[DCCH1] += 1;
|
num_pdu_tx[DCCH1] += 1;
|
||||||
UE_list->
|
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH1] += sdu_lengths[num_sdus];
|
||||||
eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH1]
|
|
||||||
+= sdu_lengths[num_sdus];
|
|
||||||
num_sdus++;
|
num_sdus++;
|
||||||
#ifdef DEBUG_eNB_SCHEDULER
|
#ifdef DEBUG_eNB_SCHEDULER
|
||||||
LOG_T(MAC,
|
LOG_T(MAC,
|
||||||
@@ -1132,31 +1063,22 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
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 < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band
|
for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
||||||
rballoc_subband[harq_pid][j] =
|
|
||||||
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nb_rb_temp = nb_rb;
|
nb_rb_temp = nb_rb;
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) {
|
while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) {
|
||||||
if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] ==
|
if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) {
|
||||||
1) {
|
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
||||||
UE_list->
|
|
||||||
UE_template[CC_id]
|
|
||||||
[UE_id].rballoc_subband[harq_pid][j] =
|
|
||||||
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
|
|
||||||
|
|
||||||
if ((j == N_RBG[CC_id] - 1) &&
|
if ((j == N_RBG[CC_id] - 1) &&
|
||||||
((N_RB_DL[CC_id] == 25) ||
|
((N_RB_DL[CC_id] == 25) ||
|
||||||
(N_RB_DL[CC_id] == 50))) {
|
(N_RB_DL[CC_id] == 50))) {
|
||||||
nb_rb_temp =
|
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1;
|
||||||
nb_rb_temp - min_rb_unit[CC_id] +
|
|
||||||
1;
|
|
||||||
} else {
|
} else {
|
||||||
nb_rb_temp =
|
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
|
||||||
nb_rb_temp - min_rb_unit[CC_id];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1165,17 +1087,13 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// decrease mcs until TBS falls below required length
|
// decrease mcs until TBS falls below required length
|
||||||
while ((TBS >
|
while ((TBS > (sdu_length_total + header_len_dcch + header_len_dtch + ta_len)) && (mcs > 0)) {
|
||||||
(sdu_length_total + header_len_dcch +
|
|
||||||
header_len_dtch + ta_len)) && (mcs > 0)) {
|
|
||||||
mcs--;
|
mcs--;
|
||||||
TBS = get_TBS_DL(mcs, nb_rb);
|
TBS = get_TBS_DL(mcs, nb_rb);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we have decreased too much or we don't have enough RBs, increase MCS
|
// if we have decreased too much or we don't have enough RBs, increase MCS
|
||||||
while ((TBS <
|
while ((TBS < (sdu_length_total + header_len_dcch + header_len_dtch + ta_len))
|
||||||
(sdu_length_total + header_len_dcch +
|
|
||||||
header_len_dtch + ta_len))
|
|
||||||
&& (((ue_sched_ctl->dl_pow_off[CC_id] > 0)
|
&& (((ue_sched_ctl->dl_pow_off[CC_id] > 0)
|
||||||
&& (mcs < 28))
|
&& (mcs < 28))
|
||||||
|| ((ue_sched_ctl->dl_pow_off[CC_id] == 0)
|
|| ((ue_sched_ctl->dl_pow_off[CC_id] == 0)
|
||||||
@@ -1196,11 +1114,8 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
// TBS, sdu_length_total, offset, TBS-sdu_length_total-offset);
|
// TBS, sdu_length_total, offset, TBS-sdu_length_total-offset);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((TBS - header_len_dcch - header_len_dtch -
|
if ((TBS - header_len_dcch - header_len_dtch - sdu_length_total - ta_len) <= 2) {
|
||||||
sdu_length_total - ta_len) <= 2) {
|
padding = (TBS - header_len_dcch - header_len_dtch - sdu_length_total - ta_len);
|
||||||
padding =
|
|
||||||
(TBS - header_len_dcch - header_len_dtch -
|
|
||||||
sdu_length_total - ta_len);
|
|
||||||
post_padding = 0;
|
post_padding = 0;
|
||||||
} else {
|
} else {
|
||||||
padding = 0;
|
padding = 0;
|
||||||
@@ -1245,16 +1160,13 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// cycle through SDUs and place in dlsch_buffer
|
// cycle through SDUs and place in dlsch_buffer
|
||||||
memcpy(&UE_list->
|
memcpy(&UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset],
|
||||||
DLSCH_pdu[CC_id][0][UE_id].payload[0][offset],
|
|
||||||
dlsch_buffer, sdu_length_total);
|
dlsch_buffer, sdu_length_total);
|
||||||
// memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]);
|
// memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]);
|
||||||
|
|
||||||
// fill remainder of DLSCH with random data
|
// fill remainder of DLSCH with random data
|
||||||
for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
|
for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
|
||||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].
|
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char) (taus() & 0xff);
|
||||||
payload[0][offset + sdu_length_total + j] =
|
|
||||||
(char) (taus() & 0xff);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1276,33 +1188,25 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].
|
T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].
|
||||||
payload[0], TBS));
|
payload[0], TBS));
|
||||||
|
|
||||||
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] =
|
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
|
||||||
nb_rb;
|
|
||||||
|
|
||||||
add_ue_dlsch_info(module_idP,
|
add_ue_dlsch_info(module_idP,
|
||||||
CC_id, UE_id, subframeP,
|
CC_id, UE_id, subframeP,
|
||||||
S_DL_SCHEDULED);
|
S_DL_SCHEDULED);
|
||||||
// store stats
|
// store stats
|
||||||
eNB->eNB_stats[CC_id].dlsch_bytes_tx +=
|
eNB->eNB_stats[CC_id].dlsch_bytes_tx += sdu_length_total;
|
||||||
sdu_length_total;
|
|
||||||
eNB->eNB_stats[CC_id].dlsch_pdus_tx += 1;
|
eNB->eNB_stats[CC_id].dlsch_pdus_tx += 1;
|
||||||
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb;
|
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used +=
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb;
|
||||||
nb_rb;
|
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 =
|
|
||||||
eNB_UE_stats->dlsch_mcs1;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs;
|
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS;
|
UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS;
|
||||||
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes =
|
UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = TBS - sdu_length_total;
|
||||||
TBS - sdu_length_total;
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_sdu_bytes += sdu_length_total;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_sdu_bytes +=
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes += TBS;
|
||||||
sdu_length_total;
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus += 1;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes +=
|
|
||||||
TBS;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus +=
|
|
||||||
1;
|
|
||||||
|
|
||||||
if (cc[CC_id].tdd_Config != NULL) { // TDD
|
if (cc[CC_id].tdd_Config != NULL) { // TDD
|
||||||
UE_list->UE_template[CC_id][UE_id].DAI++;
|
UE_list->UE_template[CC_id][UE_id].DAI++;
|
||||||
@@ -1320,29 +1224,19 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
|
|
||||||
// this assumes accumulated tpc
|
// this assumes accumulated tpc
|
||||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||||
int32_t framex10psubframe =
|
int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame * 10 + UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
|
||||||
pucch_tpc_tx_frame * 10 +
|
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
|
||||||
pucch_tpc_tx_subframe;
|
|
||||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case
|
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case
|
||||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around
|
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around
|
||||||
if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) {
|
if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) {
|
||||||
ue_sched_ctl->pucch1_cqi_update[CC_id] = 0;
|
ue_sched_ctl->pucch1_cqi_update[CC_id] = 0;
|
||||||
|
|
||||||
UE_list->
|
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP;
|
||||||
UE_template[CC_id]
|
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP;
|
||||||
[UE_id].pucch_tpc_tx_frame = frameP;
|
|
||||||
UE_list->
|
|
||||||
UE_template[CC_id]
|
|
||||||
[UE_id].pucch_tpc_tx_subframe = subframeP;
|
|
||||||
|
|
||||||
if (normalized_rx_power >
|
if (normalized_rx_power > (target_rx_power + 4)) {
|
||||||
(target_rx_power + 4)) {
|
|
||||||
tpc = 0; //-1
|
tpc = 0; //-1
|
||||||
tpc_accumulated--;
|
tpc_accumulated--;
|
||||||
} else if (normalized_rx_power <
|
} else if (normalized_rx_power < (target_rx_power - 4)) {
|
||||||
(target_rx_power - 4)) {
|
|
||||||
tpc = 2; //+1
|
tpc = 2; //+1
|
||||||
tpc_accumulated++;
|
tpc_accumulated++;
|
||||||
} else {
|
} else {
|
||||||
@@ -1363,19 +1257,13 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
tpc = 1; //0
|
tpc = 1; //0
|
||||||
}
|
}
|
||||||
|
|
||||||
dl_config_pdu =
|
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||||
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
|
||||||
memset((void *) dl_config_pdu, 0,
|
memset((void *) dl_config_pdu, 0,
|
||||||
sizeof(nfapi_dl_config_request_pdu_t));
|
sizeof(nfapi_dl_config_request_pdu_t));
|
||||||
dl_config_pdu->pdu_type =
|
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||||
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||||
dl_config_pdu->pdu_size =
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
|
||||||
(uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id),
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format =
|
|
||||||
NFAPI_DL_DCI_FORMAT_1;
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.aggregation_level =
|
|
||||||
get_aggregation(get_bw_index(module_idP, CC_id),
|
|
||||||
ue_sched_ctl->dl_cqi[CC_id],
|
ue_sched_ctl->dl_cqi[CC_id],
|
||||||
format1);
|
format1);
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
||||||
@@ -1383,26 +1271,16 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||||
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
|
||||||
harq_process = harq_pid;
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
|
||||||
dci_dl_pdu_rel8.new_data_indicator_1 =
|
|
||||||
1 -
|
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
|
||||||
oldNDI[harq_pid];
|
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||||
dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
|
||||||
//deactivate second codeword
|
//deactivate second codeword
|
||||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
|
||||||
dci_dl_pdu_rel8.redundancy_version_2 = 1;
|
|
||||||
if (cc[CC_id].tdd_Config != NULL) { //TDD
|
if (cc[CC_id].tdd_Config != NULL) { //TDD
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3;
|
||||||
dci_dl_pdu_rel8.downlink_assignment_index =
|
|
||||||
(UE_list->UE_template[CC_id][UE_id].DAI -
|
|
||||||
1) & 3;
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
|
"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
|
||||||
module_idP, CC_id, harq_pid,
|
module_idP, CC_id, harq_pid,
|
||||||
@@ -1416,8 +1294,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
LOG_D(MAC, "Checking feasibility pdu %d (new sdu)\n",
|
LOG_D(MAC, "Checking feasibility pdu %d (new sdu)\n",
|
||||||
dl_req->number_pdu);
|
dl_req->number_pdu);
|
||||||
if (!CCE_allocation_infeasible
|
if (!CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
|
||||||
(module_idP, CC_id, 1, subframeP,
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
dl_config_pdu->dci_dl_pdu.
|
||||||
dci_dl_pdu_rel8.aggregation_level, rnti)) {
|
dci_dl_pdu_rel8.aggregation_level, rnti)) {
|
||||||
|
|
||||||
@@ -1438,23 +1315,13 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
UE_list->
|
UE_list->
|
||||||
UE_template[CC_id][UE_id].oldNDI[harq_pid]);
|
UE_template[CC_id][UE_id].oldNDI[harq_pid]);
|
||||||
|
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid] = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
|
||||||
oldNDI[harq_pid] =
|
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
|
||||||
1 -
|
UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated !=
|
||||||
oldNDI[harq_pid];
|
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
|
||||||
oldmcs1[harq_pid] = mcs;
|
|
||||||
UE_list->UE_template[CC_id][UE_id].
|
|
||||||
oldmcs2[harq_pid] = 0;
|
|
||||||
AssertFatal(UE_list->UE_template[CC_id]
|
|
||||||
[UE_id].physicalConfigDedicated !=
|
|
||||||
NULL,
|
NULL,
|
||||||
"physicalConfigDedicated is NULL\n");
|
"physicalConfigDedicated is NULL\n");
|
||||||
AssertFatal(UE_list->UE_template[CC_id]
|
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated != NULL,
|
||||||
[UE_id].
|
|
||||||
physicalConfigDedicated->pdsch_ConfigDedicated
|
|
||||||
!= NULL,
|
|
||||||
"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
|
"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
|
||||||
|
|
||||||
fill_nfapi_dlsch_config(eNB, dl_req, TBS, eNB->pdu_index[CC_id], rnti, 0, // type 0 allocation from 7.1.6 in 36.213
|
fill_nfapi_dlsch_config(eNB, dl_req, TBS, eNB->pdu_index[CC_id], rnti, 0, // type 0 allocation from 7.1.6 in 36.213
|
||||||
@@ -1475,8 +1342,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
0, //number of PRBs treated as one subband, not used here
|
0, //number of PRBs treated as one subband, not used here
|
||||||
0 // number of beamforming vectors, not used here
|
0 // number of beamforming vectors, not used here
|
||||||
);
|
);
|
||||||
eNB->TX_req[CC_id].sfn_sf =
|
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->
|
||||||
fill_nfapi_tx_req(&eNB->
|
|
||||||
TX_req
|
TX_req
|
||||||
[CC_id].tx_request_body,
|
[CC_id].tx_request_body,
|
||||||
(frameP * 10) + subframeP,
|
(frameP * 10) + subframeP,
|
||||||
@@ -1519,8 +1385,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag);
|
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag);
|
||||||
|
|
||||||
stop_meas(&eNB->schedule_dlsch);
|
stop_meas(&eNB->schedule_dlsch);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT);
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1569,63 +1434,37 @@ fill_DLSCH_dci(module_id_t module_idP,
|
|||||||
LOG_T(MAC, "CC_id %d, UE_id: %d => status %d\n", CC_id, UE_id,
|
LOG_T(MAC, "CC_id %d, UE_id: %d => status %d\n", CC_id, UE_id,
|
||||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status);
|
eNB_dlsch_info[module_idP][CC_id][UE_id].status);
|
||||||
|
|
||||||
if (eNB_dlsch_info[module_idP][CC_id][UE_id].status ==
|
if (eNB_dlsch_info[module_idP][CC_id][UE_id].status == S_DL_SCHEDULED) {
|
||||||
S_DL_SCHEDULED) {
|
|
||||||
|
|
||||||
// clear scheduling flag
|
// clear scheduling flag
|
||||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status =
|
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING;
|
||||||
S_DL_WAITING;
|
|
||||||
rnti = UE_RNTI(module_idP, UE_id);
|
rnti = UE_RNTI(module_idP, UE_id);
|
||||||
if (cc->tdd_Config)
|
if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10;
|
||||||
harq_pid = ((frameP * 10) + subframeP) % 10;
|
else harq_pid = ((frameP * 10) + subframeP) & 7;
|
||||||
else
|
|
||||||
harq_pid = ((frameP * 10) + subframeP) & 7;
|
|
||||||
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];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Synchronizing rballoc with rballoc_sub
|
/// Synchronizing rballoc with rballoc_sub
|
||||||
for (i = 0; i < N_RBG; i++) {
|
for (i = 0; i < N_RBG; i++) {
|
||||||
rballoc_sub[i] =
|
rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i];
|
||||||
UE_list->
|
|
||||||
UE_template[CC_id][UE_id].rballoc_subband[harq_pid]
|
|
||||||
[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nfapi_dl_config_request_t *DL_req =
|
nfapi_dl_config_request_t *DL_req = &RC.mac[module_idP]->DL_req[0];
|
||||||
&RC.mac[module_idP]->DL_req[0];
|
|
||||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||||
|
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i < DL_req[CC_id].dl_config_request_body.number_pdu;
|
i < DL_req[CC_id].dl_config_request_body.number_pdu;
|
||||||
i++) {
|
i++) {
|
||||||
dl_config_pdu =
|
dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[i];
|
||||||
&DL_req[CC_id].
|
if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)
|
||||||
dl_config_request_body.dl_config_pdu_list[i];
|
&& (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti)
|
||||||
if ((dl_config_pdu->pdu_type ==
|
&& (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format != 1)) {
|
||||||
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,rballoc_sub);
|
||||||
&& (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
|
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0;
|
||||||
rnti == rnti)
|
|
||||||
&& (dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.dci_format != 1)) {
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.resource_block_coding =
|
|
||||||
allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,
|
|
||||||
rballoc_sub);
|
|
||||||
dl_config_pdu->dci_dl_pdu.
|
|
||||||
dci_dl_pdu_rel8.resource_allocation_type = 0;
|
|
||||||
} else
|
} else
|
||||||
if ((dl_config_pdu->pdu_type ==
|
if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE)
|
||||||
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE)
|
&& (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti == rnti)
|
||||||
&& (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
|
&& (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type == 0)) {
|
||||||
rnti == rnti)
|
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding =allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,rballoc_sub);
|
||||||
&& (dl_config_pdu->dlsch_pdu.
|
|
||||||
dlsch_pdu_rel8.resource_allocation_type ==
|
|
||||||
0)) {
|
|
||||||
dl_config_pdu->dlsch_pdu.
|
|
||||||
dlsch_pdu_rel8.resource_block_coding =
|
|
||||||
allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,
|
|
||||||
rballoc_sub);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1634,8 +1473,7 @@ fill_DLSCH_dci(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop_meas(&eNB->fill_DLSCH_dci);
|
stop_meas(&eNB->fill_DLSCH_dci);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_OUT);
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_OUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@@ -1652,8 +1490,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
|
|||||||
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d Get DLSCH sdu for BCCH \n",
|
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d Get DLSCH sdu for BCCH \n",
|
||||||
module_idP, CC_id, frameP);
|
module_idP, CC_id, frameP);
|
||||||
|
|
||||||
return ((unsigned char *) &eNB->common_channels[CC_id].
|
return ((unsigned char *) &eNB->common_channels[CC_id].BCCH_pdu.payload[0]);
|
||||||
BCCH_pdu.payload[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rntiP==P_RNTI) {
|
if (rntiP==P_RNTI) {
|
||||||
@@ -1668,8 +1505,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
|
|||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n",
|
"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n",
|
||||||
module_idP, frameP, CC_id, rntiP, UE_id);
|
module_idP, frameP, CC_id, rntiP, UE_id);
|
||||||
return ((unsigned char *) &eNB->
|
return ((unsigned char *) &eNB->UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]);
|
||||||
UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]);
|
|
||||||
} else {
|
} else {
|
||||||
LOG_E(MAC,
|
LOG_E(MAC,
|
||||||
"[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n",
|
"[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n",
|
||||||
@@ -1697,14 +1533,12 @@ update_ul_dci(module_id_t module_idP,
|
|||||||
|
|
||||||
if (cc->tdd_Config != NULL) { // TDD
|
if (cc->tdd_Config != NULL) { // TDD
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i <
|
i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci;
|
||||||
HI_DCI0_req->hi_dci0_request_body.number_of_dci +
|
i++) {
|
||||||
HI_DCI0_req->hi_dci0_request_body.number_of_dci; i++) {
|
|
||||||
|
|
||||||
if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) &&
|
if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) &&
|
||||||
(hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti == rntiP))
|
(hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti == rntiP))
|
||||||
hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.dl_assignment_index =
|
hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.dl_assignment_index = (daiP - 1) & 3;
|
||||||
(daiP - 1) & 3;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1811,7 +1645,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
|||||||
uint8_t n_vrb_dl = 0;
|
uint8_t n_vrb_dl = 0;
|
||||||
uint8_t Lcrbs = 0;
|
uint8_t Lcrbs = 0;
|
||||||
uint16_t rb_bit = 168; /* RB bit number value is unsure */
|
uint16_t rb_bit = 168; /* RB bit number value is unsure */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
start_meas(&eNB->schedule_pch);
|
start_meas(&eNB->schedule_pch);
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ extern uint8_t nfapi_mode;
|
|||||||
uint8_t rb_table[34] =
|
uint8_t rb_table[34] =
|
||||||
{ 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32,
|
{ 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32,
|
||||||
36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100
|
36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
rx_sdu(const module_id_t enb_mod_idP,
|
rx_sdu(const module_id_t enb_mod_idP,
|
||||||
@@ -132,20 +132,16 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
if (sduP != NULL) {
|
if (sduP != NULL) {
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_inactivity_timer = 0;
|
UE_list->UE_sched_ctrl[UE_id].ul_inactivity_timer = 0;
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
|
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &=
|
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= (~(1 << harq_pid));
|
||||||
(~(1 << harq_pid));
|
|
||||||
/* Update with smoothing: 3/4 of old value and 1/4 of new.
|
/* Update with smoothing: 3/4 of old value and 1/4 of new.
|
||||||
* This is the logic that was done in the function
|
* This is the logic that was done in the function
|
||||||
* lte_est_timing_advance_pusch, maybe it's not necessary?
|
* lte_est_timing_advance_pusch, maybe it's not necessary?
|
||||||
* maybe it's even not correct at all?
|
* maybe it's even not correct at all?
|
||||||
*/
|
*/
|
||||||
UE_list->UE_sched_ctrl[UE_id].ta_update =
|
UE_list->UE_sched_ctrl[UE_id].ta_update = (UE_list->UE_sched_ctrl[UE_id].ta_update * 3 + timing_advance) / 4;
|
||||||
(UE_list->UE_sched_ctrl[UE_id].ta_update * 3 +
|
|
||||||
timing_advance) / 4;
|
|
||||||
UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi;
|
UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi;
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_consecutive_errors = 0;
|
UE_list->UE_sched_ctrl[UE_id].ul_consecutive_errors = 0;
|
||||||
first_rb =
|
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
|
||||||
UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
|
|
||||||
|
|
||||||
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync > 0) {
|
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync > 0) {
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 0;
|
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 0;
|
||||||
@@ -161,14 +157,10 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
ul_cqi);
|
ul_cqi);
|
||||||
|
|
||||||
// AssertFatal(1==0,"ulsch in error\n");
|
// AssertFatal(1==0,"ulsch in error\n");
|
||||||
if (UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] ==
|
if (UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] == 3) {
|
||||||
3) {
|
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= (~(1 << harq_pid));
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &=
|
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] = 0;
|
||||||
(~(1 << harq_pid));
|
if (UE_list->UE_sched_ctrl[UE_id].ul_consecutive_errors++ == 10)
|
||||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] =
|
|
||||||
0;
|
|
||||||
if (UE_list->UE_sched_ctrl[UE_id].
|
|
||||||
ul_consecutive_errors++ == 10)
|
|
||||||
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 1;
|
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 1;
|
||||||
} else
|
} else
|
||||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid]++;
|
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid]++;
|
||||||
@@ -199,22 +191,17 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
(int) mac->common_channels[CC_idP].
|
(int) mac->common_channels[CC_idP].
|
||||||
radioResourceConfigCommon->rach_ConfigCommon.
|
radioResourceConfigCommon->rach_ConfigCommon.
|
||||||
maxHARQ_Msg3Tx);
|
maxHARQ_Msg3Tx);
|
||||||
if (ra[RA_id].msg3_round ==
|
if (ra[RA_id].msg3_round == mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||||
mac->common_channels[CC_idP].radioResourceConfigCommon->
|
|
||||||
rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
|
||||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
first_rb =
|
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
first_rb_ul[harq_pid];
|
|
||||||
ra[RA_id].msg3_round++;
|
ra[RA_id].msg3_round++;
|
||||||
// prepare handling of retransmission
|
// prepare handling of retransmission
|
||||||
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
|
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
|
||||||
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
|
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
|
||||||
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP,
|
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
|
||||||
subframeP);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -224,9 +211,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
current_rnti);
|
current_rnti);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
payload_ptr =
|
payload_ptr = parse_ulsch_header(sduP, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths, sdu_lenP);
|
||||||
parse_ulsch_header(sduP, &num_ce, &num_sdu, rx_ces, rx_lcids,
|
|
||||||
rx_lengths, sdu_lenP);
|
|
||||||
|
|
||||||
T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP),
|
T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP),
|
||||||
T_INT(current_rnti), T_INT(frameP), T_INT(subframeP),
|
T_INT(current_rnti), T_INT(frameP), T_INT(subframeP),
|
||||||
@@ -322,38 +307,23 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
payload_ptr[0] & 0x3f);
|
payload_ptr[0] & 0x3f);
|
||||||
if (UE_id != -1) {
|
if (UE_id != -1) {
|
||||||
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].bsr_info[lcgid] =
|
UE_list->UE_template[CC_idP][UE_id].bsr_info[lcgid] = (payload_ptr[0] & 0x3f);
|
||||||
(payload_ptr[0] & 0x3f);
|
|
||||||
|
|
||||||
// update buffer info
|
// update buffer info
|
||||||
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[lcgid] = BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].bsr_info[lcgid]];
|
||||||
ul_buffer_info[lcgid] =
|
|
||||||
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
bsr_info[lcgid]];
|
|
||||||
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[lcgid];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[lcgid];
|
|
||||||
|
|
||||||
RC.eNB[enb_mod_idP][CC_idP]->
|
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f);
|
||||||
pusch_stats_bsr[UE_id][(frameP * 10) + subframeP]
|
|
||||||
= (payload_ptr[0] & 0x3f);
|
|
||||||
if (UE_id == UE_list->head)
|
if (UE_id == UE_list->head)
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
|
||||||
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
|
|
||||||
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr
|
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr
|
||||||
[UE_id][(frameP * 10) + subframeP]);
|
[UE_id][(frameP * 10) + subframeP]);
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].
|
if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[lcgid] == 0) {
|
||||||
ul_buffer_creation_time[lcgid]
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[lcgid] = frameP;
|
||||||
== 0) {
|
|
||||||
UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].ul_buffer_creation_time[lcgid] =
|
|
||||||
frameP;
|
|
||||||
}
|
}
|
||||||
if (mac_eNB_get_rrc_status
|
if (mac_eNB_get_rrc_status(enb_mod_idP,UE_RNTI(enb_mod_idP, UE_id)) < RRC_CONNECTED)
|
||||||
(enb_mod_idP,
|
|
||||||
UE_RNTI(enb_mod_idP, UE_id)) < RRC_CONNECTED)
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] CC_id %d MAC CE_LCID %d : ul_total_buffer = %d (lcg increment %d)\n",
|
"[eNB %d] CC_id %d MAC CE_LCID %d : ul_total_buffer = %d (lcg increment %d)\n",
|
||||||
enb_mod_idP, CC_idP, rx_ces[i],
|
enb_mod_idP, CC_idP, rx_ces[i],
|
||||||
@@ -370,90 +340,44 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
|
|
||||||
case LONG_BSR:
|
case LONG_BSR:
|
||||||
if (UE_id != -1) {
|
if (UE_id != -1) {
|
||||||
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] =
|
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] = ((payload_ptr[0] & 0xFC) >> 2);
|
||||||
((payload_ptr[0] & 0xFC) >> 2);
|
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1] = ((payload_ptr[0] & 0x03) << 4) | ((payload_ptr[1] & 0xF0) >> 4);
|
||||||
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1] =
|
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2] = ((payload_ptr[1] & 0x0F) << 2) | ((payload_ptr[2] & 0xC0) >> 6);
|
||||||
((payload_ptr[0] & 0x03) << 4) |
|
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3] = (payload_ptr[2] & 0x3F);
|
||||||
((payload_ptr[1] & 0xF0) >> 4);
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2] =
|
|
||||||
((payload_ptr[1] & 0x0F) << 2) |
|
|
||||||
((payload_ptr[2] & 0xC0) >> 6);
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3] =
|
|
||||||
(payload_ptr[2] & 0x3F);
|
|
||||||
|
|
||||||
// update buffer info
|
// update buffer info
|
||||||
old_buffer_info =
|
old_buffer_info = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0] = BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0]];
|
||||||
ul_buffer_info[LCGID0];
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[LCGID0] =
|
|
||||||
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
bsr_info[LCGID0]];
|
|
||||||
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer += UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >= old_buffer_info)
|
||||||
ul_buffer_info[LCGID0];
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -= old_buffer_info;
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
|
else
|
||||||
old_buffer_info)
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer = 0;
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
|
|
||||||
|
old_buffer_info = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1];
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1] = BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1]];
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer += UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1];
|
||||||
|
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >= old_buffer_info) UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
|
||||||
old_buffer_info;
|
old_buffer_info;
|
||||||
else
|
else
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer = 0;
|
||||||
0;
|
|
||||||
|
|
||||||
old_buffer_info =
|
old_buffer_info = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2] = BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2]];
|
||||||
ul_buffer_info[LCGID1];
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer += UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >= old_buffer_info)
|
||||||
ul_buffer_info[LCGID1] =
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -= old_buffer_info;
|
||||||
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
bsr_info[LCGID1]];
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[LCGID1];
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
|
|
||||||
old_buffer_info)
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
|
|
||||||
old_buffer_info;
|
|
||||||
else
|
else
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer = 0;
|
||||||
0;
|
|
||||||
|
|
||||||
old_buffer_info =
|
old_buffer_info = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3] = BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3]];
|
||||||
ul_buffer_info[LCGID2];
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer += UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3];
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >= old_buffer_info)
|
||||||
ul_buffer_info[LCGID2] =
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -= old_buffer_info;
|
||||||
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
bsr_info[LCGID2]];
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[LCGID2];
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
|
|
||||||
old_buffer_info)
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
|
|
||||||
old_buffer_info;
|
|
||||||
else
|
else
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
|
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer = 0;
|
||||||
0;
|
|
||||||
|
|
||||||
old_buffer_info =
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[LCGID3];
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[LCGID3] =
|
|
||||||
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
bsr_info[LCGID3]];
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[LCGID3];
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
|
|
||||||
old_buffer_info)
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
|
|
||||||
old_buffer_info;
|
|
||||||
else
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
|
|
||||||
0;
|
|
||||||
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = "
|
"[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = "
|
||||||
@@ -478,44 +402,28 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
UE_list->UE_template[CC_idP][UE_id].
|
UE_list->UE_template[CC_idP][UE_id].
|
||||||
bsr_info[LCGID3]);
|
bsr_info[LCGID3]);
|
||||||
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] ==
|
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] == 0) {
|
||||||
0) {
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0] = 0;
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
} else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0] == 0) {
|
||||||
ul_buffer_creation_time[LCGID0] = 0;
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0] = frameP;
|
||||||
} else if (UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].ul_buffer_creation_time[LCGID0] == 0) {
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_creation_time[LCGID0] = frameP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1] ==
|
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1] == 0) {
|
||||||
0) {
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID1] = 0;
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
} else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID1] == 0) {
|
||||||
ul_buffer_creation_time[LCGID1] = 0;
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID1] = frameP;
|
||||||
} else if (UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].ul_buffer_creation_time[LCGID1] == 0) {
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_creation_time[LCGID1] = frameP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2] ==
|
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2] == 0) {
|
||||||
0) {
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID2] = 0;
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
} else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID2] == 0) {
|
||||||
ul_buffer_creation_time[LCGID2] = 0;
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID2] = frameP;
|
||||||
} else if (UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].ul_buffer_creation_time[LCGID2] == 0) {
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_creation_time[LCGID2] = frameP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3] ==
|
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3] == 0) {
|
||||||
0) {
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID3] = 0;
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
} else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID3] == 0) {
|
||||||
ul_buffer_creation_time[LCGID3] = 0;
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID3] = frameP;
|
||||||
} else if (UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].ul_buffer_creation_time[LCGID3] == 0) {
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_creation_time[LCGID3] = frameP;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -558,10 +466,8 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
enb_mod_idP, CC_idP, frameP, payload_ptr[0],
|
enb_mod_idP, CC_idP, frameP, payload_ptr[0],
|
||||||
payload_ptr[1], payload_ptr[2], payload_ptr[3],
|
payload_ptr[1], payload_ptr[2], payload_ptr[3],
|
||||||
payload_ptr[4], payload_ptr[5], current_rnti);
|
payload_ptr[4], payload_ptr[5], current_rnti);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 1);
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 0);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 0);
|
|
||||||
for (ii = 0; ii < NB_RA_PROC_MAX; ii++) {
|
for (ii = 0; ii < NB_RA_PROC_MAX; ii++) {
|
||||||
RA_t *ra = &mac->common_channels[CC_idP].ra[ii];
|
RA_t *ra = &mac->common_channels[CC_idP].ra[ii];
|
||||||
|
|
||||||
@@ -581,8 +487,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
enb_mod_idP, CC_idP, frameP, rx_lengths[i],
|
enb_mod_idP, CC_idP, frameP, rx_lengths[i],
|
||||||
payload_ptr - sduP);
|
payload_ptr - sduP);
|
||||||
|
|
||||||
if ((UE_id =
|
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP,
|
||||||
add_new_ue(enb_mod_idP, CC_idP,
|
|
||||||
mac->common_channels[CC_idP].
|
mac->common_channels[CC_idP].
|
||||||
ra[ii].rnti, harq_pid
|
ra[ii].rnti, harq_pid
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
@@ -650,18 +555,10 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
|
|
||||||
if (UE_id != -1) {
|
if (UE_id != -1) {
|
||||||
// adjust buffer occupancy of the correponding logical channel group
|
// adjust buffer occupancy of the correponding logical channel group
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].
|
if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] >= rx_lengths[i])
|
||||||
ul_buffer_info[UE_list->UE_template[CC_idP]
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] -= rx_lengths[i];
|
||||||
[UE_id].lcgidmap[rx_lcids[i]]] >=
|
|
||||||
rx_lengths[i])
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].lcgidmap[rx_lcids[i]]] -=
|
|
||||||
rx_lengths[i];
|
|
||||||
else
|
else
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] = 0;
|
||||||
ul_buffer_info[UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].lcgidmap[rx_lcids[i]]] = 0;
|
|
||||||
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n",
|
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n",
|
||||||
@@ -669,11 +566,8 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
rx_lcids[i]);
|
rx_lcids[i]);
|
||||||
|
|
||||||
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
|
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].
|
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
|
||||||
num_pdu_rx[rx_lcids[i]] += 1;
|
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].
|
|
||||||
num_bytes_rx[rx_lcids[i]]
|
|
||||||
+= rx_lengths[i];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -712,31 +606,19 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
ul_buffer_info[UE_list->UE_template[CC_idP]
|
ul_buffer_info[UE_list->UE_template[CC_idP]
|
||||||
[UE_id].lcgidmap[rx_lcids[i]]]);
|
[UE_id].lcgidmap[rx_lcids[i]]]);
|
||||||
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].
|
if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] >= rx_lengths[i])
|
||||||
ul_buffer_info[UE_list->UE_template[CC_idP]
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] -= rx_lengths[i];
|
||||||
[UE_id].lcgidmap[rx_lcids[i]]]
|
|
||||||
>= rx_lengths[i])
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].
|
|
||||||
ul_buffer_info[UE_list->UE_template[CC_idP]
|
|
||||||
[UE_id].lcgidmap[rx_lcids[i]]]
|
|
||||||
-= rx_lengths[i];
|
|
||||||
else
|
else
|
||||||
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info
|
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] = 0;
|
||||||
[UE_list->UE_template[CC_idP][UE_id].lcgidmap
|
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
|
||||||
[rx_lcids[i]]] = 0;
|
|
||||||
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX)
|
|
||||||
&& (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
|
|
||||||
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
|
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
|
||||||
|
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].
|
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
|
||||||
num_pdu_rx[rx_lcids[i]] += 1;
|
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].
|
|
||||||
num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
|
||||||
//clear uplane_inactivity_timer
|
//clear uplane_inactivity_timer
|
||||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||||
} else { /* rx_length[i] */
|
} else { /* rx_length[i] */
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].
|
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
|
||||||
num_errors_rx += 1;
|
|
||||||
LOG_E(MAC,
|
LOG_E(MAC,
|
||||||
"[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ",
|
"[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ",
|
||||||
enb_mod_idP, CC_idP, frameP, rx_lcids[i],
|
enb_mod_idP, CC_idP, frameP, rx_lcids[i],
|
||||||
@@ -790,14 +672,12 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
} else {
|
} else {
|
||||||
if (UE_id != -1) {
|
if (UE_id != -1) {
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].pdu_bytes_rx = sdu_lenP;
|
UE_list->eNB_UE_stats[CC_idP][UE_id].pdu_bytes_rx = sdu_lenP;
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].total_pdu_bytes_rx +=
|
UE_list->eNB_UE_stats[CC_idP][UE_id].total_pdu_bytes_rx += sdu_lenP;
|
||||||
sdu_lenP;
|
|
||||||
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_pdus_rx += 1;
|
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_pdus_rx += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 0);
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 0);
|
|
||||||
stop_meas(&mac->rx_ulsch_sdu);
|
stop_meas(&mac->rx_ulsch_sdu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -820,8 +700,7 @@ void
|
|||||||
add_ue_ulsch_info(module_id_t module_idP, int CC_id, int UE_id,
|
add_ue_ulsch_info(module_id_t module_idP, int CC_id, int UE_id,
|
||||||
sub_frame_t subframeP, UE_ULSCH_STATUS status)
|
sub_frame_t subframeP, UE_ULSCH_STATUS status)
|
||||||
{
|
{
|
||||||
eNB_ulsch_info[module_idP][CC_id][UE_id].rnti =
|
eNB_ulsch_info[module_idP][CC_id][UE_id].rnti = UE_RNTI(module_idP, UE_id);
|
||||||
UE_RNTI(module_idP, UE_id);
|
|
||||||
eNB_ulsch_info[module_idP][CC_id][UE_id].subframe = subframeP;
|
eNB_ulsch_info[module_idP][CC_id][UE_id].subframe = subframeP;
|
||||||
eNB_ulsch_info[module_idP][CC_id][UE_id].status = status;
|
eNB_ulsch_info[module_idP][CC_id][UE_id].status = status;
|
||||||
|
|
||||||
@@ -852,8 +731,7 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
|
|||||||
if (lcid < EXTENDED_POWER_HEADROOM) {
|
if (lcid < EXTENDED_POWER_HEADROOM) {
|
||||||
if (not_done == 0) { // last MAC SDU, length is implicit
|
if (not_done == 0) { // last MAC SDU, length is implicit
|
||||||
mac_header_ptr++;
|
mac_header_ptr++;
|
||||||
length =
|
length = tb_length - (mac_header_ptr - mac_header) - ce_len;
|
||||||
tb_length - (mac_header_ptr - mac_header) - ce_len;
|
|
||||||
|
|
||||||
for (num_sdu_cnt = 0; num_sdu_cnt < num_sdus;
|
for (num_sdu_cnt = 0; num_sdu_cnt < num_sdus;
|
||||||
num_sdu_cnt++) {
|
num_sdu_cnt++) {
|
||||||
@@ -1133,7 +1011,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
} */
|
} */
|
||||||
if (drop_ue == 1) {
|
if (drop_ue == 1) {
|
||||||
/* we can't come here, ulsch_scheduler_pre_processor won't put in the list a UE with no PHY context */
|
/* we can't come here, ulsch_scheduler_pre_processor won't put in the list a UE with no PHY context */
|
||||||
abort();
|
abort();
|
||||||
/* TODO: this is a hack. Sometimes the UE has no PHY context but
|
/* TODO: this is a hack. Sometimes the UE has no PHY context but
|
||||||
* is still present in the MAC with 'ul_failure_timer' = 0 and
|
* is still present in the MAC with 'ul_failure_timer' = 0 and
|
||||||
@@ -1186,8 +1064,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
|
|
||||||
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
||||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||||
harq_pid =
|
harq_pid = subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
|
||||||
subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
|
|
||||||
round = UE_sched_ctrl->round_UL[CC_id][harq_pid];
|
round = UE_sched_ctrl->round_UL[CC_id][harq_pid];
|
||||||
AssertFatal(round < 8, "round %d > 7 for UE %d/%x\n", round,
|
AssertFatal(round < 8, "round %d > 7 for UE %d/%x\n", round,
|
||||||
UE_id, rnti);
|
UE_id, rnti);
|
||||||
@@ -1200,9 +1077,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
10) +
|
10) +
|
||||||
subframeP] =
|
subframeP] =
|
||||||
UE_template->ul_total_buffer;
|
UE_template->ul_total_buffer;
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP *
|
||||||
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,
|
|
||||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP *
|
|
||||||
10) +
|
10) +
|
||||||
subframeP]);
|
subframeP]);
|
||||||
if (UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0 || round > 0) // || ((frameP%10)==0))
|
if (UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0 || round > 0) // || ((frameP%10)==0))
|
||||||
@@ -1239,9 +1114,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
|
|
||||||
// this assumes accumulated tpc
|
// this assumes accumulated tpc
|
||||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||||
int32_t framex10psubframe =
|
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
|
||||||
UE_template->pusch_tpc_tx_frame * 10 +
|
|
||||||
UE_template->pusch_tpc_tx_subframe;
|
|
||||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case
|
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case
|
||||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around
|
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around
|
||||||
{
|
{
|
||||||
@@ -1274,10 +1147,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
UE_template->oldNDI_UL[harq_pid] = ndi;
|
UE_template->oldNDI_UL[harq_pid] = ndi;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].
|
UE_list->eNB_UE_stats[CC_id][UE_id].
|
||||||
normalized_rx_power = normalized_rx_power;
|
normalized_rx_power = normalized_rx_power;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power =
|
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power;
|
||||||
target_rx_power;
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = UE_template->pre_assigned_mcs_ul;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 =
|
|
||||||
UE_template->pre_assigned_mcs_ul;
|
|
||||||
UE_template->mcs_UL[harq_pid] = UE_template->pre_assigned_mcs_ul; //cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
UE_template->mcs_UL[harq_pid] = UE_template->pre_assigned_mcs_ul; //cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
||||||
if (UE_template->pre_allocated_rb_table_index_ul >= 0) {
|
if (UE_template->pre_allocated_rb_table_index_ul >= 0) {
|
||||||
rb_table_index =
|
rb_table_index =
|
||||||
@@ -1287,8 +1158,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
rb_table_index = 5; // for PHR
|
rb_table_index = 5; // for PHR
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 =
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
|
||||||
UE_template->mcs_UL[harq_pid];
|
|
||||||
// buffer_occupancy = UE_template->ul_total_buffer;
|
// buffer_occupancy = UE_template->ul_total_buffer;
|
||||||
|
|
||||||
|
|
||||||
@@ -1299,13 +1169,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
rb_table_index--;
|
rb_table_index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_template->TBS_UL[harq_pid] =
|
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],
|
||||||
get_TBS_UL(UE_template->mcs_UL[harq_pid],
|
|
||||||
rb_table[rb_table_index]);
|
rb_table[rb_table_index]);
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += rb_table[rb_table_index];
|
||||||
total_rbs_used_rx += rb_table[rb_table_index];
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = UE_template->TBS_UL[harq_pid];
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS =
|
|
||||||
UE_template->TBS_UL[harq_pid];
|
|
||||||
// buffer_occupancy -= TBS;
|
// buffer_occupancy -= TBS;
|
||||||
|
|
||||||
T(T_ENB_MAC_UE_UL_SCHEDULE, T_INT(module_idP),
|
T(T_ENB_MAC_UE_UL_SCHEDULE, T_INT(module_idP),
|
||||||
@@ -1316,8 +1183,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
T_INT(rb_table[rb_table_index]),
|
T_INT(rb_table[rb_table_index]),
|
||||||
T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi));
|
T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi));
|
||||||
|
|
||||||
if (mac_eNB_get_rrc_status(module_idP, rnti) <
|
if (mac_eNB_get_rrc_status(module_idP, rnti) < RRC_CONNECTED)
|
||||||
RRC_CONNECTED)
|
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n",
|
"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n",
|
||||||
module_idP, harq_pid, rnti, CC_id, frameP,
|
module_idP, harq_pid, rnti, CC_id, frameP,
|
||||||
@@ -1329,14 +1195,12 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
|
|
||||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||||
//store for possible retransmission
|
//store for possible retransmission
|
||||||
UE_template->nb_rb_ul[harq_pid] =
|
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
|
||||||
rb_table[rb_table_index];
|
|
||||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||||
|
|
||||||
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
|
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
|
||||||
if (UE_id == UE_list->head)
|
if (UE_id == UE_list->head)
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
|
||||||
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
|
|
||||||
UE_sched_ctrl->ul_scheduled);
|
UE_sched_ctrl->ul_scheduled);
|
||||||
|
|
||||||
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
|
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
|
||||||
@@ -1345,10 +1209,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
module_idP, CC_id, UE_id, rnti,
|
module_idP, CC_id, UE_id, rnti,
|
||||||
UE_template->ul_total_buffer,
|
UE_template->ul_total_buffer,
|
||||||
UE_template->TBS_UL[harq_pid]);
|
UE_template->TBS_UL[harq_pid]);
|
||||||
if (UE_template->ul_total_buffer >
|
if (UE_template->ul_total_buffer > UE_template->TBS_UL[harq_pid])
|
||||||
UE_template->TBS_UL[harq_pid])
|
UE_template->ul_total_buffer -= UE_template->TBS_UL[harq_pid];
|
||||||
UE_template->ul_total_buffer -=
|
|
||||||
UE_template->TBS_UL[harq_pid];
|
|
||||||
else
|
else
|
||||||
UE_template->ul_total_buffer = 0;
|
UE_template->ul_total_buffer = 0;
|
||||||
LOG_D(MAC, "ul_total_buffer, new %d\n",
|
LOG_D(MAC, "ul_total_buffer, new %d\n",
|
||||||
@@ -1359,37 +1221,23 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
UE_template->cshift[harq_pid] = cshift;
|
UE_template->cshift[harq_pid] = cshift;
|
||||||
|
|
||||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||||
memset((void *) hi_dci0_pdu, 0,
|
memset((void *) hi_dci0_pdu, 0,sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||||
sizeof(nfapi_hi_dci0_request_pdu_t));
|
|
||||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||||
hi_dci0_pdu->pdu_size =
|
hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_dci_pdu);
|
||||||
2 + sizeof(nfapi_hi_dci0_dci_pdu);
|
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG;
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format =
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
|
||||||
NFAPI_UL_DCI_FORMAT_0;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level =
|
|
||||||
aggregation;
|
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power =
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
|
||||||
6000;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id];
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = rb_table[rb_table_index];
|
||||||
resource_block_start = first_rb[CC_id];
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = UE_template->mcs_UL[harq_pid];
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift;
|
||||||
number_of_resource_block =
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag = 0;
|
||||||
rb_table[rb_table_index];
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1 = ndi;
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 =
|
|
||||||
UE_template->mcs_UL[harq_pid];
|
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
|
|
||||||
cyclic_shift_2_for_drms = cshift;
|
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
|
|
||||||
frequency_hopping_enabled_flag = 0;
|
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
|
|
||||||
new_data_indication_1 = ndi;
|
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request =
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||||
cqi_req;
|
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframeP];
|
||||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index =
|
|
||||||
UE_template->DAI_ul[sched_subframeP];
|
|
||||||
|
|
||||||
hi_dci0_req_body->number_of_dci++;
|
hi_dci0_req_body->number_of_dci++;
|
||||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP, subframeP, 4);
|
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP, subframeP, 4);
|
||||||
@@ -1464,14 +1312,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
memset((void *) hi_dci0_pdu, 0,
|
memset((void *) hi_dci0_pdu, 0,
|
||||||
sizeof(nfapi_hi_dci0_request_pdu_t));
|
sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
|
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
|
||||||
hi_dci0_pdu->pdu_size =
|
hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_hi_pdu);
|
||||||
2 + sizeof(nfapi_hi_dci0_hi_pdu);
|
|
||||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
|
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
|
||||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start =
|
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||||
UE_template->first_rb_ul[harq_pid];
|
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = UE_template->cshift[harq_pid];
|
||||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.
|
|
||||||
cyclic_shift_2_for_drms =
|
|
||||||
UE_template->cshift[harq_pid];
|
|
||||||
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0;
|
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0;
|
||||||
hi_dci0_req_body->number_of_hi++;
|
hi_dci0_req_body->number_of_hi++;
|
||||||
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0);
|
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user