Commit 546ad9b2 authored by wujing's avatar wujing

fix issues about enb seperate into rrc and rru

parent 11df1684
...@@ -850,6 +850,10 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request ...@@ -850,6 +850,10 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
nfapi_dl_config_dlsch_pdu *dlsch_pdu = &dl_config_pdu_list[i].dlsch_pdu; nfapi_dl_config_dlsch_pdu *dlsch_pdu = &dl_config_pdu_list[i].dlsch_pdu;
nfapi_dl_config_dlsch_pdu_rel8_t *rel8_pdu = &dlsch_pdu->dlsch_pdu_rel8; nfapi_dl_config_dlsch_pdu_rel8_t *rel8_pdu = &dlsch_pdu->dlsch_pdu_rel8;
if (rel8_pdu->pdu_index < 0) {
handle_nfapi_dlsch_pdu( eNB, sfn,sf, &eNB->proc.proc_rxtx[0], &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, NULL);
} else {
nfapi_tx_request_pdu_t *tx_pdu = tx_request_pdu[sfn][sf][rel8_pdu->pdu_index]; nfapi_tx_request_pdu_t *tx_pdu = tx_request_pdu[sfn][sf][rel8_pdu->pdu_index];
if (tx_pdu != NULL) { if (tx_pdu != NULL) {
...@@ -875,6 +879,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request ...@@ -875,6 +879,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index);
} }
}
} else { } else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() UNKNOWN:%d\n", __FUNCTION__, dl_config_pdu_list[i].pdu_type); NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() UNKNOWN:%d\n", __FUNCTION__, dl_config_pdu_list[i].pdu_type);
......
...@@ -645,7 +645,7 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config* config, nfapi_cqi_indication_ ...@@ -645,7 +645,7 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config* config, nfapi_cqi_indication_
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.cqi_ind = ind->cqi_indication_body; eNB->UL_INFO.cqi_ind.cqi_indication_body = ind->cqi_indication_body;
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
......
...@@ -1716,8 +1716,9 @@ int getM(PHY_VARS_eNB *eNB,int frame,int subframe) { ...@@ -1716,8 +1716,9 @@ int getM(PHY_VARS_eNB *eNB,int frame,int subframe) {
void fill_ulsch_cqi_indication(PHY_VARS_eNB *eNB,uint16_t frame,uint8_t subframe,LTE_UL_eNB_HARQ_t *ulsch_harq,uint16_t rnti) { void fill_ulsch_cqi_indication(PHY_VARS_eNB *eNB,uint16_t frame,uint8_t subframe,LTE_UL_eNB_HARQ_t *ulsch_harq,uint16_t rnti) {
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_cqi_indication_pdu_t *pdu = &eNB->UL_INFO.cqi_ind.cqi_pdu_list[eNB->UL_INFO.cqi_ind.number_of_cqis]; nfapi_cqi_indication_pdu_t *pdu = &eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_pdu_list[eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis];
nfapi_cqi_indication_raw_pdu_t *raw_pdu = &eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list[eNB->UL_INFO.cqi_ind.number_of_cqis]; nfapi_cqi_indication_raw_pdu_t *raw_pdu = &eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_raw_pdu_list[eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis];
pdu->instance_length = 0;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = rnti; pdu->rx_ue_information.rnti = rnti;
...@@ -1738,9 +1739,11 @@ void fill_ulsch_cqi_indication(PHY_VARS_eNB *eNB,uint16_t frame,uint8_t subframe ...@@ -1738,9 +1739,11 @@ void fill_ulsch_cqi_indication(PHY_VARS_eNB *eNB,uint16_t frame,uint8_t subframe
pdu->cqi_indication_rel9.number_of_cc_reported = 1; pdu->cqi_indication_rel9.number_of_cc_reported = 1;
pdu->ul_cqi_information.channel = 1; // PUSCH pdu->ul_cqi_information.channel = 1; // PUSCH
pdu->ul_cqi_information.tl.tag = NFAPI_UL_CQI_INFORMATION_TAG;
memcpy((void*)raw_pdu->pdu,ulsch_harq->o,pdu->cqi_indication_rel9.length); memcpy((void*)raw_pdu->pdu,ulsch_harq->o,pdu->cqi_indication_rel9.length);
eNB->UL_INFO.cqi_ind.number_of_cqis++; eNB->UL_INFO.cqi_ind.cqi_indication_body.tl.tag = NFAPI_CQI_INDICATION_BODY_TAG;
LOG_D(PHY,"eNB->UL_INFO.cqi_ind.number_of_cqis:%d\n", eNB->UL_INFO.cqi_ind.number_of_cqis); eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis++;
LOG_D(PHY,"eNB->UL_INFO.cqi_ind.number_of_cqis:%d\n", eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis);
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
......
...@@ -282,7 +282,7 @@ void RCconfig_L1(void) { ...@@ -282,7 +282,7 @@ void RCconfig_L1(void) {
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_inst=1 this is because phy_init_RU() uses that to index and not RC.num_eNB - why the 2 similar variables?\n", __FUNCTION__); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_inst=1 this is because phy_init_RU() uses that to index and not RC.num_eNB - why the 2 similar variables?\n", __FUNCTION__);
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_CC[0]=%d for init_eNB_afterRU()\n", __FUNCTION__, RC.nb_CC[0]);
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_macrlc_inst:%d because used by mac_top_init_eNB()\n", __FUNCTION__, RC.nb_macrlc_inst);
//mac_top_init_eNB(); mac_top_init_eNB();
configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd,
RC.eNB[j][0]->eth_params_n .remote_portd); RC.eNB[j][0]->eth_params_n .remote_portd);
} else { // other midhaul } else { // other midhaul
......
...@@ -181,6 +181,10 @@ int channel_container_init = 0; ...@@ -181,6 +181,10 @@ int channel_container_init = 0;
int flexran_agent_start(mid_t mod_id) int flexran_agent_start(mid_t mod_id)
{ {
flexran_agent_info_t *flexran = RC.flexran[mod_id]; flexran_agent_info_t *flexran = RC.flexran[mod_id];
if (!flexran) {
printf("flexran in disable!!!\n");
return 100;
}
int channel_id; int channel_id;
char *in_ip = flexran->remote_ipv4_addr; char *in_ip = flexran->remote_ipv4_addr;
uint16_t in_port = flexran->remote_port; uint16_t in_port = flexran->remote_port;
......
...@@ -1173,7 +1173,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP, ...@@ -1173,7 +1173,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
mac->TX_req[CC_idP].sfn_sf = mac->TX_req[CC_idP].sfn_sf =
fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body, fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body,
(frameP * 10) + subframeP, (frameP * 10) + subframeP,
rrc_sdu_length, rrc_sdu_length+offset,
mac->pdu_index[CC_idP], mac->pdu_index[CC_idP],
mac->UE_list. mac->UE_list.
DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]); DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
......
...@@ -727,6 +727,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -727,6 +727,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 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++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
// Rel10 fields // Rel10 fields
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;
......
...@@ -571,6 +571,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, ...@@ -571,6 +571,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
#endif #endif
memset(rballoc_sub[0],0,(MAX_NUM_CCs)*(N_RBG_MAX)*sizeof(unsigned char)); memset(rballoc_sub[0],0,(MAX_NUM_CCs)*(N_RBG_MAX)*sizeof(unsigned char));
memset(min_rb_unit,0,sizeof(min_rb_unit)); memset(min_rb_unit,0,sizeof(min_rb_unit));
memset(MIMO_mode_indicator[0], 0, MAX_NUM_CCs*N_RBG_MAX*sizeof(unsigned char));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here
...@@ -1754,6 +1755,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1754,6 +1755,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
//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.dci_dl_pdu_rel8.redundancy_version_2 = 1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
if (cc[CC_id].tdd_Config != NULL) { //TDD if (cc[CC_id].tdd_Config != NULL) { //TDD
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI-1)&3; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI-1)&3;
LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n", LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
...@@ -2810,6 +2812,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -2810,6 +2812,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); memset((void*)hi_dci0_pdu,0,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 = 2+sizeof(nfapi_hi_dci0_dci_pdu); hi_dci0_pdu->pdu_size = 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.dci_format = NFAPI_UL_DCI_FORMAT_0; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = 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;
...@@ -2964,6 +2967,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -2964,6 +2967,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); memset((void*)hi_dci0_pdu,0,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 = 2+sizeof(nfapi_hi_dci0_dci_pdu); hi_dci0_pdu->pdu_size = 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.dci_format = NFAPI_UL_DCI_FORMAT_0; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = 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;
......
...@@ -93,33 +93,32 @@ void handle_cqi(UL_IND_t *UL_info) { ...@@ -93,33 +93,32 @@ void handle_cqi(UL_IND_t *UL_info) {
if (nfapi_mode == 1) if (nfapi_mode == 1)
{ {
if (UL_info->cqi_ind.number_of_cqis>0) if (UL_info->cqi_ind.cqi_indication_body.number_of_cqis>0)
{ {
LOG_D(PHY,"UL_info->cqi_ind.number_of_cqis:%d\n", UL_info->cqi_ind.number_of_cqis); LOG_D(PHY,"UL_info->cqi_ind.number_of_cqis:%d\n", UL_info->cqi_ind.cqi_indication_body.number_of_cqis);
nfapi_cqi_indication_t ind; // nfapi_cqi_indication_t ind;
ind.header.message_id = NFAPI_RX_CQI_INDICATION; UL_info->cqi_ind.header.message_id = NFAPI_RX_CQI_INDICATION;
ind.sfn_sf = UL_info->frame<<4 | UL_info->subframe; UL_info->cqi_ind.sfn_sf = UL_info->frame<<4 | UL_info->subframe;
ind.cqi_indication_body = UL_info->cqi_ind;
oai_nfapi_cqi_indication(&ind); oai_nfapi_cqi_indication(&UL_info->cqi_ind);
UL_info->cqi_ind.number_of_cqis=0; UL_info->cqi_ind.cqi_indication_body.number_of_cqis=0;
} }
} }
else else
{ {
for (i=0;i<UL_info->cqi_ind.number_of_cqis;i++) for (i=0;i<UL_info->cqi_ind.cqi_indication_body.number_of_cqis;i++)
cqi_indication(UL_info->module_id, cqi_indication(UL_info->module_id,
UL_info->CC_id, UL_info->CC_id,
UL_info->frame, UL_info->frame,
UL_info->subframe, UL_info->subframe,
UL_info->cqi_ind.cqi_pdu_list[i].rx_ue_information.rnti, UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].rx_ue_information.rnti,
&UL_info->cqi_ind.cqi_pdu_list[i].cqi_indication_rel9, &UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].cqi_indication_rel9,
UL_info->cqi_ind.cqi_raw_pdu_list[i].pdu, UL_info->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[i].pdu,
&UL_info->cqi_ind.cqi_pdu_list[i].ul_cqi_information); &UL_info->cqi_ind.cqi_indication_body.cqi_pdu_list[i].ul_cqi_information);
UL_info->cqi_ind.number_of_cqis=0; UL_info->cqi_ind.cqi_indication_body.number_of_cqis=0;
} }
} }
...@@ -525,7 +524,7 @@ void UL_indication(UL_IND_t *UL_info) ...@@ -525,7 +524,7 @@ void UL_indication(UL_IND_t *UL_info)
LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n", LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n",
UL_info->frame,UL_info->subframe, UL_info->frame,UL_info->subframe,
module_id,CC_id, module_id,CC_id,
UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs); UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
if(UL_info->frame==1023&&UL_info->subframe==6){ // dl scheduling (0,0) if(UL_info->frame==1023&&UL_info->subframe==6){ // dl scheduling (0,0)
frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big
LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt); LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt);
......
...@@ -71,7 +71,7 @@ typedef struct{ ...@@ -71,7 +71,7 @@ typedef struct{
nfapi_sr_indication_t sr_ind; nfapi_sr_indication_t sr_ind;
/// CQI indication list /// CQI indication list
nfapi_cqi_indication_body_t cqi_ind; nfapi_cqi_indication_t cqi_ind;
/// RACH indication list /// RACH indication list
nfapi_rach_indication_t rach_ind; nfapi_rach_indication_t rach_ind;
......
...@@ -236,8 +236,8 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subfram ...@@ -236,8 +236,8 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subfram
// change for mutiple UE's simulation. // change for mutiple UE's simulation.
//pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex); //pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
pthread_mutex_lock(&fill_ul_mutex.cqi_mutex); pthread_mutex_lock(&fill_ul_mutex.cqi_mutex);
nfapi_cqi_indication_pdu_t *pdu = &UL_INFO->cqi_ind.cqi_pdu_list[UL_INFO->cqi_ind.number_of_cqis]; nfapi_cqi_indication_pdu_t *pdu = &UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list[UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis];
nfapi_cqi_indication_raw_pdu_t *raw_pdu = &UL_INFO->cqi_ind.cqi_raw_pdu_list[UL_INFO->cqi_ind.number_of_cqis]; nfapi_cqi_indication_raw_pdu_t *raw_pdu = &UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list[UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis];
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = rnti; pdu->rx_ue_information.rnti = rnti;
...@@ -263,7 +263,7 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subfram ...@@ -263,7 +263,7 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subfram
UL_INFO->cqi_ind.number_of_cqis++; UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis++;
// change for mutiple UE's simulation. // change for mutiple UE's simulation.
//pthread_mutex_unlock(&UE_mac_inst[Mod_id].UL_INFO_mutex); //pthread_mutex_unlock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
pthread_mutex_unlock(&fill_ul_mutex.cqi_mutex); pthread_mutex_unlock(&fill_ul_mutex.cqi_mutex);
......
...@@ -185,14 +185,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -185,14 +185,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs || eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs ||
eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs || eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs ||
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles || eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles ||
eNB->UL_INFO.cqi_ind.number_of_cqis eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis
) { ) {
LOG_D(PHY, "UL_info[rx_ind:%05d:%d harqs:%05d:%d crcs:%05d:%d preambles:%05d:%d cqis:%d] RX:%04d%d TX:%04d%d num_pdcch_symbols:%d\n", LOG_D(PHY, "UL_info[rx_ind:%05d:%d harqs:%05d:%d crcs:%05d:%d preambles:%05d:%d cqis:%d] RX:%04d%d TX:%04d%d num_pdcch_symbols:%d\n",
NFAPI_SFNSF2DEC(eNB->UL_INFO.rx_ind.sfn_sf), eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(eNB->UL_INFO.rx_ind.sfn_sf), eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus,
NFAPI_SFNSF2DEC(eNB->UL_INFO.harq_ind.sfn_sf), eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs, NFAPI_SFNSF2DEC(eNB->UL_INFO.harq_ind.sfn_sf), eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs,
NFAPI_SFNSF2DEC(eNB->UL_INFO.crc_ind.sfn_sf), eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(eNB->UL_INFO.crc_ind.sfn_sf), eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs,
NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf), eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles, NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf), eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles,
eNB->UL_INFO.cqi_ind.number_of_cqis, eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis,
proc->frame_rx, proc->subframe_rx, proc->frame_rx, proc->subframe_rx,
proc->frame_tx, proc->subframe_tx, eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols); proc->frame_tx, proc->subframe_tx, eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols);
} }
...@@ -281,7 +281,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -281,7 +281,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
/* CONFLICT RESOLUTION: BEGIN */ /* CONFLICT RESOLUTION: BEGIN */
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 );
if(oai_exit) return(-1); if(oai_exit) return(-1);
if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD){ if((get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD)&& (nfapi_mode != 2)){
#ifndef PHY_TX_THREAD #ifndef PHY_TX_THREAD
phy_procedures_eNB_TX(eNB, proc, 1); phy_procedures_eNB_TX(eNB, proc, 1);
#endif #endif
...@@ -1377,8 +1377,8 @@ void init_eNB(int single_thread_flag,int wait_for_sync) { ...@@ -1377,8 +1377,8 @@ void init_eNB(int single_thread_flag,int wait_for_sync) {
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list; eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
eNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = eNB->sr_pdu_list; eNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = eNB->sr_pdu_list;
eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list; eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_pdu_list = eNB->cqi_pdu_list; eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_pdu_list = eNB->cqi_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list; eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
eNB->prach_energy_counter = 0; eNB->prach_energy_counter = 0;
} }
......
...@@ -1059,9 +1059,9 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { ...@@ -1059,9 +1059,9 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
UL_INFO->sr_ind.sr_indication_body.sr_pdu_list = (nfapi_sr_indication_pdu_t*)malloc(NB_UE_INST*sizeof(nfapi_sr_indication_pdu_t)); UL_INFO->sr_ind.sr_indication_body.sr_pdu_list = (nfapi_sr_indication_pdu_t*)malloc(NB_UE_INST*sizeof(nfapi_sr_indication_pdu_t));
UL_INFO->sr_ind.sr_indication_body.number_of_srs = 0; UL_INFO->sr_ind.sr_indication_body.number_of_srs = 0;
UL_INFO->cqi_ind.cqi_pdu_list = (nfapi_cqi_indication_pdu_t*)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_pdu_t)); UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list = (nfapi_cqi_indication_pdu_t*)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_pdu_t));
UL_INFO->cqi_ind.cqi_raw_pdu_list = (nfapi_cqi_indication_raw_pdu_t*)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_raw_pdu_t)); UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list = (nfapi_cqi_indication_raw_pdu_t*)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_raw_pdu_t));
UL_INFO->cqi_ind.number_of_cqis = 0; UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis = 0;
if (pthread_mutex_lock(&phy_stub_ticking->mutex_single_thread) != 0) { if (pthread_mutex_lock(&phy_stub_ticking->mutex_single_thread) != 0) {
LOG_E( MAC, "[SCHED][UE] error locking mutex for ue_thread_id %d (mutex_single_thread)\n",ue_thread_id); LOG_E( MAC, "[SCHED][UE] error locking mutex for ue_thread_id %d (mutex_single_thread)\n",ue_thread_id);
...@@ -1271,10 +1271,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { ...@@ -1271,10 +1271,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
free(UL_INFO->sr_ind.sr_indication_body.sr_pdu_list); free(UL_INFO->sr_ind.sr_indication_body.sr_pdu_list);
UL_INFO->sr_ind.sr_indication_body.sr_pdu_list = NULL; UL_INFO->sr_ind.sr_indication_body.sr_pdu_list = NULL;
//} //}
free(UL_INFO->cqi_ind.cqi_pdu_list); free(UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list);
UL_INFO->cqi_ind.cqi_pdu_list = NULL; UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list = NULL;
free(UL_INFO->cqi_ind.cqi_raw_pdu_list); free(UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list);
UL_INFO->cqi_ind.cqi_raw_pdu_list = NULL; UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list = NULL;
free(UL_INFO); free(UL_INFO);
UL_INFO = NULL; UL_INFO = NULL;
......
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