Commit e6633866 authored by Raymond Knopp's avatar Raymond Knopp

changes for RRU (merge with develop). single-thread-disable flag is functional for RRU.

parent 219016e7
......@@ -1304,35 +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)
// 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) );
if (eNB->node_function == NGFI_RRU_IF4p5)
// Allocate 2 subframes of I/Q signal data (frequency)
common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear( fp->ofdm_symbol_size*fp->symbols_per_tti*2*sizeof(int32_t) );
else if (eNB->node_function != NGFI_RRU_IF5)
// Allocate 10 subframes of I/Q signal data (frequency)
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
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));
if (eNB->node_function != NGFI_RRU_IF5)
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*(eNB->node_function==NGFI_RRU_IF4p5?2:10)*sizeof(int32_t));
#endif
}
......@@ -1379,7 +1370,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
// 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 (%lu bytes)\n",eNB_id,i,common_vars->rxdata[eNB_id][i],fp->samples_per_tti*2*sizeof(int32_t));
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
......
......@@ -288,13 +288,13 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
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];
int32_t **txdataF_BF = (do_precoding==1)?eNB_common_vars->txdataF_BF[eNB_id]:txdataF;
int32_t **txdata = eNB_common_vars->txdata[eNB_id];
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
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);
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++) {
......@@ -307,8 +307,8 @@ void do_OFDM_mod_symbol(LTE_eNB_COMMON *eNB_common_vars, int eNB_id, uint16_t ne
//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
......
......@@ -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);
......
......@@ -867,7 +867,7 @@ 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;
int tx_sfoffset = (eNB->single_thread_flag == 1) ? 3 : 2;
openair0_timestamp ts,old_ts;
if (proc->first_rx==0) {
......
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Tue Jan 3 00:00:25 2017
[*] Thu Jan 5 06:19:58 2017
[*]
[dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Mon Jan 2 23:59:11 2017"
[dumpfile_size] 93728
[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
......@@ -39,7 +39,7 @@ 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
[pattern_trace] 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment