Commit b8b2edb3 authored by Raymond Knopp's avatar Raymond Knopp

updates in ulsim for new multipath_channel declaration. Small optimization in dlsch_modulation.c

parent 0da0ce36
...@@ -328,7 +328,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -328,7 +328,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms,
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0;
re<12; re<12;
re++,x0p+=6,tti_offset++) { re+=4,x0p+=24,tti_offset+=4) {
qam64_table_offset_re=FOUR[x0p[0]]; qam64_table_offset_re=FOUR[x0p[0]];
qam64_table_offset_im=FOUR[x0p[1]]; qam64_table_offset_im=FOUR[x0p[1]];
...@@ -338,6 +338,33 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -338,6 +338,33 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms,
qam64_table_offset_im+=x0p[5]; qam64_table_offset_im+=x0p[5];
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam64_table_offset_im]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=FOUR[x0p[6]];
qam64_table_offset_im=FOUR[x0p[7]];
qam64_table_offset_re+=TWO[x0p[8]];
qam64_table_offset_im+=TWO[x0p[9]];
qam64_table_offset_re+=x0p[10];
qam64_table_offset_im+=x0p[11];
((int16_t *)&txdataF[0][tti_offset])[2]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[3]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=FOUR[x0p[12]];
qam64_table_offset_im=FOUR[x0p[13]];
qam64_table_offset_re+=TWO[x0p[14]];
qam64_table_offset_im+=TWO[x0p[15]];
qam64_table_offset_re+=x0p[16];
qam64_table_offset_im+=x0p[17];
((int16_t *)&txdataF[0][tti_offset])[4]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[5]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=FOUR[x0p[18]];
qam64_table_offset_im=FOUR[x0p[19]];
qam64_table_offset_re+=TWO[x0p[20]];
qam64_table_offset_im+=TWO[x0p[21]];
qam64_table_offset_re+=x0p[22];
qam64_table_offset_im+=x0p[23];
((int16_t *)&txdataF[0][tti_offset])[6]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[7]=qam_table_s0[qam64_table_offset_im];
} }
} }
else { else {
......
...@@ -188,7 +188,7 @@ int main(int argc, char **argv) ...@@ -188,7 +188,7 @@ 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,**s_im,**r_re,**r_im; double s_re[2][30720],s_im[2][30720],r_re[2][30720],r_im[2][30720];
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;
...@@ -583,12 +583,6 @@ int main(int argc, char **argv) ...@@ -583,12 +583,6 @@ int main(int argc, char **argv)
txdata = UE->common_vars.txdata; txdata = UE->common_vars.txdata;
s_re = malloc(2*sizeof(double*));
s_im = malloc(2*sizeof(double*));
r_re = malloc(2*sizeof(double*));
r_im = malloc(2*sizeof(double*));
// r_re0 = malloc(2*sizeof(double*));
// r_im0 = malloc(2*sizeof(double*));
nsymb = (eNB->frame_parms.Ncp == NORMAL) ? 14 : 12; nsymb = (eNB->frame_parms.Ncp == NORMAL) ? 14 : 12;
...@@ -630,13 +624,6 @@ int main(int argc, char **argv) ...@@ -630,13 +624,6 @@ int main(int argc, char **argv)
fprintf(csv_fdUL,"data_all%d=[",mcs); fprintf(csv_fdUL,"data_all%d=[",mcs);
} }
for (i=0; i<2; i++) {
s_re[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
s_im[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
r_re[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
r_im[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
}
if (xforms==1) { if (xforms==1) {
fl_initialize (&argc, argv, NULL, 0, 0); fl_initialize (&argc, argv, NULL, 0, 0);
...@@ -1716,22 +1703,6 @@ int main(int argc, char **argv) ...@@ -1716,22 +1703,6 @@ int main(int argc, char **argv)
if (test_perf !=0) if (test_perf !=0)
fclose (time_meas_fd); fclose (time_meas_fd);
printf("Freeing channel I/O\n");
for (i=0; i<2; i++) {
free(s_re[i]);
free(s_im[i]);
free(r_re[i]);
free(r_im[i]);
}
free(s_re);
free(s_im);
free(r_re);
free(r_im);
// lte_sync_time_free();
return(0); return(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