Commit 5443c7a7 authored by Robert Schmidt's avatar Robert Schmidt

fill_nfapi_dlsch_config() takes index for filling

parent 0f46f17c
...@@ -1030,7 +1030,11 @@ generate_Msg4(module_id_t module_idP, ...@@ -1030,7 +1030,11 @@ generate_Msg4(module_id_t module_idP,
memcpy((void *) &mac->UE_info.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0][(unsigned char)offset], memcpy((void *) &mac->UE_info.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0][(unsigned char)offset],
&cc[CC_idP].CCCH_pdu.payload[0], rrc_sdu_length); &cc[CC_idP].CCCH_pdu.payload[0], rrc_sdu_length);
// DLSCH Config // DLSCH Config
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize, mac->pdu_index[CC_idP], ra->rnti, 2, // resource_allocation_type : format 1A/1B/1D fill_nfapi_dlsch_config(&dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu],
ra->msg4_TBsize,
mac->pdu_index[CC_idP],
ra->rnti,
2, // resource_allocation_type : format 1A/1B/1D
0, // virtual_resource_block_assignment_flag : localized 0, // virtual_resource_block_assignment_flag : localized
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding : RIV, 4 PRB getRIV(N_RB_DL, first_rb, 4), // resource_block_coding : RIV, 4 PRB
2, // modulation: QPSK 2, // modulation: QPSK
...@@ -1049,6 +1053,7 @@ generate_Msg4(module_id_t module_idP, ...@@ -1049,6 +1053,7 @@ generate_Msg4(module_id_t module_idP,
(cc->p_eNB == 1) ? 1 : 2, // transmission mode (cc->p_eNB == 1) ? 1 : 2, // transmission mode
1, // num_bf_prb_per_subband 1, // num_bf_prb_per_subband
1); // num_bf_vector 1); // num_bf_vector
dl_req_body->number_pdu++;
LOG_D(MAC, LOG_D(MAC,
"Filled DLSCH config, pdu number %d, non-dci pdu_index %d\n", "Filled DLSCH config, pdu number %d, non-dci pdu_index %d\n",
dl_req_body->number_pdu, mac->pdu_index[CC_idP]); dl_req_body->number_pdu, mac->pdu_index[CC_idP]);
...@@ -1173,7 +1178,8 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP, ...@@ -1173,7 +1178,8 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
// DLSCH Config // DLSCH Config
//DJP - fix this pdu_index = -1 //DJP - fix this pdu_index = -1
LOG_D(MAC, "check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n"); LOG_D(MAC, "check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize, fill_nfapi_dlsch_config(&dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu],
ra->msg4_TBsize,
-1 -1
/* retransmission, no pdu_index */ /* retransmission, no pdu_index */
, ra->rnti, 2, // resource_allocation_type : format 1A/1B/1D , ra->rnti, 2, // resource_allocation_type : format 1A/1B/1D
...@@ -1195,6 +1201,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP, ...@@ -1195,6 +1201,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
(cc->p_eNB == 1) ? 1 : 2, // transmission mode (cc->p_eNB == 1) ? 1 : 2, // transmission mode
1, // num_bf_prb_per_subband 1, // num_bf_prb_per_subband
1); // num_bf_vector 1); // num_bf_vector
dl_req_body->number_pdu++;
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) { if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti); set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
......
...@@ -779,8 +779,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -779,8 +779,7 @@ schedule_ue_spec(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;
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP; eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
fill_nfapi_dlsch_config(eNB, fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
dl_req,
TBS, TBS,
-1, // retransmission, no pdu_index -1, // retransmission, no pdu_index
rnti, rnti,
...@@ -803,6 +802,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -803,6 +802,7 @@ schedule_ue_spec(module_id_t module_idP,
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
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
dl_req->number_pdu++;
LOG_D(MAC, "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n", LOG_D(MAC, "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",
eNB->pdu_index[CC_id], eNB->pdu_index[CC_id],
round_DL); round_DL);
...@@ -1202,8 +1202,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1202,8 +1202,7 @@ schedule_ue_spec(module_id_t module_idP,
AssertFatal(ue_template->physicalConfigDedicated != NULL, "physicalConfigDedicated is NULL\n"); AssertFatal(ue_template->physicalConfigDedicated != NULL, "physicalConfigDedicated is NULL\n");
AssertFatal(ue_template->physicalConfigDedicated->pdsch_ConfigDedicated != NULL, AssertFatal(ue_template->physicalConfigDedicated->pdsch_ConfigDedicated != NULL,
"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n"); "physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
fill_nfapi_dlsch_config(eNB, fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
dl_req,
TBS, TBS,
eNB->pdu_index[CC_id], eNB->pdu_index[CC_id],
rnti, rnti,
...@@ -1226,6 +1225,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1226,6 +1225,7 @@ schedule_ue_spec(module_id_t module_idP,
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
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
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body, eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP * 10) + subframeP, (frameP * 10) + subframeP,
TBS, TBS,
......
...@@ -1493,7 +1493,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1493,7 +1493,9 @@ schedule_ue_spec_fairRR(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;
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP; eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
fill_nfapi_dlsch_config(eNB, dl_req, TBS, -1 fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
-1
/* retransmission, no pdu_index */ /* retransmission, no pdu_index */
, rnti, 0, // type 0 allocation from 7.1.6 in 36.213 , rnti, 0, // type 0 allocation from 7.1.6 in 36.213
0, // virtual_resource_block_assignment_flag, unused here 0, // virtual_resource_block_assignment_flag, unused here
...@@ -1513,6 +1515,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1513,6 +1515,7 @@ schedule_ue_spec_fairRR(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
); );
dl_req->number_pdu++;
LOG_D(MAC, LOG_D(MAC,
"Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n", "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",
eNB->pdu_index[CC_id], round); eNB->pdu_index[CC_id], round);
...@@ -2077,7 +2080,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -2077,7 +2080,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
UE_info->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0; UE_info->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n"); AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n"); AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
fill_nfapi_dlsch_config(eNB,dl_req, fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS, TBS,
eNB->pdu_index[CC_id], eNB->pdu_index[CC_id],
rnti, rnti,
...@@ -2101,6 +2104,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -2101,6 +2104,7 @@ schedule_ue_spec_fairRR(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
); );
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body, eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP, (frameP*10)+subframeP,
TBS, TBS,
......
...@@ -141,8 +141,7 @@ schedule_ue_spec_phy_test( ...@@ -141,8 +141,7 @@ schedule_ue_spec_phy_test(
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n"); AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n"); AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
*/ */
fill_nfapi_dlsch_config(eNB, fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
dl_req,
TBS, TBS,
eNB->pdu_index[CC_id], eNB->pdu_index[CC_id],
rnti, rnti,
...@@ -166,6 +165,7 @@ schedule_ue_spec_phy_test( ...@@ -166,6 +165,7 @@ schedule_ue_spec_phy_test(
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
); );
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body, eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP, (frameP*10)+subframeP,
TBS, TBS,
......
...@@ -1619,8 +1619,7 @@ fill_nfapi_mch_config(nfapi_dl_config_request_body_t *dl_req, ...@@ -1619,8 +1619,7 @@ fill_nfapi_mch_config(nfapi_dl_config_request_body_t *dl_req,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void void
fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, fill_nfapi_dlsch_config(nfapi_dl_config_request_pdu_t *dl_config_pdu,
nfapi_dl_config_request_body_t *dl_req,
uint16_t length, uint16_t length,
int16_t pdu_index, int16_t pdu_index,
uint16_t rnti, uint16_t rnti,
...@@ -1646,7 +1645,6 @@ fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, ...@@ -1646,7 +1645,6 @@ fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
uint8_t num_bf_vector) uint8_t num_bf_vector)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
nfapi_dl_config_request_pdu_t *dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t)); memset((void *) dl_config_pdu, 0, 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 = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu)); dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
...@@ -1673,7 +1671,6 @@ fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, ...@@ -1673,7 +1671,6 @@ fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = transmission_mode; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = transmission_mode;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector;
dl_req->number_pdu++;
return; return;
} }
......
...@@ -1090,8 +1090,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP, ...@@ -1090,8 +1090,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
frame_t frameP, sub_frame_t subframeP, frame_t frameP, sub_frame_t subframeP,
uint8_t cce_idx); uint8_t cce_idx);
void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, void fill_nfapi_dlsch_config(nfapi_dl_config_request_pdu_t *dl_config_pdu,
nfapi_dl_config_request_body_t *dl_req,
uint16_t length, int16_t pdu_index, uint16_t length, int16_t pdu_index,
uint16_t rnti, uint16_t rnti,
uint8_t resource_allocation_type, uint8_t resource_allocation_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment