diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c
index 17338d85b531b89f7d8993689b3ef3340bd8fc56..5176f9ee6c148d1265dfb8a774dc3473c0a7edc5 100644
--- a/openair1/PHY/INIT/lte_init.c
+++ b/openair1/PHY/INIT/lte_init.c
@@ -29,7 +29,7 @@
 #include "LAYER2/MAC/extern.h"
 #include "MBSFN-SubframeConfigList.h"
 #include "UTIL/LOG/vcd_signal_dumper.h"
-//#define DEBUG_PHY
+#define DEBUG_PHY
 #include "assertions.h"
 #include <math.h>
 
@@ -1304,25 +1304,26 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
       common_vars->txdataF[eNB_id] = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t*));
       common_vars->txdataF_BF[eNB_id] = (int32_t **)malloc16(fp->nb_antennas_tx*sizeof(int32_t*));
 
-      for (i=0; i<14; i++) {
-        common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
+      if (eNB->node_function != NGFI_RRU_IF5) {
+	for (i=0; i<((eNB->do_precoding==0)?fp->nb_antennas_tx:14); i++) {
+	  common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
 #ifdef DEBUG_PHY
-        msg("[openair][LTE_PHY][INIT] lte_common_vars->txdataF[%d][%d] = %p (%d bytes)\n",
-            eNB_id,i,common_vars->txdataF[eNB_id][i],
-            fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
+	  printf("[openair][LTE_PHY][INIT] common_vars->txdataF[%d][%d] = %p (%lu bytes)\n",
+	      eNB_id,i,common_vars->txdataF[eNB_id][i],
+	      fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
 #endif
+	}
       }
-
       for (i=0; i<fp->nb_antennas_tx; i++) {
 	common_vars->txdataF_BF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t) );
 	if (eNB->node_function != NGFI_RCC_IF4p5)
-	  common_vars->txdata[eNB_id][i]  = (int32_t*)malloc16_clear(fp->samples_per_tti*10*sizeof(int32_t) );
+
+	  // Allocate 10 subframes of I/Q TX signal data (time) if not
+	  common_vars->txdata[eNB_id][i]  = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
 
 #ifdef DEBUG_PHY
-        msg("[openair][LTE_PHY][INIT] lte_common_vars->txdataF_BF[%d][%d] = %p (%d bytes)\n",
-            eNB_id,i,common_vars->txdataF_BF[eNB_id][i],
-            fp->ofdm_symbol_size*sizeof(int32_t)); 
-        msg("[openair][LTE_PHY][INIT] lte_common_vars->txdata[%d][%d] = %p\n",eNB_id,i,common_vars->txdata[eNB_id][i]);
+	printf("[openair][LTE_PHY][INIT] common_vars->txdata[%d][%d] = %p (%lu bytes)\n",eNB_id,i,common_vars->txdata[eNB_id][i],
+	       fp->samples_per_tti*10*sizeof(int32_t));
 #endif
       }
       
@@ -1358,17 +1359,25 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
 
       for (i=0; i<fp->nb_antennas_rx; i++) {
 	if (eNB->node_function != NGFI_RCC_IF4p5) {
+	  // allocate 2 subframes of I/Q signal data (time) if not an RCC (no time-domain signals)
 	  common_vars->rxdata[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
-	  common_vars->rxdata_7_5kHz[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*sizeof(int32_t) );
+
+	  if (eNB->node_function != NGFI_RRU_IF5)
+	    // allocate 2 subframes of I/Q signal data (time, 7.5 kHz offset)
+	    common_vars->rxdata_7_5kHz[eNB_id][i] = (int32_t*)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
+	}
+	if (eNB->node_function != NGFI_RRU_IF5)
+	  // allocate 2 subframes of I/Q signal data (frequency)
+	  common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
 #ifdef DEBUG_PHY
-	  printf("[openair][LTE_PHY][INIT] common_vars->rxdata[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata[eNB_id][i]);
-	  printf("[openair][LTE_PHY][INIT] common_vars->rxdata_7_5kHz[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata_7_5kHz[eNB_id][i]);
+	printf("[openair][LTE_PHY][INIT] common_vars->rxdata[%d][%d] = %p (%lu bytes)\n",eNB_id,i,common_vars->rxdata[eNB_id][i],fp->samples_per_tti*10*sizeof(int32_t));
+	if (eNB->node_function != NGFI_RRU_IF5)
+	  printf("[openair][LTE_PHY][INIT] common_vars->rxdata_7_5kHz[%d][%d] = %p (%lu bytes)\n",eNB_id,i,common_vars->rxdata_7_5kHz[eNB_id][i],fp->samples_per_tti*2*sizeof(int32_t));
 #endif
-	}
         common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(fp->ofdm_symbol_size*fp->symbols_per_tti) );
       }
       
-      if (eNB->node_function != NGFI_RRU_IF4p5) {
+      if ((eNB->node_function != NGFI_RRU_IF4p5)&&(eNB->node_function != NGFI_RRU_IF5)) {
 	// Channel estimates for SRS
 	for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
 	  
@@ -1383,7 +1392,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
 	
 	common_vars->sync_corr[eNB_id] = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_tti );
       }
-    } else { //UPLINK abstraction = 1
+    } // abstraction_flag = 0
+    else { //UPLINK abstraction = 1
       eNB->sinr_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
     }
   } //eNB_id
@@ -1391,7 +1401,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
   
   
   if (abstraction_flag==0) {
-    if (eNB->node_function != NGFI_RRU_IF4p5) {
+    if ((eNB->node_function != NGFI_RRU_IF4p5)&&(eNB->node_function != NGFI_RRU_IF5)) {
       generate_ul_ref_sigs_rx();
       
       // SRS
@@ -1405,7 +1415,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
   
   // ULSCH VARS, skip if NFGI_RRU_IF4
   
-  if (eNB->node_function!=NGFI_RRU_IF4p5)
+  if ((eNB->node_function!=NGFI_RRU_IF4p5)&&(eNB->node_function != NGFI_RRU_IF5))
     prach_vars->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int16_t) );
   
   /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
@@ -1418,7 +1428,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
 #endif
   }
   
