Commit b0f329b2 authored by Florian Kaltenberger's avatar Florian Kaltenberger

fixing a bug in lte-enb.c

removing redundand do_OFDM_mod_l from dlsim.c
parent a78ef7c9
...@@ -91,35 +91,6 @@ uint64_t DLSCH_alloc_pdu_1[2]; ...@@ -91,35 +91,6 @@ uint64_t DLSCH_alloc_pdu_1[2];
#define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2) #define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2)
//#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 //#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
//#define DLSCH_RB_ALLOC 0x0001 //#define DLSCH_RB_ALLOC 0x0001
void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms)
{
int aa, slot_offset, slot_offset_F;
slot_offset_F = (next_slot)*(frame_parms->ofdm_symbol_size)*((frame_parms->Ncp==1) ? 6 : 7);
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output
frame_parms->ofdm_symbol_size,
6, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX);
else {
normal_prefix_mod(&txdataF[aa][slot_offset_F],
&txdata[aa][slot_offset],
7,
frame_parms);
}
}
}
void DL_channel(PHY_VARS_eNB *eNB,PHY_VARS_UE *UE,int subframe,int awgn_flag,double SNR, int tx_lev,int hold_channel,int abstx, int num_rounds, int trials, int round, channel_desc_t *eNB2UE[4], void DL_channel(PHY_VARS_eNB *eNB,PHY_VARS_UE *UE,int subframe,int awgn_flag,double SNR, int tx_lev,int hold_channel,int abstx, int num_rounds, int trials, int round, channel_desc_t *eNB2UE[4],
double *s_re[2],double *s_im[2],double *r_re[2],double *r_im[2],FILE *csv_fd) { double *s_re[2],double *s_im[2],double *r_re[2],double *r_im[2],FILE *csv_fd) {
...@@ -2354,13 +2325,15 @@ int main(int argc, char **argv) ...@@ -2354,13 +2325,15 @@ int main(int argc, char **argv)
start_meas(&eNB->ofdm_mod_stats); start_meas(&eNB->ofdm_mod_stats);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id], do_OFDM_mod(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id], eNB->common_vars.txdata[eNB_id],
proc_eNB->frame_tx,
(subframe*2), (subframe*2),
&eNB->frame_parms); &eNB->frame_parms);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id], do_OFDM_mod(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id], eNB->common_vars.txdata[eNB_id],
proc_eNB->frame_tx,
(subframe*2)+1, (subframe*2)+1,
&eNB->frame_parms); &eNB->frame_parms);
...@@ -2372,8 +2345,9 @@ int main(int argc, char **argv) ...@@ -2372,8 +2345,9 @@ int main(int argc, char **argv)
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL,0); phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL,0);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id], do_OFDM_mod(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id], eNB->common_vars.txdata[eNB_id],
proc_eNB->frame_tx,
(subframe*2)+2, (subframe*2)+2,
&eNB->frame_parms); &eNB->frame_parms);
......
...@@ -327,15 +327,9 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) { ...@@ -327,15 +327,9 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
len = phy_vars_eNB->frame_parms.samples_per_tti>>1; len = phy_vars_eNB->frame_parms.samples_per_tti>>1;
else else
len = phy_vars_eNB->frame_parms.samples_per_tti; len = phy_vars_eNB->frame_parms.samples_per_tti;
/*
for (i=0;i<len;i+=4) { tx_offset = (int)slot_offset+time_offset[aa];
dummy_tx_b[i] = 0x100; if (tx_offset<0) {
dummy_tx_b[i+1] = 0x01000000;
dummy_tx_b[i+2] = 0xff00;
dummy_tx_b[i+3] = 0xff000000;
}*/
if (slot_offset+time_offset[aa]<0) {
txdata = (int16_t*)&phy_vars_eNB->common_vars.txdata[0][aa][(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->frame_parms.samples_per_tti)+tx_offset]; txdata = (int16_t*)&phy_vars_eNB->common_vars.txdata[0][aa][(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->frame_parms.samples_per_tti)+tx_offset];
len2 = -(slot_offset+time_offset[aa]); len2 = -(slot_offset+time_offset[aa]);
len2 = (len2>len) ? len : len2; len2 = (len2>len) ? len : len2;
...@@ -349,8 +343,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) { ...@@ -349,8 +343,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
} }
} }
} }
else if ((slot_offset+time_offset[aa]+len)>(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->frame_parms.samples_per_tti)) { else if ((tx_offset+len)>(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->frame_parms.samples_per_tti)) {
tx_offset = (int)slot_offset+time_offset[aa];
txdata = (int16_t*)&phy_vars_eNB->common_vars.txdata[0][aa][tx_offset]; txdata = (int16_t*)&phy_vars_eNB->common_vars.txdata[0][aa][tx_offset];
len2 = -tx_offset+LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->frame_parms.samples_per_tti; len2 = -tx_offset+LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->frame_parms.samples_per_tti;
for (i=0; i<(len2<<1); i++) { for (i=0; i<(len2<<1); i++) {
...@@ -362,7 +355,6 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) { ...@@ -362,7 +355,6 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) {
} }
} }
else { else {
tx_offset = (int)slot_offset+time_offset[aa];
txdata = (int16_t*)&phy_vars_eNB->common_vars.txdata[0][aa][tx_offset]; txdata = (int16_t*)&phy_vars_eNB->common_vars.txdata[0][aa][tx_offset];
for (i=0; i<(len<<1); i++) { for (i=0; i<(len<<1); i++) {
...@@ -1320,7 +1312,7 @@ void init_eNB_proc(int inst) { ...@@ -1320,7 +1312,7 @@ void init_eNB_proc(int inst) {
PHY_VARS_eNB *eNB; PHY_VARS_eNB *eNB;
eNB_proc_t *proc; eNB_proc_t *proc;
eNB_rxtx_proc_t *proc_rxtx; eNB_rxtx_proc_t *proc_rxtx;
pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_FH=NULL,*attr_prach=NULL,*attr_asynch=NULL,*attr_single=NULL,*attr_fep=NULL,*attr_td=NULL,*attr_te; pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_FH=NULL,*attr_prach=NULL,*attr_asynch=NULL,*attr_single=NULL,*attr_fep=NULL,*attr_td=NULL,*attr_te=NULL;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
eNB = PHY_vars_eNB_g[inst][CC_id]; eNB = PHY_vars_eNB_g[inst][CC_id];
......
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