|
|
|
@@ -718,16 +718,17 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
qam16_table_offset_im+=1;
|
|
|
|
|
*jj=*jj+1;
|
|
|
|
|
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
|
|
|
|
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam16_table_offset_re]));
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s0[qam16_table_offset_im]));
|
|
|
|
|
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -756,16 +757,16 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
qam64_table_offset_im+=1;
|
|
|
|
|
*jj=*jj+1;
|
|
|
|
|
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam64_table_offset_re]));
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s0[qam64_table_offset_im]));
|
|
|
|
|
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -801,13 +802,13 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
*jj = *jj + 1;
|
|
|
|
|
|
|
|
|
|
// normalization for 2 tx antennas
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -832,17 +833,15 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
qam16_table_offset_im+=1;
|
|
|
|
|
*jj=*jj+1;
|
|
|
|
|
|
|
|
|
|
//((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam16_table_offset_re]));//>>15);
|
|
|
|
|
//((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s0[qam16_table_offset_im]));//>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam16_table_offset_re]));
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s0[qam16_table_offset_im]));
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -871,17 +870,15 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
qam64_table_offset_im+=1;
|
|
|
|
|
*jj=*jj+1;
|
|
|
|
|
|
|
|
|
|
//((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam64_table_offset_re]));//>>15);
|
|
|
|
|
//((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s0[qam64_table_offset_im]));//>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam64_table_offset_re]));
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s0[qam64_table_offset_im]));
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -896,13 +893,13 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
*jj2 = *jj2 + 1;
|
|
|
|
|
|
|
|
|
|
// normalization for 2 tx antennas
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -927,17 +924,15 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
qam16_table_offset_im+=1;
|
|
|
|
|
*jj2=*jj2+1;
|
|
|
|
|
|
|
|
|
|
//((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s1[qam16_table_offset_re]));//>>15);
|
|
|
|
|
//((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s1[qam16_table_offset_im]));//>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s1[qam16_table_offset_re]));
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s1[qam16_table_offset_im]));
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@@ -966,17 +961,15 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|
|
|
|
qam64_table_offset_im+=1;
|
|
|
|
|
*jj2=*jj2+1;
|
|
|
|
|
|
|
|
|
|
//((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s1[qam64_table_offset_re]));//>>15);
|
|
|
|
|
//((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s1[qam64_table_offset_im]));//>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
|
|
|
|
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s1[qam64_table_offset_re]));
|
|
|
|
|
((int16_t*)&tmp_sample1)[1] = (int16_t)((qam_table_s1[qam64_table_offset_im]));
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
|
|
|
|
|
if (frame_parms->nb_antennas_tx == 2) {
|
|
|
|
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += ((int16_t*)&tmp_sample2)[0];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_2_Q15)>>15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|