Commit 31413ac5 authored by Xiwen JIANG's avatar Xiwen JIANG

TDD workaround for EXMIMO2 card works!!!

parent 87365655
......@@ -1127,11 +1127,6 @@ void rx_prach(PHY_VARS_eNB *eNB,
// 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++) {
prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset];
}
......
......@@ -33,8 +33,50 @@
short conjugate14[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
short conjugate14_2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ;
short conjugate14_3[8]__attribute__((aligned(16))) = {1,1,-1,1,-1,-1,1,-1} ;
void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot)
{
int32_t **rxdata=eNB->common_vars.rxdata[0];
uint16_t len;
#if defined(__x86_64__) || defined(__i386__)
__m128i *rxptr128,rxptr128_1;
#elif defined(__arm__)
int16x8_t *rxptr12;
#endif
uint32_t slot_offset;
uint8_t aa;
uint32_t i;
LTE_DL_FRAME_PARMS *frame_parms=&eNB->frame_parms;
slot_offset = (uint32_t)slot * frame_parms->samples_per_tti/2-eNB->N_TA_offset;
len = frame_parms->samples_per_tti/2;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
#if defined(__x86_64__) || defined(__i386__)
rxptr128 = (__m128i *)&rxdata[aa][slot_offset];
#elif defined(__arm__)
rxptr128 = (int16x8_t *)&rxdata[aa][slot_offset];
#endif
// remove 1/4*fs
// if (((slot>>1)&1) == 0) { // apply the sinusoid from the table directly
for (i=0; i<(len>>2); i++) {
#if defined(__x86_64__) || defined(__i386__)
rxptr128_1 = _mm_shufflelo_epi16(*rxptr128,_MM_SHUFFLE(2,3,1,0));
rxptr128_1 = _mm_shufflehi_epi16(rxptr128_1,_MM_SHUFFLE(2,3,1,0));
rxptr128[0] = _mm_sign_epi16(rxptr128_1,*(__m128i*)&conjugate14_3[0]);
rxptr128++;
#elif defined(__arm__)
#endif
}
}
}
/*
void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot)
{
int32_t **rxdata=eNB->common_vars.rxdata[0];
......@@ -154,4 +196,4 @@ void remove_1_4_fs(PHY_VARS_eNB *eNB,uint8_t slot)
}
}
}
*/
......@@ -2583,8 +2583,6 @@ void fep0(PHY_VARS_eNB *eNB,int slot) {
int l;
// 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));
for (l=0; l<fp->symbols_per_tti/2; l++) {
......@@ -2727,12 +2725,6 @@ void eNB_fep_full(PHY_VARS_eNB *eNB) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_SLOT_FEP,1);
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,1+(proc->subframe_rx<<1));
......
......@@ -900,7 +900,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
// TDD workaround
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]) {
default:
......
......@@ -32,7 +32,7 @@ eNBs =
prefix_type = "NORMAL";
eutra_band = 38;
downlink_frequency = 2580000000L;
uplink_frequency_offset = -350;//1920000; //0; //-120000000;
uplink_frequency_offset = 0;//1920000; //0; //-120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
......@@ -147,10 +147,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.146/24";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.146/24";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......
......@@ -573,6 +573,12 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
start_meas(&softmodem_stats_rxtx_sf);
// ****************************************
// TDD workaround
if ((eNB->rfdevice.type == EXMIMO_DEV) && (eNB->frame_parms.frame_type == TDD) && subframe_select(&eNB->frame_parms,proc->subframe_rx)==SF_UL) {
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
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