-  if (eNB->node_function != NGFI_RRU_IF4p5) {
+  if ((eNB->node_function != NGFI_RRU_IF4p5)&&(eNB->node_function != NGFI_RRU_IF5)) {
     AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->prach_ifft) / sizeof(prach_vars->prach_ifft[0]),
 		"nb_antennas_rx too large");
     for (i=0; i<fp->nb_antennas_rx; i++) {
diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
index 4d3456b2aec9a13c6173bc1518bde56403426e65..3ffc50efb9b7c173f10062982763f2ac9d405b3d 100755
--- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
@@ -43,7 +43,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
   int32_t **txdataF      = (eNB->CC_id==0) ? eNB->common_vars.txdataF[0] : PHY_vars_eNB_g[0][0]->common_vars.txdataF[0];
   int32_t **rxdataF      = eNB->common_vars.rxdataF[0];
   int16_t **rxsigF       = eNB->prach_vars.rxsigF;  
-  void *tx_buffer        = eNB->ifbuffer.tx;
+  void *tx_buffer        = eNB->ifbuffer.tx[subframe&1];
   void *tx_buffer_prach  = eNB->ifbuffer.tx_prach;
       
   uint16_t symbol_id=0, element_id=0;
@@ -132,7 +132,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
                                         symbol_id,
                                         &tx_buffer,
                                         db_fulllength,
-      			                            1,
+					1,
                                         IF4p5_PULFFT)) < 0) {
         perror("ETHERNET write for IF4p5_PULFFT\n");
       }
@@ -333,12 +333,16 @@ void gen_IF4p5_prach_header(IF4p5_header_t *prach_packet, int frame, int subfram
 void malloc_IF4p5_buffer(PHY_VARS_eNB *eNB) {
   // Keep the size large enough 
   eth_state_t *eth = (eth_state_t*) (eNB->ifdevice.priv);
+  int i;
+
   if (eth->flags == ETH_RAW_IF4p5_MODE) {
-    eNB->ifbuffer.tx       = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
+    for (i=0;i<10;i++)
+      eNB->ifbuffer.tx[i]       = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
     eNB->ifbuffer.tx_prach = malloc(RAW_IF4p5_PRACH_SIZE_BYTES);
     eNB->ifbuffer.rx       = malloc(RAW_IF4p5_PRACH_SIZE_BYTES); 
-  } else {     
-    eNB->ifbuffer.tx       = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
+  } else {
+    for (i=0;i<10;i++)
+      eNB->ifbuffer.tx[i]       = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
     eNB->ifbuffer.tx_prach = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
     eNB->ifbuffer.rx       = malloc(UDP_IF4p5_PRACH_SIZE_BYTES);
   }
diff --git a/openair1/PHY/LTE_TRANSPORT/pcfich.c b/openair1/PHY/LTE_TRANSPORT/pcfich.c
index 08a3d80904fb886948898cd227f45842f0e56d42..3b141372f03dd0e12e7077c69903c0033862b9e2 100644
--- a/openair1/PHY/LTE_TRANSPORT/pcfich.c
+++ b/openair1/PHY/LTE_TRANSPORT/pcfich.c
@@ -191,7 +191,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols,
   // mapping
   nsymb = (frame_parms->Ncp==0) ? 14:12;
 
-  symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*((subframe*nsymb));
+  symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(subframe*nsymb);
   re_offset = frame_parms->first_carrier_offset;
 
   // loop over 4 quadruplets and lookup REGs
diff --git a/openair1/PHY/MODULATION/defs.h b/openair1/PHY/MODULATION/defs.h
index 6937db6d9bb19241c282ac115d82aa8a88f754d6..da599114a91919c05cb66631bc751c2dc1ce3ab4 100644
--- a/openair1/PHY/MODULATION/defs.h
+++ b/openair1/PHY/MODULATION/defs.h
@@ -82,7 +82,7 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
 
 void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
 
-void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
+void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms,int do_precoding);
 
 void remove_7_5_kHz(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe);
 
diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c
index 74037b4a6e0f9ba04432beacb239e1b8ac8bd368..8e09cea1ec7a5ab0a534d00c37b35e895d19287e 100644
--- a/openair1/PHY/MODULATION/ofdm_mod.c
+++ b/openair1/PHY/MODULATION/ofdm_mod.c
@@ -285,16 +285,16 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
 }
 
 // OFDM modulation for each symbol
-void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms)
+void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms,int do_precoding)
 {
 
-  int aa, l, slot_offset;
-  int32_t **txdataF = eNB_common_vars->txdataF[eNB_id];
+  int aa, l, slot_offset, slot_offsetF;
+  int32_t **txdataF    = eNB_common_vars->txdataF[eNB_id];
   int32_t **txdataF_BF = eNB_common_vars->txdataF_BF[eNB_id];
-  int32_t **txdata = eNB_common_vars->txdata[eNB_id];
-
-  slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
+  int32_t **txdata     = eNB_common_vars->txdata[eNB_id];
 
+  slot_offset  = (next_slot)*(frame_parms->samples_per_tti>>1);
+  slot_offsetF = (next_slot)*(frame_parms->ofdm_symbol_size)*((frame_parms->Ncp==EXTENDED) ? 6 : 7);
   //printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
   for (l=0; l<frame_parms->symbols_per_tti>>1; l++) {
   
@@ -302,13 +302,13 @@ void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t ne
 
       //printf("do_OFDM_mod_l, slot=%d, l=%d, NUMBER_OF_OFDM_CARRIERS=%d,OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES=%d\n",next_slot, l,NUMBER_OF_OFDM_CARRIERS,OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES);
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_BEAM_PRECODING,1);
-      beam_precoding(txdataF,txdataF_BF,frame_parms,eNB_common_vars->beam_weights[eNB_id],next_slot,l,aa);
+      if (do_precoding==1) beam_precoding(txdataF,txdataF_BF,frame_parms,eNB_common_vars->beam_weights[eNB_id],next_slot,l,aa);
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_BEAM_PRECODING,0);
 
       //PMCH case not implemented... 
 
