Commit 9a575c71 authored by nikaeinn's avatar nikaeinn

* fix the bugs for the IP connectivity when more than one UE is activated

* add the phy abstraction for eMBMS, and the MCH transport info for distributed simulation
* add supports in PDCP to detect the multicast/broadcast packets
* update the readme files, and the script start_one_eNB_multi_UE_nas



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5079 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 1428b7d9
#!/bin/sh #!/bin/sh
echo "building ctags for openair1 and openair2 ..." 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/
...@@ -2309,8 +2309,14 @@ u8 generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -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_ue_spec_dci = num_ue_spec_dci;
eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci = num_common_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); 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,
n_dci_dl =0; 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 ; 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 < (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++) { n_dci++) {
......
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
#define MAX_NUM_RE (14*1200) #define MAX_NUM_RE (14*1200)
#define SI_RNTI 0xffff #define SI_RNTI 0xffff
#define P_RNTI 0xfffd #define M_RNTI 0xfffd
#define P_RNTI 0xfffe
#define CBA_RNTI 0xfff4 #define CBA_RNTI 0xfff4
#define C_RNTI 0x1234 #define C_RNTI 0x1234
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "PHY/CODING/extern.h" #include "PHY/CODING/extern.h"
#include "SCHED/extern.h" #include "SCHED/extern.h"
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/defs.h"
//#define DEBUG_DLSCH_DECODING #define DEBUG_DLSCH_DECODING
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) { void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) {
...@@ -660,6 +660,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -660,6 +660,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
u16 i; u16 i;
#endif #endif
// may not be necessaru for PMCH??
for (eNB_id2=0;eNB_id2<NB_eNB_INST;eNB_id2++) { 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) if (PHY_vars_eNB_g[eNB_id2]->lte_frame_parms.Nid_cell == phy_vars_ue->lte_frame_parms.Nid_cell)
break; break;
...@@ -750,6 +751,35 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -750,6 +751,35 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
if (dlsch_ue->harq_processes[harq_pid]->round == 0) 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); memcpy(dlsch_eNB->harq_processes[harq_pid]->b,dlsch_ue->harq_processes[harq_pid]->b,dlsch_ue->harq_processes[harq_pid]->TBS>>3);
break; 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: default:
dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][0];
LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id);
......
...@@ -143,11 +143,12 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par ...@@ -143,11 +143,12 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
return(0); 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_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB_MCH;
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->lte_frame_parms; 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]->mcs = mcs;
// dlsch->harq_processes[0]->Ndi = ndi; // dlsch->harq_processes[0]->Ndi = ndi;
dlsch->harq_processes[0]->rvidx = rvidx; 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) { ...@@ -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; dlsch->rb_alloc[3] = 0xf;
break; 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) { 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_UE_DLSCH_t *dlsch = phy_vars_ue->dlsch_ue_MCH[eNB_id];
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->lte_frame_parms; 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]->mcs = mcs;
dlsch->harq_processes[0]->rvidx = rvidx; dlsch->harq_processes[0]->rvidx = rvidx;
// dlsch->harq_processes[0]->Ndi = ndi; // 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 ...@@ -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; int G;
if (abstraction_flag != 0) {
G = get_G(&phy_vars_eNB->lte_frame_parms, if (eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]!=0)
phy_vars_eNB->lte_frame_parms.N_RB_DL, printf("[PHY][EMU] PMCH transport block position is different than zero %d \n", eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]);
phy_vars_eNB->dlsch_eNB_MCH->rb_alloc,
get_Qm(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->mcs), memcpy(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->b,
2,phy_vars_eNB->frame,subframe); a,
phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
generate_mbsfn_pilot(phy_vars_eNB, LOG_D(PHY, "eNB %d dlsch_encoding_emul pmch , tbs is %d \n",
phy_vars_eNB->lte_eNB_common_vars.txdataF[0], phy_vars_eNB->Mod_id,
AMP, phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
subframe);
memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]],
if (dlsch_encoding(a, a,
&phy_vars_eNB->lte_frame_parms, phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
1, 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];
phy_vars_eNB->dlsch_eNB_MCH, }else {
phy_vars_eNB->frame, G = get_G(&phy_vars_eNB->lte_frame_parms,
subframe, phy_vars_eNB->lte_frame_parms.N_RB_DL,
&phy_vars_eNB->dlsch_rate_matching_stats, phy_vars_eNB->dlsch_eNB_MCH->rb_alloc,
&phy_vars_eNB->dlsch_turbo_encoding_stats, get_Qm(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->mcs),
&phy_vars_eNB->dlsch_interleaving_stats 2,phy_vars_eNB->frame,subframe);
)<0)
exit(-1); generate_mbsfn_pilot(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[0],
dlsch_scrambling(&phy_vars_eNB->lte_frame_parms,1,phy_vars_eNB->dlsch_eNB_MCH,G,0,subframe<<1); AMP,
subframe);
mch_modulation(phy_vars_eNB->lte_eNB_common_vars.txdataF[0], if (dlsch_encoding(a,
AMP, &phy_vars_eNB->lte_frame_parms,
subframe, 1,
&phy_vars_eNB->lte_frame_parms, phy_vars_eNB->dlsch_eNB_MCH,
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, void mch_extract_rbs(int **rxdataF,
int **dl_ch_estimates, int **dl_ch_estimates,
...@@ -801,5 +832,3 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue, ...@@ -801,5 +832,3 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue,
return(0); return(0);
} }
...@@ -222,14 +222,20 @@ int mch_modulation(mod_sym_t **txdataF, ...@@ -222,14 +222,20 @@ int mch_modulation(mod_sym_t **txdataF,
@param phy_vars_eNB Pointer to eNB variables @param phy_vars_eNB Pointer to eNB variables
@param subframe Subframe for PMCH @param subframe Subframe for PMCH
@param a Pointer to transport block @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) /** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
@param phy_vars_eNB Pointer to eNB variables @param phy_vars_eNB Pointer to eNB variables
@param mcs MCS for MBSFN @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) /** \brief This function generates the frequency-domain pilots (cell-specific downlink reference signals)
@param phy_vars_ue Pointer to UE variables @param phy_vars_ue Pointer to UE variables
......
...@@ -1070,18 +1070,21 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1070,18 +1070,21 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
#endif #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) { if ((next_slot%2) == 0) {
// This is DL-Cell spec pilots in Control region // This is DL-Cell spec pilots in Control region
generate_pilots_slot(phy_vars_eNB, generate_pilots_slot(phy_vars_eNB,
phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
AMP, AMP,
next_slot,1); next_slot,1);
}
}
#ifdef Rel10 #ifdef Rel10
// if mcch is active, send regardless of the node type: eNB or RN // 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 // 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); mch_pduP = mac_xface->get_mch_sdu(phy_vars_eNB->Mod_id,phy_vars_eNB->frame,next_slot>>1);
switch (r_type){ switch (r_type){
case no_relay: case no_relay:
...@@ -1129,9 +1132,9 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8 ...@@ -1129,9 +1132,9 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
}// switch }// switch
if (mch_pduP){ 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 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 #ifdef DEBUG_PHY
for (i=0;i<mch_pduP->Pdu_size;i++) for (i=0;i<mch_pduP->Pdu_size;i++)
msg("%2x.",(uint8_t)mch_pduP->payload[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 ...@@ -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); LOG_D(PHY,"[eNB/RN] Frame %d subframe %d: MCH not generated \n",phy_vars_eNB->frame,next_slot>>1);
} }
#endif #endif
} }
}
else { else {
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,1); 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) vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,0);
if (phy_vars_eNB->lte_frame_parms.frame_type == FDD) {
generate_pss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], if (next_slot == 0) {
AMP,
&phy_vars_eNB->lte_frame_parms, // First half of PSS/SSS (FDD)
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, if (phy_vars_eNB->lte_frame_parms.frame_type == FDD) {
0); generate_pss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id],
generate_sss(phy_vars_eNB->lte_eNB_common_vars.txdataF[sect_id], AMP,
AMP, &phy_vars_eNB->lte_frame_parms,
&phy_vars_eNB->lte_frame_parms, (phy_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5,
(phy_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, 0);
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 (next_slot == 0) {
if ((phy_vars_eNB->frame&3) == 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 ...@@ -1332,7 +1339,7 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,u8
} }
} }
} }
}
//return; //return;
......
...@@ -3005,8 +3005,8 @@ int lte_ue_pdcch_procedures(u8 eNB_id,u8 last_slot, PHY_VARS_UE *phy_vars_ue,u8 ...@@ -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); 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)) { 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) { if ((last_slot%2)==1) {
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation(%d)\n", 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 ...@@ -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) { 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); 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); fill_UE_dlsch_MCH(phy_vars_ue,pmch_mcs,1,0,0);
if (abstraction_flag == 0 ) {
for (l=2;l<12;l++) { for (l=2;l<12;l++) {
slot_fep_mbsfn(phy_vars_ue, slot_fep_mbsfn(phy_vars_ue,
l, l,
last_slot>>1, last_slot>>1,
0,0);//phy_vars_ue->rx_offset,0); 0,0);//phy_vars_ue->rx_offset,0);
} }
for (l=2;l<12;l++) {
rx_pmch(phy_vars_ue,
0,
last_slot>>1,
l);
} for (l=2;l<12;l++) {
/* printf("PMCH decoding, Frame %d, subframe %d, G %d\n", 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)==9?-1:0)+phy_vars_ue->frame,
last_slot>>1, 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);
*/ */
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]->nb_rb,
phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->rb_alloc, 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), get_Qm(phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->mcs),
2, 2,
((last_slot>>1)==9?-1:0)+phy_vars_ue->frame,last_slot>>1); ((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], 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->dlsch_ue_MCH[0]->harq_processes[0]->G,
phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0],0,last_slot-1); phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0],0,last_slot-1);
ret = dlsch_decoding(phy_vars_ue, ret = dlsch_decoding(phy_vars_ue,
phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0], phy_vars_ue->lte_ue_pdsch_vars_MCH[0]->llr[0],
&phy_vars_ue->lte_frame_parms, &phy_vars_ue->lte_frame_parms,
phy_vars_ue->dlsch_ue_MCH[0], phy_vars_ue->dlsch_ue_MCH[0],
phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0], phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0],
last_slot>>1, last_slot>>1,
0, 0,
0,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) if (mcch_active == 1)
phy_vars_ue->dlsch_mcch_trials[sync_area][0]++; phy_vars_ue->dlsch_mcch_trials[sync_area][0]++;
else else
......
...@@ -258,8 +258,9 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg, ...@@ -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; for (n_ue = oai_emulation.info.master[messg->master_id].first_ue;
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 ++) { oai_emulation.info.master[messg->master_id].nb_ue;
n_ue ++) {
fill_phy_ue_vars(n_ue, last_slot); fill_phy_ue_vars(n_ue, last_slot);
} }
} else { } else {
...@@ -566,7 +567,8 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int ...@@ -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<(oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local);
n_enb++) { n_enb++) {
total_tbs=0; 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); eNB_transport_info[n_enb].num_common_dci);
n_dci++) { n_dci++) {
total_tbs +=eNB_transport_info[n_enb].tbs[n_dci]; total_tbs +=eNB_transport_info[n_enb].tbs[n_dci];
......
...@@ -51,6 +51,7 @@ typedef unsigned int (*rx_handler_t) (unsigned char, char*, unsigned int); ...@@ -51,6 +51,7 @@ typedef unsigned int (*rx_handler_t) (unsigned char, char*, unsigned int);
typedef struct { typedef struct {
u32 pbch_flag:1; u32 pbch_flag:1;
u32 pmch_flag:1;
u32 pss:2; u32 pss:2;
u32 sss:8; u32 sss:8;
u32 cfi:2; u32 cfi:2;
...@@ -77,10 +78,12 @@ typedef struct { ...@@ -77,10 +78,12 @@ typedef struct {
} UE_cntl; } UE_cntl;
#define MAX_TRANSPORT_BLOCKS_BUFFER_SIZE 16384 #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 { typedef struct {
eNB_cntl cntl; eNB_cntl cntl;
u8 num_pmch;
u8 num_common_dci; u8 num_common_dci;
u8 num_ue_spec_dci; u8 num_ue_spec_dci;
DCI_ALLOC_t dci_alloc[MAX_NUM_DCI]; DCI_ALLOC_t dci_alloc[MAX_NUM_DCI];
...@@ -89,6 +92,7 @@ typedef struct { ...@@ -89,6 +92,7 @@ typedef struct {
u8 ue_id[MAX_NUM_DCI]; u8 ue_id[MAX_NUM_DCI];
u16 tbs[MAX_NUM_DCI*2]; // times 2 for dual-stream MIMO formats u16 tbs[MAX_NUM_DCI*2]; // times 2 for dual-stream MIMO formats
u8 transport_blocks[MAX_TRANSPORT_BLOCKS_BUFFER_SIZE]; u8 transport_blocks[MAX_TRANSPORT_BLOCKS_BUFFER_SIZE];
//u8 pmch_transport_blocks[MAX_PMCH_TRANSPORT_BLOCKS_BUFFER_SIZE];
} __attribute__((__packed__)) eNB_transport_info_t ; } __attribute__((__packed__)) eNB_transport_info_t ;
typedef struct { typedef struct {
......
...@@ -269,8 +269,10 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot) ...@@ -269,8 +269,10 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot)
// to be added later // to be added later
//DCI //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; eNB_transport_info[enb_id].num_common_dci;
PHY_vars_eNB_g[enb_id]->num_ue_spec_dci[(next_slot>>1)&1] = PHY_vars_eNB_g[enb_id]->num_ue_spec_dci[(next_slot>>1)&1] =
eNB_transport_info[enb_id].num_ue_spec_dci; eNB_transport_info[enb_id].num_ue_spec_dci;
PHY_vars_eNB_g[enb_id]->num_common_dci[(next_slot>>1)&1] = 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) ...@@ -279,7 +281,7 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot)
if (nb_total_dci >0) { if (nb_total_dci >0) {
memcpy(PHY_vars_eNB_g[enb_id]->dci_alloc[(next_slot>>1)&1], 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)); (nb_total_dci) * sizeof(DCI_ALLOC_t));
n_dci_dl=0; n_dci_dl=0;
...@@ -287,12 +289,13 @@ void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot) ...@@ -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++) { for (n_dci = 0; n_dci < nb_total_dci; n_dci++) {
//exclude ul 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 #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_ue_spec_dci,
eNB_transport_info[enb_id].num_common_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); payload_offset);
#endif #endif
switch (eNB_transport_info[enb_id].dlsch_type[n_dci_dl]) { 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) ...@@ -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].transport_blocks[payload_offset],
eNB_transport_info[enb_id].tbs[n_dci_dl]); eNB_transport_info[enb_id].tbs[n_dci_dl]);
break; break;