diff --git a/maketags b/maketags index c0a941b26cddb1abbc917013ac87dd284cb18eaa..91d776281e428cb46e2796c3bfb4d514954e3501 100755 --- a/maketags +++ b/maketags @@ -1,3 +1,3 @@ #!/bin/sh echo "building ctags for openair1 and openair2 ..." -ctags -e -R --exclude=openair3 --exclude=openair1/DOCS --exclude=openair2/DOCS --exclude=openair2/RRC/CELLULAR --exclude=openair2/NAS/DRIVER/CELLULAR --exclude=openair2/SIMULATION --exclude=openairITS +ctags -e -R --exclude=openair3/ --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=openairITS/ diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 68b3b690c4cf0cb5223f0f401609ab858696d724..db7d798abf4c6d2214f67a8c7d12b122d4ab4628 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -2309,8 +2309,14 @@ u8 generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, eNB_transport_info[phy_vars_eNB->Mod_id].num_ue_spec_dci = num_ue_spec_dci; eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci = num_common_dci; - LOG_D(PHY,"[eNB %d][DCI][EMUL] num spec dci %d num comm dci %d\n", phy_vars_eNB->Mod_id, num_ue_spec_dci,num_common_dci); - n_dci_dl =0; + LOG_D(PHY,"[eNB %d][DCI][EMUL] num spec dci %d num comm dci %d num PMCH %d \n", phy_vars_eNB->Mod_id, num_ue_spec_dci,num_common_dci, + eNB_transport_info[phy_vars_eNB->Mod_id].num_pmch); + + if (eNB_transport_info[phy_vars_eNB->Mod_id].cntl.pmch_flag == 1 ) + n_dci_dl = eNB_transport_info[phy_vars_eNB->Mod_id].num_pmch; + else + n_dci_dl = 0; + for (n_dci =0 ; n_dci < (eNB_transport_info[phy_vars_eNB->Mod_id].num_ue_spec_dci+ eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci); n_dci++) { diff --git a/openair1/PHY/LTE_TRANSPORT/defs.h b/openair1/PHY/LTE_TRANSPORT/defs.h index 035a15e7720a9b699e177de7d64decc97dfa4ac1..6961b024a24a84c3cedd492383ffdf5f4afbb464 100644 --- a/openair1/PHY/LTE_TRANSPORT/defs.h +++ b/openair1/PHY/LTE_TRANSPORT/defs.h @@ -70,7 +70,8 @@ #define MAX_NUM_RE (14*1200) #define SI_RNTI 0xffff -#define P_RNTI 0xfffd +#define M_RNTI 0xfffd +#define P_RNTI 0xfffe #define CBA_RNTI 0xfff4 #define C_RNTI 0x1234 diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index d65daadf2ded5ee2695acd000fb000d163a728d3..a8bc4cc7b9f3cb8b507c65a74af472c8a408da21 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -44,7 +44,7 @@ #include "PHY/CODING/extern.h" #include "SCHED/extern.h" #include "SIMULATION/TOOLS/defs.h" -//#define DEBUG_DLSCH_DECODING +#define DEBUG_DLSCH_DECODING void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) { @@ -660,6 +660,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, u16 i; #endif + // may not be necessaru for PMCH?? for (eNB_id2=0;eNB_id2<NB_eNB_INST;eNB_id2++) { if (PHY_vars_eNB_g[eNB_id2]->lte_frame_parms.Nid_cell == phy_vars_ue->lte_frame_parms.Nid_cell) break; @@ -750,6 +751,35 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, if (dlsch_ue->harq_processes[harq_pid]->round == 0) memcpy(dlsch_eNB->harq_processes[harq_pid]->b,dlsch_ue->harq_processes[harq_pid]->b,dlsch_ue->harq_processes[harq_pid]->TBS>>3); break; + case 5: // PMCH + + dlsch_ue = phy_vars_ue->dlsch_ue_MCH[eNB_id]; + dlsch_eNB = PHY_vars_eNB_g[eNB_id2]->dlsch_eNB_MCH; + + LOG_D(PHY,"decoding pmch emul (size is %d, enb %d %d)\n", dlsch_ue->harq_processes[0]->TBS>>3, eNB_id, eNB_id2); +#ifdef DEBUG_DLSCH_DECODING + for (i=0;i<dlsch_ue->harq_processes[0]->TBS>>3;i++) + LOG_T(PHY,"%x.",dlsch_eNB->harq_processes[0]->b[i]); + LOG_T(PHY,"\n"); +#endif + /* + if (dlsch_abstraction_MIESM(phy_vars_ue->sinr_dB, phy_vars_ue->transmission_mode[eNB_id], dlsch_eNB->rb_alloc, + dlsch_eNB->harq_processes[0]->mcs,PHY_vars_eNB_g[eNB_id]->mu_mimo_mode[ue_id].dl_pow_off) == 1) { + */ + if (1) { + // reset HARQ + dlsch_ue->harq_processes[0]->status = SCH_IDLE; + dlsch_ue->harq_processes[0]->round = 0; + memcpy(dlsch_ue->harq_processes[0]->b, + dlsch_eNB->harq_processes[0]->b, + dlsch_ue->harq_processes[0]->TBS>>3); + return(1); + } + else { + // retransmission + return(1+dlsch_ue->max_turbo_iterations); + } + break; default: dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][0]; LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); diff --git a/openair1/PHY/LTE_TRANSPORT/pmch.c b/openair1/PHY/LTE_TRANSPORT/pmch.c index c4f9b2d68c8345108b16f2283d7c7c4e12968105..ae41510c92952a0009bf8276811c1235eab4d2f5 100644 --- a/openair1/PHY/LTE_TRANSPORT/pmch.c +++ b/openair1/PHY/LTE_TRANSPORT/pmch.c @@ -143,11 +143,12 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par return(0); } -void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx) { +void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx, int abstraction_flag) { LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB_MCH; LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->lte_frame_parms; - + + // dlsch->rnti = M_RNTI; dlsch->harq_processes[0]->mcs = mcs; // dlsch->harq_processes[0]->Ndi = ndi; dlsch->harq_processes[0]->rvidx = rvidx; @@ -174,13 +175,26 @@ void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx) { dlsch->rb_alloc[3] = 0xf; break; } + + if (abstraction_flag){ + eNB_transport_info[phy_vars_eNB->Mod_id].cntl.pmch_flag=1; + eNB_transport_info[phy_vars_eNB->Mod_id].num_pmch=1; // assumption: there is always one pmch in each SF + eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci=0; + eNB_transport_info[phy_vars_eNB->Mod_id].num_ue_spec_dci=0; + eNB_transport_info[phy_vars_eNB->Mod_id].dlsch_type[0]=5;// put at the reserved position for PMCH + eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[0]=0; + eNB_transport_info[phy_vars_eNB->Mod_id].ue_id[0]=255;//broadcast + eNB_transport_info[phy_vars_eNB->Mod_id].tbs[0]=dlsch->harq_processes[0]->TBS>>3; + } + } void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eNB_id) { LTE_UE_DLSCH_t *dlsch = phy_vars_ue->dlsch_ue_MCH[eNB_id]; LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->lte_frame_parms; - + + // dlsch->rnti = M_RNTI; dlsch->harq_processes[0]->mcs = mcs; dlsch->harq_processes[0]->rvidx = rvidx; // dlsch->harq_processes[0]->Ndi = ndi; @@ -209,42 +223,59 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN } } -void generate_mch(PHY_VARS_eNB *phy_vars_eNB,int subframe,uint8_t *a) { + void generate_mch(PHY_VARS_eNB *phy_vars_eNB,int subframe,uint8_t *a,int abstraction_flag) { int G; - - G = get_G(&phy_vars_eNB->lte_frame_parms, - phy_vars_eNB->lte_frame_parms.N_RB_DL, - phy_vars_eNB->dlsch_eNB_MCH->rb_alloc, - get_Qm(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->mcs), - 2,phy_vars_eNB->frame,subframe); - - generate_mbsfn_pilot(phy_vars_eNB, - phy_vars_eNB->lte_eNB_common_vars.txdataF[0], - AMP, - subframe); - - if (dlsch_encoding(a, - &phy_vars_eNB->lte_frame_parms, - 1, - phy_vars_eNB->dlsch_eNB_MCH, - phy_vars_eNB->frame, - subframe, - &phy_vars_eNB->dlsch_rate_matching_stats, - &phy_vars_eNB->dlsch_turbo_encoding_stats, - &phy_vars_eNB->dlsch_interleaving_stats - )<0) - exit(-1); - - dlsch_scrambling(&phy_vars_eNB->lte_frame_parms,1,phy_vars_eNB->dlsch_eNB_MCH,G,0,subframe<<1); - - - mch_modulation(phy_vars_eNB->lte_eNB_common_vars.txdataF[0], - AMP, - subframe, - &phy_vars_eNB->lte_frame_parms, - phy_vars_eNB->dlsch_eNB_MCH); -} + if (abstraction_flag != 0) { + if (eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]!=0) + printf("[PHY][EMU] PMCH transport block position is different than zero %d \n", eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]); + + memcpy(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->b, + a, + phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3); + LOG_D(PHY, "eNB %d dlsch_encoding_emul pmch , tbs is %d \n", + phy_vars_eNB->Mod_id, + phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3); + + memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]], + a, + phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3); + eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]+= phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3;//=eNB_transport_info[phy_vars_eNB->Mod_id].tbs[0]; + }else { + G = get_G(&phy_vars_eNB->lte_frame_parms, + phy_vars_eNB->lte_frame_parms.N_RB_DL, + phy_vars_eNB->dlsch_eNB_MCH->rb_alloc, + get_Qm(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->mcs), + 2,phy_vars_eNB->frame,subframe); + + generate_mbsfn_pilot(phy_vars_eNB, + phy_vars_eNB->lte_eNB_common_vars.txdataF[0], + AMP, + subframe); + + if (dlsch_encoding(a, + &phy_vars_eNB->lte_frame_parms, + 1, + phy_vars_eNB->dlsch_eNB_MCH, + phy_vars_eNB->frame, + subframe, + &phy_vars_eNB->dlsch_rate_matching_stats, + &phy_vars_eNB->dlsch_turbo_encoding_stats, + &phy_vars_eNB->dlsch_interleaving_stats + )<0) + exit(-1); + + dlsch_scrambling(&phy_vars_eNB->lte_frame_parms,1,phy_vars_eNB->dlsch_eNB_MCH,G,0,subframe<<1); + + + mch_modulation(phy_vars_eNB->lte_eNB_common_vars.txdataF[0], + AMP, + subframe, + &phy_vars_eNB->lte_frame_parms, + phy_vars_eNB->dlsch_eNB_MCH); + } + + } void mch_extract_rbs(int **rxdataF, int **dl_ch_estimates, @@ -801,5 +832,3 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue, return(0); } - - diff --git a/openair1/PHY/LTE_TRANSPORT/proto.h b/openair1/PHY/LTE_TRANSPORT/proto.h index 8dececbca7c71af29c23b210c99e51136b32ca21..a7a04ea5d09826fe3381ad3fb263cbfde6e4029b 100644 --- a/openair1/PHY/LTE_TRANSPORT/proto.h +++ b/openair1/PHY/LTE_TRANSPORT/proto.h @@ -222,14 +222,20 @@ int mch_modulation(mod_sym_t **txdataF, @param phy_vars_eNB Pointer to eNB variables @param subframe Subframe for PMCH @param a Pointer to transport block + @param abstraction_flag + */ -void generate_mch(PHY_VARS_eNB *phy_vars_eNB,int subframe,uint8_t *a); +void generate_mch(PHY_VARS_eNB *phy_vars_eNB,int subframe,uint8_t *a,int abstraction_flag); /** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals) @param phy_vars_eNB Pointer to eNB variables @param mcs MCS for MBSFN + @param ndi new data indicator + @param rdvix + @param abstraction_flag + */ -void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx); +void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx,int abstraction_flag); /** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals) @param phy_vars_ue Pointer to UE variables diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 6df4960ee6d9533efa5aab741f8c57470516e45c..87b8813b5e665ef72fe03d65087c5b96c263f939 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1070,18 +1070,21 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 #endif } } - - if (is_pmch_subframe(phy_vars_eNB->frame,next_slot>>1,&phy_vars_eNB->lte_frame_parms)) { + } + if (is_pmch_subframe(phy_vars_eNB->frame,next_slot>>1,&phy_vars_eNB->lte_frame_parms)) { + + if (abstraction_flag==0){ if ((next_slot%2) == 0) { // This is DL-Cell spec pilots in Control region generate_pilots_slot(phy_vars_eNB, phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], AMP, next_slot,1); - + } + } #ifdef Rel10 - // if mcch is active, send regardless of the node type: eNB or RN - // when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing + // if mcch is active, send regardless of the node type: eNB or RN + // when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing mch_pduP = mac_xface->get_mch_sdu(phy_vars_eNB->Mod_id,phy_vars_eNB->frame,next_slot>>1); switch (r_type){ case no_relay: @@ -1129,9 +1132,9 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 }// switch if (mch_pduP){ - fill_eNB_dlsch_MCH(phy_vars_eNB,mch_pduP->mcs,1,0); + fill_eNB_dlsch_MCH(phy_vars_eNB,mch_pduP->mcs,1,0, abstraction_flag); // Generate PMCH - generate_mch(phy_vars_eNB,next_slot>>1,(uint8_t*)mch_pduP->payload); + generate_mch(phy_vars_eNB,next_slot>>1,(uint8_t*)mch_pduP->payload,abstraction_flag); #ifdef DEBUG_PHY for (i=0;i<mch_pduP->Pdu_size;i++) msg("%2x.",(uint8_t)mch_pduP->payload[i]); @@ -1141,37 +1144,41 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 LOG_D(PHY,"[eNB/RN] Frame %d subframe %d: MCH not generated \n",phy_vars_eNB->frame,next_slot>>1); } #endif - } - } - else { + } + + else { vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,1); - generate_pilots_slot(phy_vars_eNB, - phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], - AMP, - next_slot,0); - generate_pilots_slot(phy_vars_eNB, - phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], - AMP, - next_slot+1,0); - vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,0); - if (next_slot == 0) { + if (abstraction_flag==0){ + generate_pilots_slot(phy_vars_eNB, + phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], + AMP, + next_slot,0); + generate_pilots_slot(phy_vars_eNB, + phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], + AMP, + next_slot+1,0); - // First half of PSS/SSS (FDD) - if (phy_vars_eNB->lte_frame_parms.frame_type == FDD) { - generate_pss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], - AMP, - &phy_vars_eNB->lte_frame_parms, - (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, - 0); - generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], - AMP, - &phy_vars_eNB->lte_frame_parms, - (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, - 0); + vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,0); + + if (next_slot == 0) { + + // First half of PSS/SSS (FDD) + if (phy_vars_eNB->lte_frame_parms.frame_type == FDD) { + generate_pss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], + AMP, + &phy_vars_eNB->lte_frame_parms, + (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, + 0); + generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], + AMP, + &phy_vars_eNB->lte_frame_parms, + (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, + 0); + } } - } - } + } + } if (next_slot == 0) { if ((phy_vars_eNB->frame&3) == 0) { @@ -1332,7 +1339,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 } } } - } + //return; diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index f6e4e82bebe95f3340c27223fdd78a93d46f843a..0740174ee66d46891d078189a72dfb674e679c98 100755 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -3005,8 +3005,8 @@ int lte_ue_pdcch_procedures(u8 eNB_id,u8 last_slot, PHY_VARS_UE *phy_vars_ue,u8 LOG_I(PHY,"Throughput %5.1f kbps\n",(float) phy_vars_ue->bitrate[eNB_id]/1000.0); } } - if (is_pmch_subframe(((last_slot>>1)==9?-1:0)+phy_vars_ue->frame,last_slot>>1,&phy_vars_ue->lte_frame_parms)) { + LOG_I(PHY,"ue calling pmch subframe ..\n "); if ((last_slot%2)==1) { LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation(%d)\n", @@ -3022,47 +3022,54 @@ int lte_ue_pdcch_procedures(u8 eNB_id,u8 last_slot, PHY_VARS_UE *phy_vars_ue,u8 if (pmch_mcs>=0) { LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Programming PMCH demodulation for mcs %d\n",phy_vars_ue->Mod_id,((last_slot>>1)==9?-1:0)+phy_vars_ue->frame,last_slot>>1,pmch_mcs); fill_UE_dlsch_MCH(phy_vars_ue,pmch_mcs,1,0,0); - - for (l=2;l<12;l++) { - - slot_fep_mbsfn(phy_vars_ue, - l, - last_slot>>1, - 0,0);//phy_vars_ue->rx_offset,0); - } - - for (l=2;l<12;l++) { - rx_pmch(phy_vars_ue, - 0, - last_slot>>1, - l); - + if (abstraction_flag == 0 ) { + for (l=2;l<12;l++) { + + slot_fep_mbsfn(phy_vars_ue, + l, + last_slot>>1, + 0,0);//phy_vars_ue->rx_offset,0); + } - } - /* printf("PMCH decoding, Frame %d, subframe %d, G %d\n", + for (l=2;l<12;l++) { + rx_pmch(phy_vars_ue, + 0, + last_slot>>1, + l); + + + } + /* printf("PMCH decoding, Frame %d, subframe %d, G %d\n", ((last_slot>>1)==9?-1:0)+phy_vars_ue->frame, last_slot>>1, phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G); */ - phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G = get_G(&phy_vars_ue->lte_frame_parms, + phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G = get_G(&phy_vars_ue->lte_frame_parms, phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->nb_rb, - phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->rb_alloc, - get_Qm(phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->mcs), - 2, - ((last_slot>>1)==9?-1:0)+phy_vars_ue->frame,last_slot>>1); - - dlsch_unscrambling(&phy_vars_ue->lte_frame_parms,1,phy_vars_ue->dlsch_ue_MCH[0], - phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G, - phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0],0,last_slot-1); - - ret = dlsch_decoding(phy_vars_ue, - phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0], - &phy_vars_ue->lte_frame_parms, - phy_vars_ue->dlsch_ue_MCH[0], - phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0], - last_slot>>1, - 0, - 0,0); + phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->rb_alloc, + get_Qm(phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->mcs), + 2, + ((last_slot>>1)==9?-1:0)+phy_vars_ue->frame,last_slot>>1); + + dlsch_unscrambling(&phy_vars_ue->lte_frame_parms,1,phy_vars_ue->dlsch_ue_MCH[0], + phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G, + phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0],0,last_slot-1); + + ret = dlsch_decoding(phy_vars_ue, + phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0], + &phy_vars_ue->lte_frame_parms, + phy_vars_ue->dlsch_ue_MCH[0], + phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0], + last_slot>>1, + 0, + 0,0); + } + else { // abstraction + ret = dlsch_decoding_emul(phy_vars_ue, + (((last_slot>>1)==0) ? 9 : ((last_slot>>1)-1)), + 5, // PMCH + eNB_id); + } if (mcch_active == 1) phy_vars_ue->dlsch_mcch_trials[sync_area][0]++; else diff --git a/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c b/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c index 0dc8d0cb59406278faa48eb341bec67038fd1ea3..cb380805f126b161ee0784aa762e9a2ef6b7de84 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c @@ -258,8 +258,9 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg, } for (n_ue = oai_emulation.info.master[messg->master_id].first_ue; - n_ue < oai_emulation.info.master[messg->master_id].first_ue + - oai_emulation.info.master[messg->master_id].nb_ue; n_ue ++) { + n_ue < oai_emulation.info.master[messg->master_id].first_ue + + oai_emulation.info.master[messg->master_id].nb_ue; + n_ue ++) { fill_phy_ue_vars(n_ue, last_slot); } } else { @@ -566,7 +567,8 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int n_enb<(oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local); n_enb++) { total_tbs=0; - for (n_dci = 0; n_dci < (eNB_transport_info[n_enb].num_ue_spec_dci + + for (n_dci = 0; n_dci < (eNB_transport_info[n_enb].num_pmch + + eNB_transport_info[n_enb].num_ue_spec_dci + eNB_transport_info[n_enb].num_common_dci); n_dci++) { total_tbs +=eNB_transport_info[n_enb].tbs[n_dci]; diff --git a/openair1/SIMULATION/ETH_TRANSPORT/defs.h b/openair1/SIMULATION/ETH_TRANSPORT/defs.h index 5e27f42d2a47d63a314f5cc486170d5cabb657b7..31cbc914b2a4c5be1a90e96f7983458c0fb1e179 100755 --- a/openair1/SIMULATION/ETH_TRANSPORT/defs.h +++ b/openair1/SIMULATION/ETH_TRANSPORT/defs.h @@ -51,6 +51,7 @@ typedef unsigned int (*rx_handler_t) (unsigned char, char*, unsigned int); typedef struct { u32 pbch_flag:1; + u32 pmch_flag:1; u32 pss:2; u32 sss:8; u32 cfi:2; @@ -77,10 +78,12 @@ typedef struct { } UE_cntl; #define MAX_TRANSPORT_BLOCKS_BUFFER_SIZE 16384 -#define MAX_NUM_DCI 5 +//#define MAX_PMCH_TRANSPORT_BLOCKS_BUFFER_SIZE 8192 // 16384 +#define MAX_NUM_DCI 5+1 // +1: for PMCH/MCH typedef struct { eNB_cntl cntl; + u8 num_pmch; u8 num_common_dci; u8 num_ue_spec_dci; DCI_ALLOC_t dci_alloc[MAX_NUM_DCI]; @@ -89,6 +92,7 @@ typedef struct { u8 ue_id[MAX_NUM_DCI]; u16 tbs[MAX_NUM_DCI*2]; // times 2 for dual-stream MIMO formats u8 transport_blocks[MAX_TRANSPORT_BLOCKS_BUFFER_SIZE]; + //u8 pmch_transport_blocks[MAX_PMCH_TRANSPORT_BLOCKS_BUFFER_SIZE]; } __attribute__((__packed__)) eNB_transport_info_t ; typedef struct { diff --git a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c index a528f47c4f1ba9689005ca4d59ab353d767e8d31..f79a8b7578e6bbbb651118f01730b07597c8c5a5 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c @@ -269,8 +269,10 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot) // to be added later //DCI - nb_total_dci= eNB_transport_info[enb_id].num_ue_spec_dci+ + nb_total_dci= eNB_transport_info[enb_id].num_pmch + + eNB_transport_info[enb_id].num_ue_spec_dci + eNB_transport_info[enb_id].num_common_dci; + PHY_vars_eNB_g[enb_id]->num_ue_spec_dci[(next_slot>>1)&1] = eNB_transport_info[enb_id].num_ue_spec_dci; PHY_vars_eNB_g[enb_id]->num_common_dci[(next_slot>>1)&1] = @@ -279,7 +281,7 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot) if (nb_total_dci >0) { memcpy(PHY_vars_eNB_g[enb_id]->dci_alloc[(next_slot>>1)&1], - eNB_transport_info[enb_id].dci_alloc, + eNB_transport_info[enb_id].dci_alloc, (nb_total_dci) * sizeof(DCI_ALLOC_t)); n_dci_dl=0; @@ -287,12 +289,13 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot) for (n_dci = 0; n_dci < nb_total_dci; n_dci++) { //exclude ul dci - if (eNB_transport_info[enb_id].dci_alloc[n_dci_dl].format > 0) { + if ((eNB_transport_info[enb_id].dci_alloc[n_dci_dl].format > 0) || (eNB_transport_info[enb_id].num_pmch > 0 )) { #ifdef DEBUG_EMU - LOG_D(EMU, "dci spec %d common %d tbs is %d payload offset %d\n", + LOG_D(EMU, "dci spec %d common %d pmch %d tbs is %d payload offset %d\n", eNB_transport_info[enb_id].num_ue_spec_dci, eNB_transport_info[enb_id].num_common_dci, - eNB_transport_info[enb_id].tbs[n_dci_dl], + eNB_transport_info[enb_id].num_pmch, + eNB_transport_info[enb_id].tbs[n_dci_dl], payload_offset); #endif switch (eNB_transport_info[enb_id].dlsch_type[n_dci_dl]) { @@ -345,11 +348,24 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot) &eNB_transport_info[enb_id].transport_blocks[payload_offset], eNB_transport_info[enb_id].tbs[n_dci_dl]); break; - - } - payload_offset += eNB_transport_info[enb_id].tbs[n_dci_dl]; - } - n_dci_dl++; + + case 5: + memcpy(PHY_vars_eNB_g[enb_id]->dlsch_eNB_MCH->harq_processes[0]->b, + &eNB_transport_info[enb_id].transport_blocks[payload_offset], + eNB_transport_info[enb_id].tbs[n_dci_dl]); +#ifdef DEBUG_EMU + LOG_D(EMU, "PMCH eNB_transport_info[enb_id].tbs[n_dci_dl] %d \n", + eNB_transport_info[enb_id].tbs[n_dci_dl]); +#endif + break; + + default: + LOG_W(EMU,"not supported dlsch type %d \n", eNB_transport_info[enb_id].dlsch_type[n_dci_dl]); + break; + } + payload_offset += eNB_transport_info[enb_id].tbs[n_dci_dl]; + } + n_dci_dl++; } #ifdef DEBUG_EMU LOG_D(EMU, "Fill phy eNB vars done next slot %d !\n", next_slot); @@ -385,11 +401,10 @@ void fill_phy_ue_vars(unsigned int ue_id, unsigned int last_slot) UE_transport_info[ue_id].cntl.sr, ue_cntl_delay[ue_id][last_slot%2].sr, UE_transport_info[ue_id].cntl.pucch_sel, - ue_cntl_delay[ue_id][last_slot%2].pucch_sel ); + ue_cntl_delay[ue_id][last_slot%2].pucch_sel); #endif //ue_cntl_delay[subframe%2].prach_flag ; - PHY_vars_UE_g[ue_id]->generate_prach = - ue_cntl_delay[ue_id][last_slot%2].prach_flag;//UE_transport_info[ue_id].cntl.prach_flag; + PHY_vars_UE_g[ue_id]->generate_prach = ue_cntl_delay[ue_id][last_slot%2].prach_flag;//UE_transport_info[ue_id].cntl.prach_flag; if (PHY_vars_UE_g[ue_id]->generate_prach == 1) { // if (PHY_vars_UE_g[ue_id]->prach_resources[enb_id] == NULL) // PHY_vars_UE_g[ue_id]->prach_resources[enb_id] = malloc(sizeof(PRACH_RESOURCES_t)); @@ -398,8 +413,7 @@ void fill_phy_ue_vars(unsigned int ue_id, unsigned int last_slot) ue_cntl_delay[ue_id][last_slot%2].prach_id; } - pucch_format= - ue_cntl_delay[ue_id][last_slot%2].pucch_flag;// UE_transport_info[ue_id].cntl.pucch_flag; + pucch_format= ue_cntl_delay[ue_id][last_slot%2].pucch_flag;// UE_transport_info[ue_id].cntl.pucch_flag; if ((last_slot + 1) % 2 == 0) { if (pucch_format == pucch_format1) { // UE_transport_info[ue_id].cntl.sr; PHY_vars_UE_g[ue_id]->sr[subframe] = ue_cntl_delay[ue_id][last_slot%2].sr; diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 40cbea5a23cb37da21d5795641ebe6fac48c0936..891df48d7ccc9498327077fb14b751c00d1ce07d 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -555,9 +555,10 @@ typedef struct { u8 RA_dci_fmt2; /// Flag to indicate the eNB should generate RAR. This is triggered by detection of PRACH u8 generate_rar; + /// Subframe where preamble was received + u8 preamble_subframe; /// Subframe where Msg3 is to be sent u8 Msg3_subframe; - u8 preamble_subframe; /// Flag to indicate the eNB should generate Msg4 upon reception of SDU from RRC. This is triggered by first ULSCH reception at eNB for new user. u8 generate_Msg4; /// Flag to indicate the eNB should generate the DCI for Msg4, after getting the SDU from RRC. diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 213efc5e15049cdd56bc059575b0bb4ebb7b9e04..b911d4d6fa871bc9048d03dd41308b817c0d2ab6 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -1160,7 +1160,7 @@ int schedule_MBMS(unsigned char Mod_id,u32 frame, u8 subframe) { ii = eNB_mac_inst[Mod_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & (0x80>>msi_pos); msi_pos++; } - //LOG_D(MAC,"[eNB %d] Frame %d subframe %d : sync area %d sf allocation pattern %d sf alloc %x msi pos is %d \n", Mod_id,frame, subframe,i,j,eNB_mac_inst[Mod_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0], msi_pos); + LOG_D(MAC,"[eNB %d] Frame %d subframe %d : sync area %d sf allocation pattern %d sf alloc %x msi pos is %d \n", Mod_id,frame, subframe,i,j,eNB_mac_inst[Mod_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0], msi_pos); } // Check if the subframe is for MSI, MCCH or MTCHs and Set the correspoding flag to 1 diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 095c1e5aff98885a4d7c083052b275cbd5ca2483..3cff02fafcd5b0fcc61da2ff43c14e1e706b2c2e 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -560,7 +560,7 @@ int ue_query_mch(uint8_t Mod_id, uint32_t frame, uint32_t subframe, uint8_t eNB_ mch_scheduling_period = 8<<(UE_mac_inst[Mod_id].pmch_Config[0]->mch_SchedulingPeriod_r9); for (i=0; - i< eNB_mac_inst[Mod_id].num_active_mbsfn_area; + i< UE_mac_inst[Mod_id].num_active_mbsfn_area; i++ ){ // assume, that there is always a mapping if ((j=ue_get_mbsfn_sf_alloction(Mod_id,i,eNB_index)) == -1) @@ -570,9 +570,10 @@ int ue_query_mch(uint8_t Mod_id, uint32_t frame, uint32_t subframe, uint8_t eNB_ mbsfn_period = 1<<(UE_mac_inst[Mod_id].mbsfn_SubframeConfig[0]->radioframeAllocationPeriod); mcch_period = 32<<(UE_mac_inst[Mod_id].mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9); - LOG_D(MAC,"[UE %d] Frame %d subframe %d: Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d)\n", + LOG_D(MAC,"[UE %d] Frame %d subframe %d: Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d,mac sched period (%d,%d))\n", Mod_id,frame, subframe,i,UE_mac_inst[Mod_id].num_active_mbsfn_area, - j,UE_mac_inst[Mod_id].num_sf_allocation_pattern,mbsfn_period,mcch_period); + j,UE_mac_inst[Mod_id].num_sf_allocation_pattern,mbsfn_period,mcch_period, + mch_scheduling_period,UE_mac_inst[Mod_id].mbsfn_SubframeConfig[j]->radioframeAllocationOffset); // get the real MCS value switch (UE_mac_inst[Mod_id].mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) { diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index eae88516a00a187ce5d7d72adfb5f368fc8e1228..ccdf4e9f2049bcd8a948a28904ece9c727c00bd6 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -334,12 +334,12 @@ BOOL pdcp_data_ind(u8 eNB_id, u8 UE_id, u32_t frame, u8_t eNB_flag, u8_t MBMS_fl "and radio bearer ID %d rlc sdu size %d eNB_flag %d\n", UE_id, eNB_id, rb_id, sdu_buffer_size, eNB_flag); } else { - pdcp = &pdcp_array_eNB[UE_id][eNB_id][rb_id]; + pdcp = &pdcp_array_eNB[eNB_id][UE_id][rb_id]; module_id = eNB_id; LOG_I(PDCP, "Data indication notification for PDCP entity from eNB %u to UE %u " - "and radio bearer ID %d rlc sdu size %d eNB_flag %d\n", - eNB_id, UE_id, rb_id, sdu_buffer_size, eNB_flag); + "and radio bearer ID %d rlc sdu size %d eNB_flag %d eNB_id %d\n", + eNB_id, UE_id, rb_id, sdu_buffer_size, eNB_flag, eNB_id); } sdu_list = &pdcp_sdu_list; #endif @@ -466,14 +466,14 @@ BOOL pdcp_data_ind(u8 eNB_id, u8 UE_id, u32_t frame, u8_t eNB_flag, u8_t MBMS_fl ((pdcp_data_ind_header_t *) new_sdu->data)->rb_id = rb_id; } else { /* RB id for an UE on eNB is instantiated */ - ((pdcp_data_ind_header_t *) new_sdu->data)->rb_id = rb_id + (UE_id * NB_RAB_MAX); + ((pdcp_data_ind_header_t *) new_sdu->data)->rb_id = rb_id + (UE_id * NB_RB_MAX); } ((pdcp_data_ind_header_t *) new_sdu->data)->data_size = sdu_buffer_size - payload_offset; // Here there is no virtualization possible #ifdef IDROMEL_NEMO if (eNB_flag == 0) - ((pdcp_data_ind_header_t *) new_sdu->data)->inst = rb_id / NB_RAB_MAX; + ((pdcp_data_ind_header_t *) new_sdu->data)->inst = rb_id / NB_RB_MAX; else ((pdcp_data_ind_header_t *) new_sdu->data)->inst = 0; #else diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index e266fadab16ab12e833797d6dbf55982301fc99e..c97f3c85373083c26bc1008eb374f1bf02214bf5 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -407,7 +407,7 @@ int pdcp_fifo_read_input_sdus (u32_t frame, u8_t eNB_flag, u8_t UE_index, u8_t e # if defined(ENABLE_PDCP_NETLINK_FIFO) rb_id_t rab_id; pdcp_t *pdcp; - + u8 pdcp_mode = 0; struct pdcp_netlink_element_s *data = NULL; while (pdcp_netlink_dequeue_element(eNB_flag, UE_index, eNB_index, &data) != 0) { @@ -416,18 +416,34 @@ int pdcp_fifo_read_input_sdus (u32_t frame, u8_t eNB_flag, u8_t UE_index, u8_t e rab_id = data->pdcp_read_header.rb_id; pdcp = &pdcp_array_ue[UE_index][rab_id]; } else { - rab_id = data->pdcp_read_header.rb_id % NB_RAB_MAX; - UE_index = data->pdcp_read_header.rb_id / NB_RAB_MAX; + rab_id = data->pdcp_read_header.rb_id % NB_RB_MAX; + UE_index = data->pdcp_read_header.rb_id / NB_RB_MAX; pdcp = &pdcp_array_eNB[eNB_index][UE_index][rab_id]; } - if (data->pdcp_read_header.rb_id != 0) { + + if (data->pdcp_read_header.rb_id != 0) { if (pdcp->instanciated_instance) { LOG_D(PDCP, "[FRAME %05d][IP][MOD %02d][][--- PDCP_DATA_REQ " "/ %d Bytes --->][PDCP][MOD %02d][RB %02d]\n", frame, data->pdcp_read_header.inst, data->pdcp_read_header.data_size, data->pdcp_read_header.inst, data->pdcp_read_header.rb_id); - - pdcp_data_req(eNB_index, +#ifdef OAI_NW_DRIVER_TYPE_ETHERNET + + if ((data->pdcp_read_header.traffic_type == 2) /*OAI_NW_DRV_IPV6_ADDR_TYPE_MULTICAST */ || + (data->pdcp_read_header.traffic_type == 6) /*OAI_NW_DRV_IPV4_ADDR_TYPE_MULTICAST */ || + (data->pdcp_read_header.traffic_type == 7) /*OAI_NW_DRV_IPV4_ADDR_TYPE_BROADCAST */ ) + pdcp_mode = PDCP_TM; + else if ((data->pdcp_read_header.traffic_type == 1) /* OAI_NW_DRV_IPV6_ADDR_TYPE_UNICAST */ || + (data->pdcp_read_header.traffic_type == 5) /*OAI_NW_DRV_IPV4_ADDR_TYPE_UNICAST*/ ) + pdcp_mode= PDCP_DATA_PDU; + else { + pdcp_mode= PDCP_DATA_PDU; + LOG_W(PDCP,"unknown IP traffic type \n"); + } +#else // NASMESH driver does not curreenlty support multicast traffic + pdcp_mode = PDCP_DATA_PDU; +#endif + pdcp_data_req(eNB_index, UE_index, frame, eNB_flag, @@ -436,12 +452,12 @@ int pdcp_fifo_read_input_sdus (u32_t frame, u8_t eNB_flag, u8_t UE_index, u8_t e RLC_SDU_CONFIRM_NO, data->pdcp_read_header.data_size, data->data, - PDCP_DATA_PDU); + pdcp_mode); } else { - LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u, UE_index %d, eNB_flag %d\n", - data->pdcp_read_header.inst, data->pdcp_read_header.rb_id, UE_index, eNB_flag); + LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u, UE_index %d, eNB_flag %d eNB_index %d\n", + data->pdcp_read_header.inst, data->pdcp_read_header.rb_id, UE_index, eNB_flag,eNB_index); } - } else if (eNB_flag) { + } else if (eNB_flag) { // eNB /* rb_id = 0, thus interpreated as broadcast and transported as * multiple unicast is a broadcast packet, we have to send this * packet on all default RABS of all connected UEs @@ -536,15 +552,13 @@ int pdcp_fifo_read_input_sdus (u32_t frame, u8_t eNB_flag, u8_t UE_index, u8_t e frame, pdcp_read_header.inst, pdcp_read_header.data_size, pdcp_read_header.inst, pdcp_read_header.rb_id); #endif - pdcp_data_req(pdcp_read_header.inst, - frame, - eNB_flag, - pdcp_read_header.rb_id, - RLC_MUI_UNDEFINED, - RLC_SDU_CONFIRM_NO, - pdcp_read_header.data_size, - (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_DATA_PDU); + pdcp_data_req(eNB_index,UE_index,frame, eNB_flag, + pdcp_read_header.rb_id, + RLC_MUI_UNDEFINED, + RLC_SDU_CONFIRM_NO, + pdcp_read_header.data_size, + (unsigned char *)NLMSG_DATA(nas_nlh_rx), + PDCP_DATA_PDU); } else { LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u\n", pdcp_read_header.inst, pdcp_read_header.rb_id); @@ -554,22 +568,25 @@ int pdcp_fifo_read_input_sdus (u32_t frame, u8_t eNB_flag, u8_t UE_index, u8_t e #warning CODE TO BE REVIEWED, ONLY WORK FOR SIMPLE TOPOLOGY CASES for (rab_id = DEFAULT_RAB_ID; rab_id < MAX_RB; rab_id = rab_id + NB_RB_MAX) { if (pdcp_array[pdcp_input_header.inst][rab_id%NB_RB_MAX].instanciated_instance == (pdcp_input_header.inst + 1)) { - pdcp_data_req (pdcp_read_header.inst, frame, eNB_flag, rab_id, RLC_MUI_UNDEFINED,RLC_SDU_CONFIRM_NO, - pdcp_read_header.data_size, - (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_DATA_PDU); + pdcp_data_req (eNB_index,UE_index,frame, eNB_flag, + rab_id, RLC_MUI_UNDEFINED,RLC_SDU_CONFIRM_NO, + pdcp_read_header.data_size, + (unsigned char *)NLMSG_DATA(nas_nlh_rx), + PDCP_DATA_PDU); } } } else { LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n"); - pdcp_data_req (pdcp_read_header.inst, - frame, eNB_flag, - DEFAULT_RAB_ID, - RLC_MUI_UNDEFINED, - RLC_SDU_CONFIRM_NO, - pdcp_read_header.data_size, - (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_DATA_PDU); + pdcp_data_req (eNB_index, + UE_index, + frame, eNB_flag, + DEFAULT_RAB_ID, + RLC_MUI_UNDEFINED, + RLC_SDU_CONFIRM_NO, + pdcp_read_header.data_size, + (unsigned char *)NLMSG_DATA(nas_nlh_rx), + PDCP_DATA_PDU); + } } } @@ -589,7 +606,7 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index int dst_id, rb_id; // dst for otg int pkt_size=0, pkt_cnt=0; u8 pdcp_mode, is_ue=0; - Packet_otg_elt * otg_pkt_info; + Packet_otg_elt * otg_pkt_info=NULL; int result; src_id = eNB_index; @@ -599,7 +616,7 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index if (oai_emulation.info.otg_enabled ==1 ){ module_id = (eNB_flag == 1) ? eNB_index : NB_eNB_INST + UE_index ; //rb_id = (eNB_flag == 1) ? eNB_index * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ; - + src_id = module_id; while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) { LOG_I(OTG,"Mod_id %d Frame %d Got a packet (%p), HEAD of otg_pdcp_buffer[%d] is %p and Nb elements is %d\n", module_id,frame, otg_pkt_info, module_id, pkt_list_get_head(&(otg_pdcp_buffer[module_id])), otg_pdcp_buffer[module_id].nb_elements); @@ -631,6 +648,7 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index AssertFatal (result == TRUE, "PDCP data request failed!\n"); } free(otg_pkt); + otg_pkt = NULL; } // } //else LOG_D(OTG,"frame %d enb %d-> ue %d link not yet established state %d \n", frame, eNB_index,dst_id - NB_eNB_INST, mac_get_rrc_status(module_id, eNB_flag, dst_id - NB_eNB_INST)); diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c index d914d4cb71c6ac6a87e55dcfd34ada1ad677e892..a18acbe04f381e75a794523b8f7f2e887b16594a 100644 --- a/openair2/RRC/LITE/L2_interface.c +++ b/openair2/RRC/LITE/L2_interface.c @@ -471,8 +471,11 @@ s8 mac_rrc_lite_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 sdu_size } #else // msg("\n******INST %d Srb_info %p, Srb_id=%d****\n\n",Mod_id,Srb_info,Srb_info->Srb_id); - memcpy(Srb_info->Rx_buffer.Payload,Sdu,6); - rrc_eNB_decode_ccch(Mod_id,frame,Srb_info); + if (sdu_size > 0) { + memcpy(Srb_info->Rx_buffer.Payload,Sdu,sdu_size); + Srb_info->Rx_buffer.payload_size = sdu_size; + rrc_eNB_decode_ccch(Mod_id,frame,Srb_info); + } #endif } diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c index 513d52bc2288d038f5915f5f76e932db40f380b8..6e7bebdedf462a4ee4e8decdaf9275f517272fae 100644 --- a/openair2/RRC/LITE/rrc_common.c +++ b/openair2/RRC/LITE/rrc_common.c @@ -232,7 +232,7 @@ void openair_rrc_top_init(int eMBMS_active, u8 cba_group_active,u8 HO_active){ 0);*/ #ifdef Rel10 LOG_I(RRC,"[UE] eMBMS active state is %d \n", eMBMS_active); - for (i=0;i<NB_eNB_INST;i++) { + for (i=0;i<NB_UE_INST;i++) { UE_rrc_inst[i].MBMS_flag = (uint8_t)eMBMS_active; } #endif diff --git a/openair2/UTIL/OCG/OCG.h b/openair2/UTIL/OCG/OCG.h index 2ce9a2f91f072d3313f6771b8b56edfc27983fcb..8c82a5508657d2b6652dd9b09545930d2e3dbfce 100644 --- a/openair2/UTIL/OCG/OCG.h +++ b/openair2/UTIL/OCG/OCG.h @@ -693,12 +693,13 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need unsigned int n_frames; unsigned int n_frames_flag; // if set, then let the emulation goes to infinity unsigned char frame_type; + char * frame_type_name; unsigned char tdd_config; unsigned char tdd_config_S; unsigned char extended_prefix_flag; unsigned char N_RB_DL; unsigned char transmission_mode; - + int max_predefined_traffic_config_index; int max_customized_traffic_config_index; diff --git a/openair2/UTIL/OCG/OCG_parse_XML.c b/openair2/UTIL/OCG/OCG_parse_XML.c index 8bf01c0eb7fc14a3093ceff13c35561b94eeb9c6..4de77c26e08e80490d4305b44f7b6d3f4b5592e2 100644 --- a/openair2/UTIL/OCG/OCG_parse_XML.c +++ b/openair2/UTIL/OCG/OCG_parse_XML.c @@ -73,6 +73,8 @@ static int wall_penetration_loss_dB_; static int system_bandwidth_MB_; static int system_frequency_GHz_; static int transmission_mode_; +static int frame_type_; +static int tdd_config_; static int antenna_; static int eNB_antenna_; static int UE_antenna_; @@ -263,6 +265,10 @@ void start_element(void *user_data, const xmlChar *name, const xmlChar **attrs) system_frequency_GHz_ = 1; } else if (!xmlStrcmp(name,(unsigned char*) "TRANSMISSION_MODE")) { transmission_mode_ = 1; + } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_TYPE")) { + frame_type_ = 1; + } else if (!xmlStrcmp(name,(unsigned char*) "TDD_CONFIG")) { + tdd_config_ = 1; } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA")) { antenna_ = 1; } else if (!xmlStrcmp(name,(unsigned char*) "eNB_ANTENNA")) { @@ -589,6 +595,10 @@ void end_element(void *user_data, const xmlChar *name) { // called once at the e system_frequency_GHz_ = 0; } else if (!xmlStrcmp(name,(unsigned char*) "TRANSMISSION_MODE")) { transmission_mode_ = 0; + } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_TYPE")) { + frame_type_ = 0; + } else if (!xmlStrcmp(name,(unsigned char*) "TDD_CONFIG")) { + tdd_config_ = 0; } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA")) { antenna_ = 0; } else if (!xmlStrcmp(name,(unsigned char*) "eNB_ANTENNA")) { @@ -903,6 +913,10 @@ void characters(void *user_data, const xmlChar *xmlch, int xmllen) { // called o oai_emulation.environment_system_config.system_frequency_GHz = atof(ch); } else if (transmission_mode_) { oai_emulation.info.transmission_mode = atof(ch); + } else if (frame_type_) { + oai_emulation.info.frame_type_name = strndup(ch, len); + } else if (tdd_config_) { + oai_emulation.info.tdd_config = atof(ch); } else if (antenna_) { if (eNB_antenna_) { if (number_of_sectors_) { diff --git a/targets/README.txt b/targets/README.txt index b9ac2645e316a0357fbc7963520f2af4572ba369..fcaf698ac8576ed116e70fe0d732195bb4e79123 100644 --- a/targets/README.txt +++ b/targets/README.txt @@ -15,6 +15,8 @@ First, you must have all four openair SW directories, openair1, openair2, openai 1. The following packages must be available on your system: - libblas and libblas-dev + - libconfig++8-dev + - libgtk-3-dev - libxml2 and libxml2-dev and gccxml - libforms-bin libforms-dev - libatlas-base-dev and libatlas-headers (for Ubuntu 11.04, libatlas-dev instead of libatlas-headers) diff --git a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas index 3ccce8b0a143940636c17127207f50525c195944..cd5a8adbb4d6c639ad319a351c94d0158f094727 100755 --- a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas +++ b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas @@ -24,7 +24,7 @@ if [ $1 -ge 2 ]; then sudo ifconfig oai2 10.0.3.3 netmask 255.255.255.0 broadcast 10.0.3.255 # enb -> ue2 - $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 11 + $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 14 # ue2 -> enb $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i2 -z0 -s 10.0.3.3 -t 10.0.3.1 -r 3 fi @@ -34,7 +34,7 @@ if [ $1 -ge 3 ]; then sudo ifconfig oai3 10.0.4.4 netmask 255.255.255.0 broadcast 10.0.4.255 # enb -> ue2 - $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 19 + $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 25 # ue2 -> enb $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i3 -z0 -s 10.0.4.4 -t 10.0.4.1 -r 3 fi diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index 319f7363e7fccbd7bfa8b1b571514991b88cfe14..52984ea267c8f68c1d7466ca73434a45b71eabef 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -951,7 +951,7 @@ void *l2l1_task(void *args_p) { // calibrate at the end of each frame if there is some time left if ((sleep_time_us > 0) && (ethernet_flag == 0)) { LOG_I(EMU, "[TIMING] Adjust average frame duration, sleep for %d us\n", sleep_time_us); - usleep (sleep_time_us); + //usleep (sleep_time_us); sleep_time_us = 0; // reset the timer, could be done per n SF } #ifdef SMBV diff --git a/targets/SIMU/USER/oaisim_config.c b/targets/SIMU/USER/oaisim_config.c index b0887abd23553a4ad005dc22b64032f2bb6657f6..9fcdbfaf11b4f40aca43d756206e15e46a8eb8e2 100644 --- a/targets/SIMU/USER/oaisim_config.c +++ b/targets/SIMU/USER/oaisim_config.c @@ -142,6 +142,12 @@ mapping otg_distribution_names[] = {"background_dist",13}, {NULL, -1} }; +mapping frame_type_names[] = +{ + {"TDD", 1}, + {"FDD", 0}, + {NULL, -1} +}; mapping switch_names[] = { @@ -372,13 +378,14 @@ void init_oai_emulation() { oai_emulation.info.g_log_verbosity = 0x15; oai_emulation.info.g_log_verbosity_option = "medium"; - oai_emulation.info.frame_type=1; - oai_emulation.info.tdd_config=3; - oai_emulation.info.tdd_config_S=0; - oai_emulation.info.extended_prefix_flag=0; - oai_emulation.info.N_RB_DL=25; - oai_emulation.info.transmission_mode=2; - + oai_emulation.info.frame_type=TDD; + oai_emulation.info.frame_type_name="TDD"; + oai_emulation.info.tdd_config=3; + oai_emulation.info.tdd_config_S=0; + oai_emulation.info.extended_prefix_flag=0; + oai_emulation.info.N_RB_DL=25; + oai_emulation.info.transmission_mode=2; + oai_emulation.profile = "EURECOM"; } @@ -424,7 +431,6 @@ void oaisim_config() { g_log->log_component[OTG_LATENCY].filelog=1; g_log->log_component[OTG_OWD].filelog = 1;*/ ocg_config_app(); // packet generator - // oai_emulation.info.frame_type=1; } } @@ -432,18 +438,11 @@ int olg_config() { int comp; int ocg_log_level = map_str_to_int(log_level_names, oai_emulation.emulation_config.log_emu.level); int ocg_log_verbosity= map_str_to_int(log_verbosity_names, oai_emulation.emulation_config.log_emu.verbosity); - LOG_I(EMU, "ocg log level %d, oai log level%d \n ",ocg_log_level, oai_emulation.info.g_log_level); // fix me: oai_emulation.info.g_log_level = ((oai_emulation.info.ocg_enabled == 1) && (ocg_log_level != -1)) ? ocg_log_level : oai_emulation.info.g_log_level; oai_emulation.info.g_log_verbosity = (((oai_emulation.info.ocg_enabled == 1) && (ocg_log_verbosity != -1)) ? ocg_log_verbosity : map_str_to_int(log_verbosity_names, oai_emulation.info.g_log_verbosity_option)); - LOG_N(EMU, "global log level is set to (%s,%d) with vebosity (%s, 0x%x) and frequency %d\n", - map_int_to_str (log_level_names, oai_emulation.info.g_log_level), - oai_emulation.info.g_log_level, - map_int_to_str (log_verbosity_names, oai_emulation.info.g_log_verbosity), - oai_emulation.info.g_log_verbosity, - oai_emulation.emulation_config.log_emu.interval ); set_glog(oai_emulation.info.g_log_level, oai_emulation.info.g_log_verbosity ); //g_glog // component, log level, log interval for (comp = PHY; comp < MAX_LOG_COMPONENTS ; comp++) @@ -451,7 +450,15 @@ int olg_config() { oai_emulation.info.g_log_level, oai_emulation.info.g_log_verbosity, oai_emulation.emulation_config.log_emu.interval); - + LOG_I(EMU, "OCG log level %d, oai log level%d \n ",ocg_log_level, oai_emulation.info.g_log_level); + LOG_N(EMU,"global log level is set to (%s,%d) with vebosity (%s, 0x%x) and frequency %d\n", + map_int_to_str (log_level_names, oai_emulation.info.g_log_level), + oai_emulation.info.g_log_level, + map_int_to_str (log_verbosity_names,oai_emulation.info.g_log_verbosity), + oai_emulation.info.g_log_verbosity, + oai_emulation.emulation_config.log_emu.interval ); + + /* // if perf eval then reset the otg log level set_comp_log(PHY, LOG_EMERG, 0x15,1); set_comp_log(EMU, LOG_EMERG, 0x15,1); @@ -470,7 +477,7 @@ int olg_config() { set_log(RAL_ENB, LOG_DEBUG, 1); set_log(RAL_UE, LOG_DEBUG, 1); #endif - + //set_log(OCG, LOG_DEBUG, 1); //set_log(EMU, LOG_INFO, 20); set_log(MAC, LOG_DEBUG, 1); @@ -491,14 +498,31 @@ int olg_config() { set_comp_log(OTG, LOG_ERR, 0x15,1); set_comp_log(OMG, LOG_ERR, 0x15,1); set_comp_log(OPT, LOG_ERR, 0x15,1); - + */ // set_comp_log(MAC, LOG_TRACE, LOG_FULL,1); return 1; } int ocg_config_env() { // int func related to channel desc from oaisim.c could be moved here -return 1; + + if (oai_emulation.info.ocg_enabled){ + oai_emulation.info.frame_type = map_str_to_int(frame_type_names, oai_emulation.info.frame_type_name); + if (oai_emulation.info.frame_type == -1){ + LOG_E(EMU,"frame type incorrect %s, set it to TDD \n",oai_emulation.info.frame_type_name); + oai_emulation.info.frame_type=TDD; + } + else + LOG_I(EMU,"Frame type is %s \n",oai_emulation.info.frame_type_name); + if (oai_emulation.info.frame_type == TDD ){ + if ((oai_emulation.info.tdd_config > 6) || (oai_emulation.info.tdd_config < 0)) { + LOG_E(EMU,"TDD config %d out of range, set it to 3\n",oai_emulation.info.tdd_config); + oai_emulation.info.tdd_config=3; + } else + LOG_I(EMU,"TDD config is set to \n",oai_emulation.info.tdd_config); + } + } + return 1; } int ocg_config_topo() { diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index f8ceccfa4b776d67b1619b93c84662fdd79e65c3..0b30f7c6fecff35b43c857284531209d42c1f501 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -1175,9 +1175,14 @@ void update_otg_UE(int UE_id, unsigned int ctime) { src_id = module_id; for (dst_id=0;dst_id<NUMBER_OF_eNB_MAX;dst_id++) { - if (mac_get_rrc_status(UE_id, 0/*eNB_flag*/, dst_id ) > 2 /*RRC_CONNECTED*/) { + if (mac_get_rrc_status(UE_id, 0, dst_id ) > 2 /*RRC_CONNECTED*/) { Packet_otg_elt *otg_pkt = malloc (sizeof(Packet_otg_elt)); - // Manage to add this packet to the tail of your list + if (otg_pkt!=NULL) + memset(otg_pkt,0,sizeof(Packet_otg_elt)); + else { + LOG_E(OTG,"not enough memory\n"); + exit(-1); + }// Manage to add this packet to the tail of your list (otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen(src_id, dst_id, 0, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size)); if ((otg_pkt->otg_pkt).sdu_buffer != NULL) { diff --git a/targets/TEST/OAI/case02.py b/targets/TEST/OAI/case02.py index 0f3c30d3e98b708ce0959ed34d1e9352a1b0e12a..251085be9aadd3aac7af13dc6beeaaf08768e58b 100644 --- a/targets/TEST/OAI/case02.py +++ b/targets/TEST/OAI/case02.py @@ -90,7 +90,7 @@ def execute(oai, user, pw, logfile,logdir): diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-a -A AWGN -l7 -n' + str((i+1+j) * 40) + ' -u' + str(i+1) +' -b'+ str(j+1) + conf = '-a -A AWGN -l7 -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 50) @@ -108,7 +108,7 @@ def execute(oai, user, pw, logfile,logdir): for i in range(NUM_eNB) : for j in range(NUM_UE) : - conf = '-a -A AWGN -l6 -u' + str(i+1) +' -b'+ str(j+1) + conf = '-a -A AWGN -l6 -u' + str(j+1) +' -b'+ str(i+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 > ' + trace @@ -143,10 +143,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -s15 -x1' + conf = '-A AWGN -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -x1' trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100) + oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -158,10 +158,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'RRC procedure is not finished completely in FDD mode, check the execution logs and trace BCCH, CCCH, and DCCH channels' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -F -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -s15 -x1' + conf = '-A AWGN -F -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -x1' trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100) + oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -170,13 +170,13 @@ def execute(oai, user, pw, logfile,logdir): try: test = '06' name = 'Run oai.rel8.itti.abs.rrc' - diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels' + diag = 'RRC procedure is not finished completely, check the eNB config file (default is enb.sfr.sud.conf), in addition to the execution logs and trace BCCH, CCCH, and DCCH channels' for i in range(NUM_UE) : for j in range(NUM_eNB) : log_name = logdir + '/log_' + case + test + '_' + str(i) + str(j) itti_name = log_name + '.log' trace_name = log_name + '.txt' - conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.sfr.sud.conf -n' + str((i+1+j) * 40) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name + conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.sfr.sud.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name tee = ' 2>&1 | tee -a ' + trace_name command = './oaisim.rel8.itti ' + conf oai.send('echo ' + command + ' > ' + trace_name + ';') diff --git a/targets/TEST/OAI/case03.py b/targets/TEST/OAI/case03.py index 46ab5cd9e42474c84c937095d12e791248269f24..a33292d048ef35f26fc1ac5e681d7af20dfab4e8 100644 --- a/targets/TEST/OAI/case03.py +++ b/targets/TEST/OAI/case03.py @@ -105,10 +105,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -s 15 -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + conf = '-A AWGN -l7 -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100) + oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -120,10 +120,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'RRC procedure is not finished completely in FDD mode, check the execution logs and trace BCCH, CCCH, and DCCH channels' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -F -s 15 -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + conf = '-A AWGN -l7 -F -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100) + oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -135,10 +135,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -s 15 -x 1 -Q3 -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + conf = '-A AWGN -l7 -x 1 -Q3 -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 100) + oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -150,10 +150,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'eMBMS multicast/broadcast data is not received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -s 15 -x 1 -T mscbr -Q3 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + conf = '-A AWGN -l7 -x 1 -T mscbr -Q3 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received a multicast packet', (i+1) * 100) + oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received a multicast packet', (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -165,10 +165,10 @@ def execute(oai, user, pw, logfile,logdir): diag = 'eMBMS multicast/broadcast data is not received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs' for i in range(NUM_UE) : for j in range(NUM_eNB) : - conf = '-A AWGN -l7 -F -s 15 -x 1 -T mscbr -Q3 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + conf = '-A AWGN -l7 -F -x 1 -T mscbr -Q3 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt' tee = ' 2>&1 | tee ' + trace - oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received a multicast packet', (i+1) * 100) + oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received a multicast packet', (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) else: @@ -189,7 +189,7 @@ def execute(oai, user, pw, logfile,logdir): try: test = '09' name = 'Run oai.rel10.itti.phy.eMBMS.MCCH' - diag = 'eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs' + diag = 'eMBMS procedure is not finished completely, check the eNB config file (enb.sfr.sud.conf), and make sure that the SIB13/MCCH have been correclty received by UEs' for i in range(NUM_UE) : for j in range(NUM_eNB) : log_name = logdir + '/log_' + case + test + '_' + str(i) + str(j) @@ -199,7 +199,7 @@ def execute(oai, user, pw, logfile,logdir): tee = ' 2>&1 | tee -a ' + trace_name command = './oaisim.rel10.itti ' + conf oai.send('echo ' + command + ' > ' + trace_name + ';') - oai.send_expect(command + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 100) + oai.send_expect(command + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 200) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile, trace_name) else: diff --git a/targets/itti_vcd_tasks.sav b/targets/itti_vcd_tasks.sav index dc5c2119a7c0540cad557b38c3e92c565f42e859..9883855ae83c3193b0d8da3abad12f321130e6d5 100644 --- a/targets/itti_vcd_tasks.sav +++ b/targets/itti_vcd_tasks.sav @@ -2,10 +2,10 @@ [*] GTKWave Analyzer v3.3.34 (w)1999-2012 BSI [*] Thu Dec 19 10:33:06 2013 [*] -[dumpfile] "/home/winckel/vcd_log.vcd" +[dumpfile] "/tmp/log.vcd" [dumpfile_mtime] "Thu Dec 19 10:26:58 2013" [dumpfile_size] 68919271 -[savefile] "/homes/winckel/openair/trunk/targets/itti_vcd_tasks.sav" +[savefile] "$OPENAIR_TARGETS/itti_vcd_tasks.sav" [timestart] 0 [size] 1871 1056 [pos] -1 -1