-      if (frame_parms->Ncp == 1)
-        PHY_ofdm_mod(txdataF_BF[aa],         // input
+      if (frame_parms->Ncp == EXTENDED)
+        PHY_ofdm_mod((do_precoding == 1)?txdataF_BF[aa]:&txdataF[aa][slot_offsetF+l*frame_parms->ofdm_symbol_size],         // input
                      &txdata[aa][slot_offset+l*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES],            // output
                      frame_parms->ofdm_symbol_size,       
                      1,                                   // number of symbols
@@ -316,7 +316,7 @@ void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t ne
                      CYCLIC_PREFIX);
       else {
         if (l==0) {
-          PHY_ofdm_mod(txdataF_BF[aa],        // input
+          PHY_ofdm_mod((do_precoding==1)?txdataF_BF[aa]:&txdataF[aa][slot_offsetF+l*frame_parms->ofdm_symbol_size],        // input
                        &txdata[aa][slot_offset],           // output
                        frame_parms->ofdm_symbol_size,      
                        1,                                  // number of symbols
@@ -324,7 +324,7 @@ void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t ne
                        CYCLIC_PREFIX);
            
         } else {
-          PHY_ofdm_mod(txdataF_BF[aa],        // input
+	  PHY_ofdm_mod((do_precoding==1)?txdataF_BF[aa]:&txdataF[aa][slot_offsetF+l*frame_parms->ofdm_symbol_size],        // input
                        &txdata[aa][slot_offset+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(l-1)*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES],           // output
                        frame_parms->ofdm_symbol_size,      
                        1,                                  // number of symbols
diff --git a/openair1/PHY/MODULATION/slot_fep_ul.c b/openair1/PHY/MODULATION/slot_fep_ul.c
index b0798965807c1a8ac8511f775fded7dd2bff0615..e05f5361de0d21de4e198d91e6c5c34c724e475c 100644
--- a/openair1/PHY/MODULATION/slot_fep_ul.c
+++ b/openair1/PHY/MODULATION/slot_fep_ul.c
@@ -79,10 +79,10 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
 
   if (no_prefix) {
     //    subframe_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * (Ns>>1);
-    slot_offset = frame_parms->ofdm_symbol_size * (frame_parms->symbols_per_tti>>1) * (Ns%2);
+    slot_offset = frame_parms->ofdm_symbol_size * (frame_parms->symbols_per_tti>>1) * (Ns&1);
   } else {
     //    subframe_offset = frame_parms->samples_per_tti * (Ns>>1);
-    slot_offset = (frame_parms->samples_per_tti>>1) * (Ns%2);
+    slot_offset = (frame_parms->samples_per_tti>>1) * (Ns&1);
   }
 
   if (l<0 || l>=7-frame_parms->Ncp) {
@@ -108,18 +108,22 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
            1
          );
     } else {
+      
       rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*l;
+      /* should never happen for eNB
       if(rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
       {
         memcpy((void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][frame_length_samples],
                (void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][0],
                frame_parms->ofdm_symbol_size*sizeof(int));
       }
+      */
 
-      if( (rx_offset & 7) != 0){
+      // check for 256-bit alignment of input buffer and do DFT directly, else do via intermediate buffer
+      if( (rx_offset & 15) != 0){
         memcpy((void *)&tmp_dft_in,
-        		(void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][(rx_offset % frame_length_samples)],
-				frame_parms->ofdm_symbol_size*sizeof(int));
+	       (void *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][(rx_offset % frame_length_samples)],
+	       frame_parms->ofdm_symbol_size*sizeof(int));
         dft( (short *) tmp_dft_in,
              (short*)  &eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],
              1
diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h
index 182a57082f1bd988e8e717ea0b85ebe4c8c55f70..51e50e0a976d840036546b3474fb215721023125 100644
--- a/openair1/PHY/defs.h
+++ b/openair1/PHY/defs.h
@@ -436,8 +436,10 @@ typedef struct PHY_VARS_eNB_s {
   int                  in_synch;
   // indicator for master/slave (RRU)
   int                  is_slave;
+  // indicator for precoding function (eNB,3GPP_eNB_BBU)
+  int                  do_precoding;
   void                 (*do_prach)(struct PHY_VARS_eNB_s *eNB,int frame,int subframe);
-  void                 (*fep)(struct PHY_VARS_eNB_s *eNB);
+  void                 (*fep)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc);
   int                  (*td)(struct PHY_VARS_eNB_s *eNB,int UE_id,int harq_pid,int llr8_flag);
   int                  (*te)(struct PHY_VARS_eNB_s *,uint8_t *,uint8_t,LTE_eNB_DLSCH_t *,int,uint8_t,time_stats_t *,time_stats_t *,time_stats_t *);
   void                 (*proc_uespec_rx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type);
diff --git a/openair1/SCHED/defs.h b/openair1/SCHED/defs.h
index 2490a4035c14cafd2c7c708f24a9e47073a5e569..b2d823d774a494f034b98fb111ce83d8f5c05102 100644
--- a/openair1/SCHED/defs.h
+++ b/openair1/SCHED/defs.h
@@ -182,7 +182,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *pr
   @param phy_vars_eNB Pointer to eNB variables on which to act
   @param abstraction_flag Indicator of PHY abstraction
 */
-void phy_procedures_eNB_common_RX(PHY_VARS_eNB *phy_vars_eNB);
+void phy_procedures_eNB_common_RX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc);
 
 /*! \brief Scheduling for eNB TX procedures in TDD S-subframes.
   @param phy_vars_eNB Pointer to eNB variables on which to act
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 72525847560e88eafa6b6ffa5222cafedda84c9d..85c822e273239beb4c94770380311817ab866119 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -2670,7 +2670,7 @@ void init_te_thread(PHY_VARS_eNB *eNB,pthread_attr_t *attr_te) {
 }
 
 
-void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
+void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc_rxtx) {
 
   eNB_proc_t *proc = &eNB->proc;
 
@@ -2716,28 +2716,27 @@ void eNB_fep_full_2thread(PHY_VARS_eNB *eNB) {
 
 
 
-void eNB_fep_full(PHY_VARS_eNB *eNB) {
+void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc_rxtx) {
 
-  eNB_proc_t *proc = &eNB->proc;
   int l;
   LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1);
   start_meas(&eNB->ofdm_demod_stats);
-  remove_7_5_kHz(eNB,proc->subframe_rx<<1);
-  remove_7_5_kHz(eNB,1+(proc->subframe_rx<<1));
+  remove_7_5_kHz(eNB,proc_rxtx->subframe_rx<<1);
+  remove_7_5_kHz(eNB,1+(proc_rxtx->subframe_rx<<1));
   for (l=0; l<fp->symbols_per_tti/2; l++) {
     slot_fep_ul(fp,
 		&eNB->common_vars,
 		l,
-		proc->subframe_rx<<1,
+		(proc_rxtx->subframe_rx)<<1,
 		0,
 		0
 		);
     slot_fep_ul(fp,
 		&eNB->common_vars,
 		l,
-		1+(proc->subframe_rx<<1),
+		1+((proc_rxtx->subframe_rx)<<1),
 		0,
 		0
 		);
@@ -2748,11 +2747,11 @@ void eNB_fep_full(PHY_VARS_eNB *eNB) {
   
   if (eNB->node_function == NGFI_RRU_IF4p5) {
     /// **** send_IF4 of rxdataF to RCC (no prach now) **** ///
-    send_IF4p5(eNB, proc->frame_rx, proc->subframe_rx, IF4p5_PULFFT, 0);
+    send_IF4p5(eNB, proc_rxtx->frame_rx, proc_rxtx->subframe_rx, IF4p5_PULFFT, 0);
   }    
 }
 
-void eNB_fep_rru_if5(PHY_VARS_eNB *eNB) {
+void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc_rxtx) {
 
   eNB_proc_t *proc=&eNB->proc;
   uint8_t seqno=0;
@@ -2806,14 +2805,14 @@ void do_prach(PHY_VARS_eNB *eNB,int frame,int subframe) {
 
 }
 
-void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
+void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
 
 
-  eNB_proc_t *proc       = &eNB->proc;
+  //  eNB_proc_t *proc       = &eNB->proc;
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   const int subframe     = proc->subframe_rx;
   const int frame        = proc->frame_rx;
-  int offset             = (eNB->single_thread_flag==0) ? 0 : (subframe&1);
+  int offset             = (eNB->single_thread_flag==1) ? 0 : (subframe&1);
 
   if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
 
@@ -2825,7 +2824,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
   LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe);
 
 
-  if (eNB->fep) eNB->fep(eNB);
+  if (eNB->fep) eNB->fep(eNB,proc);
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 0 );
 }
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index f9a8acfa85cbcd5ffac2014489e83e62472c2e48..879573525a33f83108521fef330cd9bf1156bf50 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -1812,6 +1812,11 @@ int main(int argc, char **argv)
        eNB->common_vars.beam_weights[0][0][aa][re] = 0x00007fff/eNB->frame_parms.nb_antennas_tx; 
   }
 
+  if (transmission_mode<7)
+     eNB->do_precoding=0;
+  else
+     eNB->do_precoding=1;
+
   eNB->mac_enabled=1;
   if (two_thread_flag == 0) {
     eNB->te = dlsch_encoding;
@@ -2409,12 +2414,14 @@ int main(int argc, char **argv)
             do_OFDM_mod_symbol(&eNB->common_vars,
                                eNB_id,
                                (subframe*2),
-                               &eNB->frame_parms);
+                               &eNB->frame_parms,
+			       eNB->do_precoding);
 
             do_OFDM_mod_symbol(&eNB->common_vars,
                                eNB_id,
                                (subframe*2)+1,
-                               &eNB->frame_parms);
+                               &eNB->frame_parms,
+			       eNB->do_precoding);
 
 
 	    stop_meas(&eNB->ofdm_mod_stats);
diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h
index 1f5f7e22a5f4a06335c2555dda8e302e849f6920..2eb0a506be8f840c34ac5de1cb7f7a5ca9763fc3 100644
--- a/targets/ARCH/COMMON/common_lib.h
+++ b/targets/ARCH/COMMON/common_lib.h
@@ -248,8 +248,8 @@ typedef struct {
 
 
 typedef struct {
-  //! Tx buffer for if device
-  void *tx;
+  //! Tx buffer for if device, keep one per subframe now to allow multithreading
+  void *tx[10];
   //! Tx buffer (PRACH) for if device
   void *tx_prach;
   //! Rx buffer for if device
diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
index a12e374e8a1372091e721b2e5cdbb020acd3c0e6..3d0674c73ed281ddcab80d55f96f781ce4cda35d 100644
--- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
@@ -759,7 +759,10 @@ extern "C" {
 
   // create tx & rx streamer
   uhd::stream_args_t stream_args_rx("sc16", "sc16");
-  //stream_args_rx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].rx_num_channels*openair0_cfg[0].samples_per_packet));
+  int samples=openair0_cfg[0].sample_rate;
+  samples/=24000;
+  //  stream_args_rx.args["spp"] = str(boost::format("%d") % samples);
+
   for (i = 0; i<openair0_cfg[0].rx_num_channels; i++)
     stream_args_rx.channels.push_back(i);
   s->rx_stream = s->usrp->get_rx_stream(stream_args_rx);
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.100PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.100PRB.usrpb210.conf
index 664bbec846c844bfa334a90224436c1b65976290..aa731c8d8a23ee2e269682c3ccf3f2fc522b31e3 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.100PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.100PRB.usrpb210.conf
@@ -159,7 +159,7 @@ eNBs =
     rrh_gw_config = (
     {			  
       	local_if_name = "eth0";			  
-      	remote_address = "10.10.10.155";
+      	remote_address = "10.10.10.215";
     	local_address = "10.10.10.60"; 
     	local_port = 50000;	#for raw option local port must be the same to remote	       
     	remote_port = 50000; 
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 30239c6608caeb656d4b9893f0fda90d4284a869..99e05a39bf81cfcb89c35d445feb64d9db937d0c 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -298,14 +298,16 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
     do_OFDM_mod_symbol(&phy_vars_eNB->common_vars,
                   0,
                   subframe<<1,
-                  &phy_vars_eNB->frame_parms);
+                  &phy_vars_eNB->frame_parms,
+		  phy_vars_eNB->do_precoding);
  
     // if S-subframe generate first slot only 
     if (subframe_select(&phy_vars_eNB->frame_parms,subframe) == SF_DL) {
       do_OFDM_mod_symbol(&phy_vars_eNB->common_vars,
                     0,
                     1+(subframe<<1),
-                    &phy_vars_eNB->frame_parms);
+                    &phy_vars_eNB->frame_parms,
+                    phy_vars_eNB->do_precoding);
     }
 
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_OFDM_MODULATION,0);
@@ -556,7 +558,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
 
   if ((eNB->do_prach)&&((eNB->node_function != NGFI_RCC_IF4p5)))
     eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx);
-  phy_procedures_eNB_common_RX(eNB);
+  phy_procedures_eNB_common_RX(eNB,proc);
   
   // UE-specific RX processing for subframe n
   if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc, no_relay );
@@ -865,8 +867,8 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
   void *rxp[fp->nb_antennas_rx],*txp[fp->nb_antennas_tx]; 
   unsigned int rxs,txs;
   int i;
-  int tx_sfoffset = 3;//(eNB->single_thread_flag == 1) ? 3 : 3;
-  openair0_timestamp old_ts;
+  int tx_sfoffset = (eNB->single_thread_flag == 1) ? 3 : 2;
+  openair0_timestamp ts,old_ts;
 
   if (proc->first_rx==0) {
     
@@ -880,7 +882,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
       txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+tx_sfoffset)%10)*fp->samples_per_tti]; 
     
     txs = eNB->rfdevice.trx_write_func(&eNB->rfdevice,
-				       proc->timestamp_rx+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance,
+				       proc->timestamp_rx+eNB->ts_offset+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance,
 				       txp,
 				       fp->samples_per_tti,
 				       fp->nb_antennas_tx,
@@ -904,26 +906,32 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
   old_ts = proc->timestamp_rx;
 
   rxs = eNB->rfdevice.trx_read_func(&eNB->rfdevice,
-				    &(proc->timestamp_rx),
+				    &ts,
 				    rxp,
 				    fp->samples_per_tti,
 				    fp->nb_antennas_rx);
 
+  proc->timestamp_rx = ts-eNB->ts_offset;
+
   if (rxs != fp->samples_per_tti)
     LOG_E(PHY,"rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs);
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
  
-  if (proc->first_rx == 1)
+  if (proc->first_rx == 1) {
     eNB->ts_offset = proc->timestamp_rx;
+    proc->timestamp_rx=0;
+  }
   else {
+
     if (proc->timestamp_rx - old_ts != fp->samples_per_tti) {
       LOG_I(PHY,"rx_rf: rfdevice timing drift of %d samples\n",proc->timestamp_rx - old_ts - fp->samples_per_tti);
       eNB->ts_offset += (proc->timestamp_rx - old_ts - fp->samples_per_tti);
+      proc->timestamp_rx = ts-eNB->ts_offset;
     }
   }
-  proc->frame_rx    = ((proc->timestamp_rx-eNB->ts_offset) / (fp->samples_per_tti*10))&1023;
-  proc->subframe_rx = ((proc->timestamp_rx-eNB->ts_offset) / fp->samples_per_tti)%10;
+  proc->frame_rx    = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
+  proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10;
   proc->frame_rx    = (proc->frame_rx+proc->frame_offset)&1023;
   proc->frame_tx    = proc->frame_rx;
   if (proc->subframe_rx > 5) proc->frame_tx=(proc->frame_tx+1)&1023;
@@ -1869,8 +1877,8 @@ int start_rf(PHY_VARS_eNB *eNB) {
 }
 
 extern void eNB_fep_rru_if5(PHY_VARS_eNB *eNB);
-extern void eNB_fep_full(PHY_VARS_eNB *eNB);
-extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB);
+extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
+extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
 extern void do_prach(PHY_VARS_eNB *eNB,int frame,int subframe);
 
 void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst,eth_params_t *eth_params,int single_thread_flag,int wait_for_sync) {
@@ -1899,6 +1907,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
       switch (node_function[CC_id]) {
       case NGFI_RRU_IF5:
 	eNB->do_prach             = NULL;
+	eNB->do_precoding         = 0;
 	eNB->fep                  = eNB_fep_rru_if5;
 	eNB->td                   = NULL;
 	eNB->te                   = NULL;
@@ -1924,6 +1933,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
         }
 	break;
       case NGFI_RRU_IF4p5:
+	eNB->do_precoding         = 0;
 	eNB->do_prach             = do_prach;
 	eNB->fep                  = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full;
 	eNB->td                   = NULL;
@@ -1942,6 +1952,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
         }
 	eNB->rfdevice.host_type   = RRH_HOST;
 	eNB->ifdevice.host_type   = RRH_HOST;
+	printf("loading transport interface ...\n");
         ret = openair0_transport_load(&eNB->ifdevice, &openair0_cfg[CC_id], (eth_params+CC_id));
 	printf("openair0_transport_init returns %d for CC_id %d\n",ret,CC_id);
         if (ret<0) {
@@ -1953,6 +1964,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
 
 	break;
       case eNodeB_3GPP:
+	eNB->do_precoding         = 1;
 	eNB->do_prach             = do_prach;
 	eNB->fep                  = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full;
 	eNB->td                   = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
@@ -1973,6 +1985,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
 	eNB->ifdevice.host_type   = BBU_HOST;
 	break;
       case eNodeB_3GPP_BBU:
+	eNB->do_precoding   = 1;
 	eNB->do_prach       = do_prach;
 	eNB->fep            = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full;
 	eNB->td             = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
@@ -2005,6 +2018,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
         }
 	break;
       case NGFI_RCC_IF4p5:
+	eNB->do_precoding         = 0;
 	eNB->do_prach             = do_prach;
 	eNB->fep                  = NULL;
 	eNB->td                   = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
@@ -2028,6 +2042,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
 
 	break;
       case NGFI_RAU_IF4p5:
+	eNB->do_precoding   = 0;
 	eNB->do_prach       = do_prach;
 	eNB->fep            = NULL;
 
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 460c8be99e48d06224be52aaad361b0e7621867d..4142a05e35e84f590031dc4ef85676e79bd31d3d 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -1634,14 +1634,11 @@ int main( int argc, char **argv )
     PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*));
 
     for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
-      PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,abstraction_flag);
-      PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id;
-
+      PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag);
       PHY_vars_eNB_g[0][CC_id]->ue_dl_rb_alloc=0x1fff;
       PHY_vars_eNB_g[0][CC_id]->target_ue_dl_mcs=target_dl_mcs;
       PHY_vars_eNB_g[0][CC_id]->ue_ul_nb_rb=6;
       PHY_vars_eNB_g[0][CC_id]->target_ue_ul_mcs=target_ul_mcs;
-
       // initialization for phy-test
       for (k=0;k<NUMBER_OF_UE_MAX;k++) {
 	PHY_vars_eNB_g[0][CC_id]->transmission_mode[k] = transmission_mode;
@@ -1653,31 +1650,31 @@ int main( int argc, char **argv )
 	    for (re=0; re<frame_parms[CC_id]->ofdm_symbol_size; re++) 
 	      PHY_vars_eNB_g[0][CC_id]->common_vars.beam_weights[0][0][j][re] = 0x00007fff/frame_parms[CC_id]->nb_antennas_tx; 
       }
+
       if (phy_test==1) PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0;
       else PHY_vars_eNB_g[0][CC_id]->mac_enabled = 1;
-
+      
       if (PHY_vars_eNB_g[0][CC_id]->mac_enabled == 0) { //set default parameters for testing mode
 	for (i=0; i<NUMBER_OF_UE_MAX; i++) {
-	  PHY_vars_eNB_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
-	  PHY_vars_eNB_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index  = beta_RI;
-	  PHY_vars_eNB_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI;
-	  
-	  PHY_vars_eNB_g[0][CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = i;
-	  PHY_vars_eNB_g[0][CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(i%3);
-	  PHY_vars_eNB_g[0][CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
+	    PHY_vars_eNB_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
+	    PHY_vars_eNB_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index  = beta_RI;
+	    PHY_vars_eNB_g[0][CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI;
+	    
+	    PHY_vars_eNB_g[0][CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = i;
+	    PHY_vars_eNB_g[0][CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(i%3);
+	    PHY_vars_eNB_g[0][CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
 	}
       }
-
+      
       compute_prach_seq(&PHY_vars_eNB_g[0][CC_id]->frame_parms.prach_config_common,
-                        PHY_vars_eNB_g[0][CC_id]->frame_parms.frame_type,
-                        PHY_vars_eNB_g[0][CC_id]->X_u);
-
+			PHY_vars_eNB_g[0][CC_id]->frame_parms.frame_type,
+			PHY_vars_eNB_g[0][CC_id]->X_u);
+    
+      
       PHY_vars_eNB_g[0][CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0];
-
       PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 0;
-
     }
-
+  
 
     NB_eNB_INST=1;
     NB_INST=1;
@@ -1857,6 +1854,7 @@ int main( int argc, char **argv )
     }
   }
   else { 
+    printf("Initializing eNB threads\n");
     init_eNB(node_function,node_timing,1,eth_params,single_thread_flag,wait_for_sync);
 
     number_of_cards = 1;
diff --git a/targets/RT/USER/rru_if4p5_usrp.gtkw b/targets/RT/USER/rru_if4p5_usrp.gtkw
index df8de754db63657dad91a994779180c2e6dae4a8..d2a435202fbbb5e0d3b45f41b9159c5db5325e84 100644
--- a/targets/RT/USER/rru_if4p5_usrp.gtkw
+++ b/targets/RT/USER/rru_if4p5_usrp.gtkw
@@ -1,12 +1,12 @@
 [*]
 [*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
-[*] Mon Aug  1 18:43:22 2016
+[*] Thu Jan  5 06:19:58 2017
 [*]
 [dumpfile] "/tmp/openair_dump_eNB.vcd"
-[dumpfile_mtime] "Mon Aug  1 18:41:49 2016"
-[dumpfile_size] 22622
-[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
-[timestart] 0
+[dumpfile_mtime] "Thu Jan  5 06:09:13 2017"
+[dumpfile_size] 24570356
+[savefile] "/home/uprru1/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
+[timestart] 23491157000
 [size] 1301 716
 [pos] 309 0
 *-19.793451 29983948856 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
@@ -20,7 +20,6 @@ functions.trx_write
 functions.trx_write_if
 functions.send_if4
 functions.trx_read_if
-@29
 functions.recv_if4
 @24
 variables.trx_ts[63:0]
@@ -40,121 +39,8 @@ variables.subframe_number_RX1_eNB[63:0]
 variables.frame_number_TX1_eNB[63:0]
 variables.subframe_number_TX1_eNB[63:0]
 @28
-functions.phy_enb_sfgen
+functions.phy_eNB_ofdm_mod_l
 functions.phy_eNB_slot_fep
 functions.phy_enb_prach_rx
-@24
-variables.dci_info[63:0]
-variables.ue0_BO[63:0]
-@420
-variables.ue0_BSR[63:0]
-variables.ue0_timing_advance[63:0]
-@28
-functions.macxface_initiate_ra_proc
-functions.macxface_terminate_ra_proc
-functions.phy_enb_ulsch_msg3
-functions.macxface_SR_indication
-@420
-variables.ue0_SR_ENERGY[63:0]
-variables.ue0_SR_THRES[63:0]
-@28
-functions.phy_enb_ulsch_decoding0
-@24
-variables.ue0_res0[63:0]
-@420
-variables.ue0_rssi0[63:0]
-variables.ue0_MCS0[63:0]
-variables.ue0_RB0[63:0]
-@24
-variables.ue0_ROUND0[63:0]
-variables.ue0_SFN0[63:0]
-@28
-functions.phy_enb_ulsch_decoding1
-@24
-variables.ue0_res1[63:0]
-@420
-variables.ue0_rssi1[63:0]
-variables.ue0_MCS1[63:0]
-variables.ue0_RB1[63:0]
-@24
-variables.ue0_ROUND1[63:0]
-variables.ue0_SFN1[63:0]
-@28
-functions.phy_enb_ulsch_decoding2
-@24
-variables.ue0_res2[63:0]
-@420
-variables.ue0_rssi2[63:0]
-variables.ue0_MCS2[63:0]
-variables.ue0_RB2[63:0]
-@24
-variables.ue0_ROUND2[63:0]
-variables.ue0_SFN2[63:0]
-@28
-functions.phy_enb_ulsch_decoding3
-@24
-variables.ue0_res3[63:0]
-@420
-variables.ue0_rssi3[63:0]
-variables.ue0_MCS3[63:0]
-variables.ue0_RB3[63:0]
-@24
-variables.ue0_ROUND3[63:0]
-variables.ue0_SFN3[63:0]
-@28
-functions.phy_enb_ulsch_decoding4
-@420
-variables.ue0_rssi4[63:0]
-@24
-variables.ue0_res4[63:0]
-@420
-variables.ue0_MCS4[63:0]
-variables.ue0_RB4[63:0]
-@24
-variables.ue0_ROUND4[63:0]
-variables.ue0_SFN4[63:0]
-@28
-functions.phy_enb_ulsch_decoding5
-@24
-variables.ue0_res5[63:0]
-@420
-variables.ue0_rssi5[63:0]
-variables.ue0_MCS5[63:0]
-variables.ue0_RB5[63:0]
-@24
-variables.ue0_ROUND5[63:0]
-variables.ue0_SFN5[63:0]
-@28
-functions.phy_enb_ulsch_decoding6
-@24
-variables.ue0_res6[63:0]
-@420
-variables.ue0_rssi6[63:0]
-variables.ue0_MCS6[63:0]
-variables.ue0_RB6[63:0]
-@24
-variables.ue0_ROUND6[63:0]
-variables.ue0_SFN6[63:0]
-@28
-functions.phy_enb_ulsch_decoding7
-@24
-variables.ue0_res7[63:0]
-@420
-variables.ue0_rssi7[63:0]
-variables.ue0_MCS7[63:0]
-variables.ue0_RB7[63:0]
-@24
-variables.ue0_ROUND7[63:0]
-variables.ue0_SFN7[63:0]
-@28
-functions.phy_enb_prach_rx
-functions.phy_eNB_dlsch_encoding
-functions.phy_eNB_dlsch_modulation
-functions.phy_eNB_dlsch_scrambling
-functions.phy_enb_pdcch_tx
-functions.phy_enb_rs_tx
-functions.rrc_mac_config_req
-functions.rlc_data_req
-functions.udp_enb_task
 [pattern_trace] 1
 [pattern_trace] 0
diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c
index 7da3c3dcd193cda9fd6914046f742e0911d336b7..b75431cdc6c7b1ec4da08d39555b30cec9fefb13 100644
--- a/targets/SIMU/USER/init_lte.c
+++ b/targets/SIMU/USER/init_lte.c
@@ -41,6 +41,7 @@
 PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
                            uint8_t eNB_id,
                            uint8_t Nid_cell,
+			   eNB_func_t node_function,
                            uint8_t abstraction_flag)
 {
 
@@ -54,6 +55,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
   PHY_vars_eNB->frame_parms.nushift = PHY_vars_eNB->frame_parms.Nid_cell%6;
   phy_init_lte_eNB(PHY_vars_eNB,0,abstraction_flag);
 
+  LOG_I(PHY,"init eNB: Node Function %d\n",node_function);
   LOG_I(PHY,"init eNB: Nid_cell %d\n", frame_parms->Nid_cell);
   LOG_I(PHY,"init eNB: frame_type %d,tdd_config %d\n", frame_parms->frame_type,frame_parms->tdd_config);
   LOG_I(PHY,"init eNB: number of ue max %d number of enb max %d number of harq pid max %d\n",
@@ -61,27 +63,32 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
   LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL);
   LOG_I(PHY,"init eNB: prach_config_index %d\n", frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex);
 
+  if (node_function >= NGFI_RRU_IF5)
+    // For RRU, don't allocate DLSCH/ULSCH Transport channel buffers
+    return (PHY_vars_eNB);
+
 
   for (i=0; i<NUMBER_OF_UE_MAX; i++) {
+    LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
     for (j=0; j<2; j++) {
       PHY_vars_eNB->dlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL,abstraction_flag,frame_parms);
-
       if (!PHY_vars_eNB->dlsch[i][j]) {
-        LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
-        exit(-1);
+	LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
+	exit(-1);
       } else {
-        LOG_D(PHY,"dlsch[%d][%d] => %p\n",i,j,PHY_vars_eNB->dlsch[i][j]);
-        PHY_vars_eNB->dlsch[i][j]->rnti=0;
+	LOG_D(PHY,"dlsch[%d][%d] => %p\n",i,j,PHY_vars_eNB->dlsch[i][j]);
+	PHY_vars_eNB->dlsch[i][j]->rnti=0;
       }
     }
-
+    
+    LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n");
     PHY_vars_eNB->ulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,frame_parms->N_RB_UL, abstraction_flag);
-
+    
     if (!PHY_vars_eNB->ulsch[1+i]) {
       LOG_E(PHY,"Can't get eNB ulsch structures\n");
       exit(-1);
     }
-
+    
     // this is the transmission mode for the signalling channels
     // this will be overwritten with the real transmission mode by the RRC once the UE is connected
     PHY_vars_eNB->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2;
@@ -91,7 +98,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
     gettimeofday(&ts, NULL);
     PHY_vars_eNB->ulsch[1+i]->reference_timestamp_ms = ts.tv_sec * 1000 + ts.tv_usec / 1000;
     int j;
-
+    
     for (j=0; j<10; j++) {
       initialize(&PHY_vars_eNB->ulsch[1+i]->loc_rss_list[j]);
       initialize(&PHY_vars_eNB->ulsch[1+i]->loc_rssi_list[j]);
@@ -99,7 +106,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
       initialize(&PHY_vars_eNB->ulsch[1+i]->loc_timing_advance_list[j]);
       initialize(&PHY_vars_eNB->ulsch[1+i]->loc_timing_update_list[j]);
     }
-
+    
     initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_rss_list);
     initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_rssi_list);
     initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_subcarrier_rss_list);
@@ -107,37 +114,36 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
     initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_timing_update_list);
 #endif
   }
-
+  
   // ULSCH for RA
   PHY_vars_eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, frame_parms->N_RB_UL, abstraction_flag);
-
+  
   if (!PHY_vars_eNB->ulsch[0]) {
     LOG_E(PHY,"Can't get eNB ulsch structures\n");
     exit(-1);
   }
-
   PHY_vars_eNB->dlsch_SI  = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag, frame_parms);
   LOG_D(PHY,"eNB %d : SI %p\n",eNB_id,PHY_vars_eNB->dlsch_SI);
   PHY_vars_eNB->dlsch_ra  = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag, frame_parms);
   LOG_D(PHY,"eNB %d : RA %p\n",eNB_id,PHY_vars_eNB->dlsch_ra);
   PHY_vars_eNB->dlsch_MCH = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, 0, frame_parms);
   LOG_D(PHY,"eNB %d : MCH %p\n",eNB_id,PHY_vars_eNB->dlsch_MCH);
-
-
+  
+  
   PHY_vars_eNB->rx_total_gain_dB=130;
-
+  
   for(i=0; i<NUMBER_OF_UE_MAX; i++)
     PHY_vars_eNB->mu_mimo_mode[i].dl_pow_off = 2;
-
+  
   PHY_vars_eNB->check_for_total_transmissions = 0;
-
+  
   PHY_vars_eNB->check_for_MUMIMO_transmissions = 0;
-
+  
   PHY_vars_eNB->FULL_MUMIMO_transmissions = 0;
-
+  
   PHY_vars_eNB->check_for_SUMIMO_transmissions = 0;
-
-  PHY_vars_eNB->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
+  
+    PHY_vars_eNB->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
 
   return (PHY_vars_eNB);
 }
@@ -271,7 +277,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
     PHY_vars_eNB_g[eNB_id] = (PHY_VARS_eNB**) malloc(MAX_NUM_CCs*sizeof(PHY_VARS_eNB*));
 
     for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
-      PHY_vars_eNB_g[eNB_id][CC_id] = init_lte_eNB(frame_parms[CC_id],eNB_id,Nid_cell,abstraction_flag);
+      PHY_vars_eNB_g[eNB_id][CC_id] = init_lte_eNB(frame_parms[CC_id],eNB_id,Nid_cell,eNodeB_3GPP,abstraction_flag);
       PHY_vars_eNB_g[eNB_id][CC_id]->Mod_id=eNB_id;
       PHY_vars_eNB_g[eNB_id][CC_id]->CC_id=CC_id;
     }
diff --git a/targets/SIMU/USER/init_lte.h b/targets/SIMU/USER/init_lte.h
index bcb257056502c0bcab711555e3e93a805a2b0745..e49c24a15b75c82a568ccdfd4ea79d9aa64a39e0 100644
--- a/targets/SIMU/USER/init_lte.h
+++ b/targets/SIMU/USER/init_lte.h
@@ -25,6 +25,7 @@
 PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
                            uint8_t eNB_id,
                            uint8_t Nid_cell,
+			   eNB_func_t node_function,
                            uint8_t abstraction_flag);
 
 PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,