Commit 43327686 authored by Xiwen JIANG's avatar Xiwen JIANG

TDD workaround (unfinished)

parent 22868cc1
...@@ -1362,6 +1362,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1362,6 +1362,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (eNB->node_function != NGFI_RCC_IF4p5) { if (eNB->node_function != NGFI_RCC_IF4p5) {
common_vars->rxdata[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) ); common_vars->rxdata[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
common_vars->rxdata_7_5kHz[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) ); common_vars->rxdata_7_5kHz[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
common_vars->rxdata_1_4fs[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
} }
common_vars->rxdataF[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) ); common_vars->rxdataF[eNB_id] = (int32_t**)malloc16(fp->nb_antennas_rx*sizeof(int32_t*) );
...@@ -1369,9 +1370,11 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1369,9 +1370,11 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (eNB->node_function != NGFI_RCC_IF4p5) { if (eNB->node_function != NGFI_RCC_IF4p5) {
common_vars->rxdata[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) ); 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) ); common_vars->rxdata_7_5kHz[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*sizeof(int32_t) );
common_vars->rxdata_1_4fs[eNB_id][i] = (int32_t*)malloc16_clear( fp->samples_per_tti*sizeof(int32_t) );
#ifdef DEBUG_PHY #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[%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_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_1_4fs[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata_1_4fs[eNB_id][i]);
#endif #endif
} }
common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(fp->ofdm_symbol_size*fp->symbols_per_tti) ); common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(fp->ofdm_symbol_size*fp->symbols_per_tti) );
......
...@@ -1127,6 +1127,11 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1127,6 +1127,11 @@ void rx_prach(PHY_VARS_eNB *eNB,
// int en; // int en;
if ((eNB->rfdevice.type == EXMIMO_DEV) && (eNB->frame_parms.frame_type == TDD)) { //TDD workaround
remove_1_4_fs(eNB,subframe<<1); // TDD workaround for EXMIMO2 card
remove_1_4_fs(eNB,1+(subframe<<1));
}
for (aa=0; aa<nb_ant_rx; aa++) { for (aa=0; aa<nb_ant_rx; aa++) {
prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset]; prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset];
} }
......
...@@ -92,13 +92,15 @@ function [s_n2, s_e2] = gen_sig(RB) ...@@ -92,13 +92,15 @@ function [s_n2, s_e2] = gen_sig(RB)
ofdm_size = ofdm_size*ratio; ofdm_size = ofdm_size*ratio;
len = len*ratio; len = len*ratio;
s_n0 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp0:ofdm_size-1)*(0.25+7.5e3/samplerate))); %s_n0 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp0:ofdm_size-1)*(0.25+7.5e3/samplerate)));
s_n1 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp:ofdm_size-1)*(0.25+7.5e3/samplerate))); %s_n1 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp:ofdm_size-1)*(0.25+7.5e3/samplerate)));
s_n0 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp0:ofdm_size-1)*(0.25)));
s_n1 = floor(32767*exp(-sqrt(-1)*2*pi*(-cp:ofdm_size-1)*(0.25)));
s_n = [s_n0 s_n1 s_n1 s_n1 s_n1 s_n1 s_n1]; s_n = [s_n0 s_n1 s_n1 s_n1 s_n1 s_n1 s_n1];
s_n2 = zeros(1, 2*len); s_n2 = zeros(1, 2*len);
s_n2(1:2:end) = real(s_n); s_n2(1:2:end) = real(s_n);
s_n2(2:2:end) = imag(s_n); s_n2(2:2:end) = imag(s_n);
s_e = floor(32767*exp(-sqrt(-1)*2*pi*(-cpe:ofdm_size-1)*(0.25+7.5e3/samplerate))); s_e = floor(32767*exp(-sqrt(-1)*2*pi*(-cpe:ofdm_size-1)*(0.25)));
s_e = [s_e s_e s_e s_e s_e s_e]; s_e = [s_e s_e s_e s_e s_e s_e];
s_e2 = zeros(1, 2*len); s_e2 = zeros(1, 2*len);
s_e2(1:2:end) = real(s_e); s_e2(1:2:end) = real(s_e);
......
...@@ -38,7 +38,7 @@ short conjugate14_2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ; ...@@ -38,7 +38,7 @@ short conjugate14_2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ;
void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot) void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot)
{ {
int32_t **rxdata=eNB->common_vars.rxdata[0]; int32_t **rxdata=eNB->common_vars.rxdata[0];
int32_t **rxdata_1_4fs=eNB->common_vars.rxdata_7_5kHz[0]; int32_t **rxdata_1_4fs=eNB->common_vars.rxdata[0];
uint16_t len; uint16_t len;
uint32_t *fs1_4ptr; uint32_t *fs1_4ptr;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
...@@ -87,7 +87,7 @@ void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot) ...@@ -87,7 +87,7 @@ void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot)
slot_offset = (uint32_t)slot * frame_parms->samples_per_tti/2-eNB->N_TA_offset; slot_offset = (uint32_t)slot * frame_parms->samples_per_tti/2-eNB->N_TA_offset;
slot_offset2 = (uint32_t)(slot&1) * frame_parms->samples_per_tti/2; //slot_offset2 = (uint32_t)(slot&1) * frame_parms->samples_per_tti/2;
len = frame_parms->samples_per_tti/2; len = frame_parms->samples_per_tti/2;
...@@ -95,11 +95,11 @@ void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot) ...@@ -95,11 +95,11 @@ void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot)
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
rxptr128 = (__m128i *)&rxdata[aa][slot_offset]; rxptr128 = (__m128i *)&rxdata[aa][slot_offset];
rxptr128_1_4fs = (__m128i *)&rxdata_1_4fs[aa][slot_offset2]; rxptr128_1_4fs = (__m128i *)&rxdata_1_4fs[aa][slot_offset];
fs1_4ptr128 = (__m128i *)fs1_4ptr; fs1_4ptr128 = (__m128i *)fs1_4ptr;
#elif defined(__arm__) #elif defined(__arm__)
rxptr128 = (int16x8_t *)&rxdata[aa][slot_offset]; rxptr128 = (int16x8_t *)&rxdata[aa][slot_offset];
rxptr128_1_4fs = (int16x8_t *)&rxdata_1_4fs[aa][slot_offset2]; rxptr128_1_4fs = (int16x8_t *)&rxdata_1_4fs[aa][slot_offset];
fs1_4ptr128 = (int16x8_t *)fs1_4ptr; fs1_4ptr128 = (int16x8_t *)fs1_4ptr;
#endif #endif
// remove 7.5 kHz + 1/4*fs // remove 7.5 kHz + 1/4*fs
......
...@@ -2583,6 +2583,9 @@ void fep0(PHY_VARS_eNB *eNB,int slot) { ...@@ -2583,6 +2583,9 @@ void fep0(PHY_VARS_eNB *eNB,int slot) {
int l; int l;
// printf("fep0: slot %d\n",slot); // printf("fep0: slot %d\n",slot);
if ((eNB->rfdevice.type == EXMIMO_DEV) && (eNB->frame_parms.frame_type == TDD))
remove_1_4_fs(eNB,(slot&+1)+(proc->subframe_rx<<1)); // TDD workaround for EXMIMO2 card
remove_7_5_kHz(eNB,(slot&1)+(proc->subframe_rx<<1)); remove_7_5_kHz(eNB,(slot&1)+(proc->subframe_rx<<1));
for (l=0; l<fp->symbols_per_tti/2; l++) { for (l=0; l<fp->symbols_per_tti/2; l++) {
slot_fep_ul(fp, slot_fep_ul(fp,
...@@ -2724,6 +2727,12 @@ void eNB_fep_full(PHY_VARS_eNB *eNB) { ...@@ -2724,6 +2727,12 @@ void eNB_fep_full(PHY_VARS_eNB *eNB) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1);
start_meas(&eNB->ofdm_demod_stats); start_meas(&eNB->ofdm_demod_stats);
// TDD workaround
if ((eNB->rfdevice.type == EXMIMO_DEV) && (eNB->frame_parms.frame_type == TDD)) {
remove_1_4_fs(eNB,proc->subframe_rx<<1); // TDD workaround for EXMIMO2 card
remove_1_4_fs(eNB,1+(proc->subframe_rx<<1));
}
remove_7_5_kHz(eNB,proc->subframe_rx<<1); remove_7_5_kHz(eNB,proc->subframe_rx<<1);
remove_7_5_kHz(eNB,1+(proc->subframe_rx<<1)); remove_7_5_kHz(eNB,1+(proc->subframe_rx<<1));
......
...@@ -839,9 +839,9 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) ...@@ -839,9 +839,9 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
tx_filter = TXLPF5; tx_filter = TXLPF5;
} else if (openair0_cfg[card].sample_rate==7.68e6) { } else if (openair0_cfg[card].sample_rate==7.68e6) {
resampling_factor = 2; resampling_factor = 2;
//if (openair0_cfg[card].duplex_mode==duplex_mode_TDD) // TDD workaround for EXMIMO if (openair0_cfg[card].duplex_mode==duplex_mode_TDD) // TDD workaround for EXMIMO
// rx_filter = RXLPF5; rx_filter = RXLPF5;
//else else
rx_filter = RXLPF25; rx_filter = RXLPF25;
tx_filter = TXLPF25; tx_filter = TXLPF25;
} else { } else {
...@@ -899,8 +899,8 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) ...@@ -899,8 +899,8 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
p_exmimo_config->rf.rf_freq_rx[ant] = (unsigned int)openair0_cfg[card].rx_freq[ant]; p_exmimo_config->rf.rf_freq_rx[ant] = (unsigned int)openair0_cfg[card].rx_freq[ant];
// TDD workaround // TDD workaround
//if (openair0_cfg[card].duplex_mode==duplex_mode_TDD) if (openair0_cfg[card].duplex_mode==duplex_mode_TDD)
// p_exmimo_config->rf.rf_freq_rx[ant] += openair0_cfg[card].sample_rate/4; p_exmimo_config->rf.rf_freq_rx[ant] -= openair0_cfg[card].sample_rate/4;
switch (openair0_cfg[card].rxg_mode[ant]) { switch (openair0_cfg[card].rxg_mode[ant]) {
default: default:
......
...@@ -32,7 +32,7 @@ eNBs = ...@@ -32,7 +32,7 @@ eNBs =
prefix_type = "NORMAL"; prefix_type = "NORMAL";
eutra_band = 38; eutra_band = 38;
downlink_frequency = 2580000000L; downlink_frequency = 2580000000L;
uplink_frequency_offset = 0; //-120000000; uplink_frequency_offset = -350;//1920000; //0; //-120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 25; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
......
...@@ -32,7 +32,7 @@ eNBs = ...@@ -32,7 +32,7 @@ eNBs =
prefix_type = "NORMAL"; prefix_type = "NORMAL";
eutra_band = 38; eutra_band = 38;
downlink_frequency = 2580000000L; downlink_frequency = 2580000000L;
uplink_frequency_offset = -1920000; //-120000000; uplink_frequency_offset = 0; //-1920000; //-120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 25; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
......
[*] [*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI [*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Thu Jan 19 09:15:03 2017 [*] Wed Jan 18 09:49:05 2017
[*] [*]
[dumpfile] "/tmp/openair_dump_eNB.vcd" [dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Thu Jan 19 08:56:09 2017" [dumpfile_mtime] "Wed Jan 18 09:43:36 2017"
[dumpfile_size] 239663092 [dumpfile_size] 892531
[savefile] "/homes/kaltenbe/Devel/openair/openairinterface5g/targets/RT/USER/eNB_exmimo2.gtkw" [savefile] "/homes/jiangx/openair5G/openairinterface5g/targets/RT/USER/eNB_exmimo2.gtkw"
[timestart] 151032560000 [timestart] 21256800000
[size] 1215 1000 [size] 1615 1026
[pos] -1 -1 [pos] -1 -1
*-21.445595 151034994068 -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 *-22.787832 21257630000 -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
[sst_width] 374 [sst_width] 374
[signals_width] 262 [signals_width] 262
[sst_expanded] 1 [sst_expanded] 1
......
...@@ -573,12 +573,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -573,12 +573,6 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
start_meas(&softmodem_stats_rxtx_sf); start_meas(&softmodem_stats_rxtx_sf);
// **************************************** // ****************************************
// TDD workaround
//if ((eNB->rfdevice.type == EXMIMO_DEV) && (eNB->frame_parms.frame_type == TDD)) {
// remove_1_4_fs(eNB,proc->subframe_rx<<1); // TDD workaround for EXMIMO2 card
// remove_1_4_fs(eNB,1+(proc->subframe_rx<<1));
//}
// Common RX procedures subframe n // Common RX procedures subframe n
phy_procedures_eNB_common_RX(eNB); phy_procedures_eNB_common_RX(eNB);
......
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