Commit 263ad2af authored by Raymond Knopp's avatar Raymond Knopp

bugfix in dlsim/ulsim for channel model

parent e86ec117
...@@ -130,7 +130,7 @@ void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_ ...@@ -130,7 +130,7 @@ void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_
} }
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][30720*2],double s_im[2][30720*2],double r_re[2][30720*2],double r_im[2][30720*2],FILE *csv_fd) { double *s_re[2],double *s_im[2],double *r_re[2],double *r_im[2],FILE *csv_fd) {
int i,u; int i,u;
int aa,aarx,aatx; int aa,aarx,aatx;
...@@ -1267,7 +1267,12 @@ int main(int argc, char **argv) ...@@ -1267,7 +1267,12 @@ int main(int argc, char **argv)
double snr_step=1,input_snr_step=1, snr_int=30; double snr_step=1,input_snr_step=1, snr_int=30;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
double s_re[2][30720*2],s_im[2][30720*2],r_re[2][30720*2],r_im[2][30720*2]; double s_re0[30720*2],s_im0[30720*2],r_re0[30720*2],r_im0[30720*2];
double s_re1[30720*2],s_im1[30720*2],r_re1[30720*2],r_im1[30720*2];
double *s_re[2]={s_re0,s_re1};
double *s_im[2]={s_im0,s_im1};
double *r_re[2]={r_re0,r_re1};
double *r_im[2]={r_im0,r_im1};
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
...@@ -1380,7 +1385,6 @@ int main(int argc, char **argv) ...@@ -1380,7 +1385,6 @@ int main(int argc, char **argv)
FILE *csv_fd=NULL; FILE *csv_fd=NULL;
char csv_fname[32]; char csv_fname[32];
int dci_flag=1; int dci_flag=1;
int llr8_flag=1;
int two_thread_flag=0; int two_thread_flag=0;
int DLSCH_RB_ALLOC; int DLSCH_RB_ALLOC;
...@@ -1413,7 +1417,7 @@ int main(int argc, char **argv) ...@@ -1413,7 +1417,7 @@ int main(int argc, char **argv)
// num_layers = 1; // num_layers = 1;
perfect_ce = 0; perfect_ce = 0;
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:WXY")) != -1) { while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:Pl:WXY")) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
awgn_flag = 1; awgn_flag = 1;
...@@ -1477,10 +1481,6 @@ int main(int argc, char **argv) ...@@ -1477,10 +1481,6 @@ int main(int argc, char **argv)
input_trch_file=1; input_trch_file=1;
break; break;
case 'L':
llr8_flag=1;
break;
case 'W': case 'W':
two_thread_flag = 1; two_thread_flag = 1;
break; break;
......
...@@ -188,7 +188,12 @@ int main(int argc, char **argv) ...@@ -188,7 +188,12 @@ int main(int argc, char **argv)
int **txdata; int **txdata;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
double s_re[2][30720],s_im[2][30720],r_re[2][30720],r_im[2][30720]; double s_re0[30720],s_im0[30720],r_re0[30720],r_im0[30720];
double s_re1[30720],s_im1[30720],r_re1[30720],r_im1[30720];
double *s_re[2]={s_re0,s_re1};
double *s_im[2]={s_im0,s_im1};
double *r_re[2]={r_re0,r_re1};
double *r_im[2]={r_im0,r_im1};
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
double iqim=0.0; double iqim=0.0;
uint8_t extended_prefix_flag=0; uint8_t extended_prefix_flag=0;
......
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