Commit 9306e052 authored by matzakos's avatar matzakos

Successful attachment of the UE and UL/DL data traffic. Remaining to test the...

Successful attachment of the UE and UL/DL data traffic. Remaining to test the sidelink functionalities.
parent 740e13bb
...@@ -1057,28 +1057,24 @@ void init_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) { ...@@ -1057,28 +1057,24 @@ void init_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) {
ue->dlsch_sldch = new_eNB_dlsch(1,1,NSOFT,ue->frame_parms.N_RB_DL, abstraction_flag,&ue->frame_parms); ue->dlsch_sldch = new_eNB_dlsch(1,1,NSOFT,ue->frame_parms.N_RB_DL, abstraction_flag,&ue->frame_parms);
ue->ulsch_sldch = new_ue_ulsch(ue->frame_parms.N_RB_DL, abstraction_flag); ue->ulsch_sldch = new_ue_ulsch(ue->frame_parms.N_RB_DL, abstraction_flag);
//Panos: Substituted the next line with the double for loop as harq_ids is a 2-dimension array now //***/ Substituted the next line with the double for loop as harq_ids is a 2-dimension array now
//for (i=0;i<10;i++) ue->dlsch_sldch->harq_ids[j][i] = 0; //for (i=0;i<10;i++) ue->dlsch_sldch->harq_ids[i] = 0;
LTE_eNB_DLSCH_t *dlsch_sldch_tmp = &ue->dlsch_sldch;
for (i=0; i<20; i++)
dlsch_sldch_tmp->harq_ids[i/10][i%10] = 0;
for (j=0; j<2; j++){
for (i=0;i<10;i++){
ue->dlsch_sldch->harq_ids[j][i] = 0;
}
}
ue->dlsch_rx_slsch = new_ue_dlsch(1,4,NSOFT,1,MAX_TURBO_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag); ue->dlsch_rx_slsch = new_ue_dlsch(1,4,NSOFT,1,MAX_TURBO_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag);
ue->dlsch_slsch = new_eNB_dlsch(1,1,NSOFT,ue->frame_parms.N_RB_DL, abstraction_flag,&ue->frame_parms); ue->dlsch_slsch = new_eNB_dlsch(1,1,NSOFT,ue->frame_parms.N_RB_DL, abstraction_flag,&ue->frame_parms);
ue->ulsch_slsch = new_ue_ulsch(ue->frame_parms.N_RB_DL, abstraction_flag); ue->ulsch_slsch = new_ue_ulsch(ue->frame_parms.N_RB_DL, abstraction_flag);
//Panos: Substituted the next line with the double for loop as harq_ids is a 2-dimension array now //Panos: Substituted the next line with the double for loop as harq_ids is a 2-dimension array now
//for (i=0;i<10;i++) ue->dlsch_slsch->harq_ids[j][i] = 0; //for (i=0;i<10;i++) ue->dlsch_slsch->harq_ids[i] = 0;
for (j=0; j<2; j++){ LTE_eNB_DLSCH_t *dlsch_slsch_tmp = &ue->dlsch_slsch;
for (i=0;i<10;i++){ for (i=0; i<20; i++)
ue->dlsch_slsch->harq_ids[j][i] = 0; dlsch_slsch_tmp->harq_ids[i/10][i%10] = 0;
}
}
ue->slsch_txcnt = 0; ue->slsch_txcnt = 0;
ue->slsch_errors = 0; ue->slsch_errors = 0;
......
...@@ -63,7 +63,7 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -63,7 +63,7 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
sync_corr_ue0 = (int64_t *)malloc16(4*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int64_t)*frame_parms->samples_per_tti); sync_corr_ue0 = (int64_t *)malloc16(4*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int64_t)*frame_parms->samples_per_tti);
sync_corr_ue1 = (int64_t *)malloc16(4*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int64_t)*frame_parms->samples_per_tti); sync_corr_ue1 = (int64_t *)malloc16(4*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int64_t)*frame_parms->samples_per_tti);
sync_corr_ue2 = (int32_t *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int32_t)*frame_parms->samples_per_tti); sync_corr_ue2 = (int64_t *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int64_t)*frame_parms->samples_per_tti);
if (sync_corr_ue0) { if (sync_corr_ue0) {
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
......
...@@ -62,7 +62,7 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e ...@@ -62,7 +62,7 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
LOG_I(MAC, "Panos-D: dl_phy_sync_success 1 \n"); LOG_I(MAC, "Panos-D: dl_phy_sync_success 1 \n");
openair_rrc_ue_init(module_idP, eNB_index); openair_rrc_ue_init(module_idP, eNB_index);
} else { } else {
LOG_I(MAC, "Panos-D: dl_phy_sync_success 2 \n"); //LOG_I(MAC, "Panos-D: dl_phy_sync_success 2 \n");
rrc_in_sync_ind(module_idP, frameP, eNB_index); rrc_in_sync_ind(module_idP, frameP, eNB_index);
} }
} }
......
...@@ -1131,8 +1131,8 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -1131,8 +1131,8 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
(unsigned char *)NLMSG_DATA(nas_nlh_rx), (unsigned char *)NLMSG_DATA(nas_nlh_rx),
PDCP_TRANSMISSION_MODE_DATA PDCP_TRANSMISSION_MODE_DATA
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,&pdcp_read_header_g.sourceL2Id ,&pdcp_read_header_g.sourceL2Id //NULL
,&pdcp_read_header_g.destinationL2Id ,&pdcp_read_header_g.destinationL2Id //NULL
#endif #endif
); );
} else { //INST == 1 (OIP1) } else { //INST == 1 (OIP1)
......
...@@ -403,7 +403,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, ...@@ -403,7 +403,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id); key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
} }
if (sourceL2Id && destinationL2Id){ if (sourceL2Id && destinationL2Id){
LOG_I (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); LOG_I (RLC, "In sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
//Thinh's line originally uncommented //Thinh's line originally uncommented
...@@ -414,7 +414,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, ...@@ -414,7 +414,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
} else } else
#endif #endif
{ {
LOG_I (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); LOG_I (RLC, "Not in sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
} }
......
...@@ -428,10 +428,13 @@ int init_module (void) ...@@ -428,10 +428,13 @@ int init_module (void)
for (inst=0; inst<UE_IP_NB_INSTANCES_MAX; inst++) { for (inst=0; inst<UE_IP_NB_INSTANCES_MAX; inst++) {
printk("[UE_IP_DRV][%s] begin init instance %d\n", __FUNCTION__,inst); printk("[UE_IP_DRV][%s] begin init instance %d\n", __FUNCTION__,inst);
sprintf(devicename,"oip%d",inst+1); //sprintf(devicename,"oip%d",inst+1);
sprintf(devicename,"oip%d",inst);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
ue_ip_dev[inst] = alloc_netdev(sizeof(ue_ip_priv_t),devicename, ue_ip_init); ue_ip_dev[inst] = alloc_netdev(sizeof(ue_ip_priv_t),devicename, ue_ip_init);
#else #else
//Panos: Remember to bring this back for operation with sidelink
if(inst ==0) if(inst ==0)
ue_ip_dev[inst] = alloc_netdev(sizeof(ue_ip_priv_t),devicename, NET_NAME_PREDICTABLE,ue_ip_init_sidelink); ue_ip_dev[inst] = alloc_netdev(sizeof(ue_ip_priv_t),devicename, NET_NAME_PREDICTABLE,ue_ip_init_sidelink);
else else
......
...@@ -445,7 +445,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) ...@@ -445,7 +445,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
LOG_I(RRC, "Panos-D: rrc_in_sync_ind 0 \n"); LOG_D(RRC, "Panos-D: rrc_in_sync_ind 0 \n");
MessageDef *message_p; MessageDef *message_p;
//LOG_I(RRC,"sending a message to task_mac_ue\n"); //LOG_I(RRC,"sending a message to task_mac_ue\n");
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_IN_SYNC_IND); message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_IN_SYNC_IND);
...@@ -456,7 +456,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) ...@@ -456,7 +456,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
} }
#else #else
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0; UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0;
LOG_I(RRC, "Panos-D: rrc_in_sync_ind 1 \n"); //LOG_I(RRC, "Panos-D: rrc_in_sync_ind 1 \n");
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) { if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++; UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++;
} }
......
...@@ -5282,7 +5282,7 @@ openair_rrc_top_init_ue( ...@@ -5282,7 +5282,7 @@ openair_rrc_top_init_ue(
(const uint32_t *)NULL, (const uint32_t *)NULL,
(const uint32_t *)NULL, (const uint32_t *)NULL,
(const uint32_t *)NULL, (const uint32_t *)NULL,
UE_rrc_inst[module_id].SL_Preconfiguration[0], UE_rrc_inst[module_id].SL_Preconfiguration[0], //(LTE_SL_Preconfiguration_r12_t *) NULL,
1025, // indicates that there is no update in the frame number 1025, // indicates that there is no update in the frame number
11, // /indicates that there isno update in the subframe number 11, // /indicates that there isno update in the subframe number
NULL NULL
......
...@@ -261,9 +261,10 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti ...@@ -261,9 +261,10 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
LOG_I(PHY,"UE : Calling Layer 2 for initialization\n"); LOG_I(PHY,"UE : Calling Layer 2 for initialization\n");
l2_init_ue(eMBMS_active,(uecap_xer_in==1)?uecap_xer:NULL, //***/ Change the order and call the next function call at the end
/*l2_init_ue(eMBMS_active,(uecap_xer_in==1)?uecap_xer:NULL,
0,// cba_group_active 0,// cba_group_active
0); // HO flag 0); // HO flag*/
if (PHY_vars_UE_g==NULL) PHY_vars_UE_g = (PHY_VARS_UE***)calloc(1+nb_inst,sizeof(PHY_VARS_UE**)); if (PHY_vars_UE_g==NULL) PHY_vars_UE_g = (PHY_VARS_UE***)calloc(1+nb_inst,sizeof(PHY_VARS_UE**));
...@@ -399,6 +400,10 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti ...@@ -399,6 +400,10 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
} }
printf("UE threads created by %ld\n", gettid()); printf("UE threads created by %ld\n", gettid());
l2_init_ue(eMBMS_active,(uecap_xer_in==1)?uecap_xer:NULL,
0,// cba_group_active
0); // HO flag
} }
......
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