Merge branch 'develop_integration_w09' into 'develop'
Develop integration w09 Summary of changes: - bug fixes See merge request !128
This commit is contained in:
@@ -4478,7 +4478,7 @@ void extract_dci2_info(uint8_t N_RB_DL, lte_frame_type_t frame_type, uint8_t nb_
|
|||||||
|
|
||||||
pdci_info_extarcted->rah = rah;
|
pdci_info_extarcted->rah = rah;
|
||||||
pdci_info_extarcted->mcs1 = mcs1;
|
pdci_info_extarcted->mcs1 = mcs1;
|
||||||
pdci_info_extarcted->mcs1 = mcs2;
|
pdci_info_extarcted->mcs2 = mcs2;
|
||||||
pdci_info_extarcted->rv1 = rv1;
|
pdci_info_extarcted->rv1 = rv1;
|
||||||
pdci_info_extarcted->rv2 = rv2;
|
pdci_info_extarcted->rv2 = rv2;
|
||||||
pdci_info_extarcted->harq_pid = harq_pid;
|
pdci_info_extarcted->harq_pid = harq_pid;
|
||||||
@@ -4978,7 +4978,7 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format,
|
|||||||
{
|
{
|
||||||
uint8_t rah = pdci_info_extarcted->rah;
|
uint8_t rah = pdci_info_extarcted->rah;
|
||||||
uint8_t mcs1 = pdci_info_extarcted->mcs1;
|
uint8_t mcs1 = pdci_info_extarcted->mcs1;
|
||||||
uint8_t mcs2 = pdci_info_extarcted->mcs1;
|
uint8_t mcs2 = pdci_info_extarcted->mcs2;
|
||||||
uint8_t rv1 = pdci_info_extarcted->rv1;
|
uint8_t rv1 = pdci_info_extarcted->rv1;
|
||||||
uint8_t rv2 = pdci_info_extarcted->rv2;
|
uint8_t rv2 = pdci_info_extarcted->rv2;
|
||||||
uint8_t harq_pid = pdci_info_extarcted->harq_pid;
|
uint8_t harq_pid = pdci_info_extarcted->harq_pid;
|
||||||
@@ -5615,7 +5615,7 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
|||||||
|
|
||||||
uint8_t rah = pdci_info_extarcted->rah;
|
uint8_t rah = pdci_info_extarcted->rah;
|
||||||
uint8_t mcs1 = pdci_info_extarcted->mcs1;
|
uint8_t mcs1 = pdci_info_extarcted->mcs1;
|
||||||
uint8_t mcs2 = pdci_info_extarcted->mcs1;
|
uint8_t mcs2 = pdci_info_extarcted->mcs2;
|
||||||
uint8_t rv1 = pdci_info_extarcted->rv1;
|
uint8_t rv1 = pdci_info_extarcted->rv1;
|
||||||
uint8_t rv2 = pdci_info_extarcted->rv2;
|
uint8_t rv2 = pdci_info_extarcted->rv2;
|
||||||
uint8_t harq_pid = pdci_info_extarcted->harq_pid;
|
uint8_t harq_pid = pdci_info_extarcted->harq_pid;
|
||||||
@@ -5642,9 +5642,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
|||||||
TB1_active=0;
|
TB1_active=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#ifdef DEBUG_HARQ
|
#ifdef DEBUG_HARQ
|
||||||
printf("[DCI UE]: TB0 status %d , TB1 status %d\n", TB0_active, TB1_active);
|
printf("[DCI UE]: TB0 status %d , TB1 status %d\n", TB0_active, TB1_active);
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
dlsch0_harq->mcs = mcs1;
|
dlsch0_harq->mcs = mcs1;
|
||||||
dlsch1_harq->mcs = mcs2;
|
dlsch1_harq->mcs = mcs2;
|
||||||
@@ -5682,21 +5682,23 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
|||||||
if (TB0_active==0) {
|
if (TB0_active==0) {
|
||||||
dlsch0_harq->status = SCH_IDLE;
|
dlsch0_harq->status = SCH_IDLE;
|
||||||
pdlsch0->active = 0;
|
pdlsch0->active = 0;
|
||||||
//#ifdef DEBUG_HARQ
|
#ifdef DEBUG_HARQ
|
||||||
printf("[DCI UE]: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
|
printf("[DCI UE]: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
|
||||||
//#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TB1_active==0) {
|
if (TB1_active==0) {
|
||||||
dlsch1_harq->status = SCH_IDLE;
|
dlsch1_harq->status = SCH_IDLE;
|
||||||
pdlsch1->active = 0;
|
pdlsch1->active = 0;
|
||||||
//#ifdef DEBUG_HARQ
|
#ifdef DEBUG_HARQ
|
||||||
printf("[DCI UE]: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
|
printf("[DCI UE]: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
|
||||||
//#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
||||||
|
#endif
|
||||||
|
|
||||||
// compute resource allocation
|
// compute resource allocation
|
||||||
if (TB0_active == 1){
|
if (TB0_active == 1){
|
||||||
@@ -5824,7 +5826,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
|
|||||||
dlsch1_harq->Qm = (mcs2-28)<<1;
|
dlsch1_harq->Qm = (mcs2-28)<<1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_HARQ
|
#ifdef DEBUG_HARQ
|
||||||
if (dlsch0 != NULL && dlsch1 != NULL)
|
if (dlsch0 != NULL && dlsch1 != NULL)
|
||||||
|
|||||||
@@ -1556,8 +1556,11 @@ void prec2A_TM56_128(unsigned char pmi,__m128i *ch0,__m128i *ch1)
|
|||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
void prec2A_TM56_128(unsigned char pmi,__m128i *ch0,__m128i *ch1) {
|
void prec2A_TM56_128(unsigned char pmi,__m128i *ch0,__m128i *ch1) {
|
||||||
|
|
||||||
__m128i amp;
|
// sqrt(2) is already taken into account in computation sqrt_rho_a, sqrt_rho_b,
|
||||||
amp = _mm_set1_epi16(ONE_OVER_SQRT2_Q15);
|
//so removed it
|
||||||
|
|
||||||
|
//__m128i amp;
|
||||||
|
//amp = _mm_set1_epi16(ONE_OVER_SQRT2_Q15);
|
||||||
|
|
||||||
switch (pmi) {
|
switch (pmi) {
|
||||||
|
|
||||||
@@ -1587,8 +1590,8 @@ void prec2A_TM56_128(unsigned char pmi,__m128i *ch0,__m128i *ch1) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ch0[0] = _mm_mulhi_epi16(ch0[0],amp);
|
//ch0[0] = _mm_mulhi_epi16(ch0[0],amp);
|
||||||
ch0[0] = _mm_slli_epi16(ch0[0],1);
|
//ch0[0] = _mm_slli_epi16(ch0[0],1);
|
||||||
|
|
||||||
_mm_empty();
|
_mm_empty();
|
||||||
_m_empty();
|
_m_empty();
|
||||||
@@ -1602,10 +1605,12 @@ short TM3_prec[8]__attribute__((aligned(16))) = {1,1,-1,-1,1,1,-1,-1} ;
|
|||||||
|
|
||||||
void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) {
|
void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) {
|
||||||
|
|
||||||
// __m128i amp = _mm_set1_epi16(ONE_OVER_SQRT2_Q15);
|
__m128i amp = _mm_set1_epi16(ONE_OVER_SQRT2_Q15);
|
||||||
|
|
||||||
__m128i tmp0,tmp1;
|
__m128i tmp0,tmp1;
|
||||||
|
|
||||||
|
// sqrt(2) is already taken into account in computation sqrt_rho_a, sqrt_rho_b,
|
||||||
|
//so divide by 2 is replaced by divide by sqrt(2).
|
||||||
|
|
||||||
// print_shorts("prec2A_TM3 ch0 (before):",ch0);
|
// print_shorts("prec2A_TM3 ch0 (before):",ch0);
|
||||||
// print_shorts("prec2A_TM3 ch1 (before):",ch1);
|
// print_shorts("prec2A_TM3 ch1 (before):",ch1);
|
||||||
@@ -1621,9 +1626,13 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) {
|
|||||||
// print_shorts("prec2A_TM3 ch0 (mid):",&tmp0);
|
// print_shorts("prec2A_TM3 ch0 (mid):",&tmp0);
|
||||||
// print_shorts("prec2A_TM3 ch1 (mid):",ch1);
|
// print_shorts("prec2A_TM3 ch1 (mid):",ch1);
|
||||||
|
|
||||||
|
ch0[0] = _mm_mulhi_epi16(ch0[0],amp);
|
||||||
|
ch0[0] = _mm_slli_epi16(ch0[0],1);
|
||||||
|
ch1[0] = _mm_mulhi_epi16(ch1[0],amp);
|
||||||
|
ch1[0] = _mm_slli_epi16(ch1[0],1);
|
||||||
|
|
||||||
ch0[0] = _mm_srai_epi16(ch0[0],1);
|
// ch0[0] = _mm_srai_epi16(ch0[0],1);
|
||||||
ch1[0] = _mm_srai_epi16(ch1[0],1);
|
// ch1[0] = _mm_srai_epi16(ch1[0],1);
|
||||||
|
|
||||||
// print_shorts("prec2A_TM3 ch0 (after):",ch0);
|
// print_shorts("prec2A_TM3 ch0 (after):",ch0);
|
||||||
// print_shorts("prec2A_TM3 ch1 (after):",ch1);
|
// print_shorts("prec2A_TM3 ch1 (after):",ch1);
|
||||||
@@ -1637,9 +1646,12 @@ void prec2A_TM3_128(__m128i *ch0,__m128i *ch1) {
|
|||||||
|
|
||||||
void prec2A_TM4_128(int pmi,__m128i *ch0,__m128i *ch1) {
|
void prec2A_TM4_128(int pmi,__m128i *ch0,__m128i *ch1) {
|
||||||
|
|
||||||
|
// sqrt(2) is already taken into account in computation sqrt_rho_a, sqrt_rho_b,
|
||||||
|
//so divide by 2 is replaced by divide by sqrt(2).
|
||||||
|
|
||||||
// printf ("demod pmi=%d\n", pmi);
|
// printf ("demod pmi=%d\n", pmi);
|
||||||
// __m128i amp;
|
__m128i amp;
|
||||||
// amp = _mm_set1_epi16(ONE_OVER_SQRT2_Q15);
|
amp = _mm_set1_epi16(ONE_OVER_SQRT2_Q15);
|
||||||
__m128i tmp0,tmp1;
|
__m128i tmp0,tmp1;
|
||||||
|
|
||||||
// print_shorts("prec2A_TM4 ch0 (before):",ch0);
|
// print_shorts("prec2A_TM4 ch0 (before):",ch0);
|
||||||
@@ -1663,14 +1675,14 @@ void prec2A_TM4_128(int pmi,__m128i *ch0,__m128i *ch1) {
|
|||||||
//print_shorts("prec2A_TM4 ch0 (middle):",ch0);
|
//print_shorts("prec2A_TM4 ch0 (middle):",ch0);
|
||||||
//print_shorts("prec2A_TM4 ch1 (middle):",ch1);
|
//print_shorts("prec2A_TM4 ch1 (middle):",ch1);
|
||||||
|
|
||||||
//ch0[0] = _mm_mulhi_epi16(ch0[0],amp);
|
ch0[0] = _mm_mulhi_epi16(ch0[0],amp);
|
||||||
//ch0[0] = _mm_slli_epi16(ch0[0],1);
|
ch0[0] = _mm_slli_epi16(ch0[0],1);
|
||||||
//ch1[0] = _mm_mulhi_epi16(ch1[0],amp);
|
ch1[0] = _mm_mulhi_epi16(ch1[0],amp);
|
||||||
//ch1[0] = _mm_slli_epi16(ch1[0],1);
|
ch1[0] = _mm_slli_epi16(ch1[0],1);
|
||||||
|
|
||||||
|
|
||||||
ch0[0] = _mm_srai_epi16(ch0[0],1); //divide by 2
|
// ch0[0] = _mm_srai_epi16(ch0[0],1); //divide by 2
|
||||||
ch1[0] = _mm_srai_epi16(ch1[0],1); //divide by 2
|
// ch1[0] = _mm_srai_epi16(ch1[0],1); //divide by 2
|
||||||
//print_shorts("prec2A_TM4 ch0 (end):",ch0);
|
//print_shorts("prec2A_TM4 ch0 (end):",ch0);
|
||||||
//print_shorts("prec2A_TM4 ch1 (end):",ch1);
|
//print_shorts("prec2A_TM4 ch1 (end):",ch1);
|
||||||
_mm_empty();
|
_mm_empty();
|
||||||
@@ -5801,7 +5813,7 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
#ifdef USER_MODE
|
#ifdef USER_MODE
|
||||||
|
|
||||||
|
|
||||||
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_bits_per_codeword,int round)
|
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_bits_per_codeword,int round, unsigned char harq_pid)
|
||||||
{
|
{
|
||||||
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
|
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
|
||||||
char fname[32],vname[32];
|
char fname[32],vname[32];
|
||||||
@@ -5862,12 +5874,12 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_
|
|||||||
sprintf(fname,"dlsch%d_r%d_rho.m",eNB_id,round);
|
sprintf(fname,"dlsch%d_r%d_rho.m",eNB_id,round);
|
||||||
sprintf(vname,"dl_rho_r%d_%d",eNB_id,round);
|
sprintf(vname,"dl_rho_r%d_%d",eNB_id,round);
|
||||||
|
|
||||||
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[round][0],12*N_RB_DL*nsymb,1,1);
|
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
|
||||||
|
|
||||||
sprintf(fname,"dlsch%d_r%d_rho2.m",eNB_id,round);
|
sprintf(fname,"dlsch%d_r%d_rho2.m",eNB_id,round);
|
||||||
sprintf(vname,"dl_rho2_r%d_%d",eNB_id,round);
|
sprintf(vname,"dl_rho2_r%d_%d",eNB_id,round);
|
||||||
|
|
||||||
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho_ext[0],12*N_RB_DL*nsymb,1,1);
|
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
|
||||||
|
|
||||||
sprintf(fname,"dlsch%d_rxF_r%d_comp0.m",eNB_id,round);
|
sprintf(fname,"dlsch%d_rxF_r%d_comp0.m",eNB_id,round);
|
||||||
sprintf(vname,"dl%d_rxF_r%d_comp0",eNB_id,round);
|
sprintf(vname,"dl%d_rxF_r%d_comp0",eNB_id,round);
|
||||||
@@ -5875,7 +5887,7 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_
|
|||||||
if (ue->frame_parms.nb_antenna_ports_eNB == 2) {
|
if (ue->frame_parms.nb_antenna_ports_eNB == 2) {
|
||||||
sprintf(fname,"dlsch%d_rxF_r%d_comp1.m",eNB_id,round);
|
sprintf(fname,"dlsch%d_rxF_r%d_comp1.m",eNB_id,round);
|
||||||
sprintf(vname,"dl%d_rxF_r%d_comp1",eNB_id,round);
|
sprintf(vname,"dl%d_rxF_r%d_comp1",eNB_id,round);
|
||||||
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[0][round],12*N_RB_DL*nsymb,1,1);
|
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(fname,"dlsch%d_rxF_r%d_llr.m",eNB_id,round);
|
sprintf(fname,"dlsch%d_rxF_r%d_llr.m",eNB_id,round);
|
||||||
|
|||||||
@@ -37,6 +37,9 @@
|
|||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
#include "PHY/sse_intrin.h"
|
#include "PHY/sse_intrin.h"
|
||||||
|
|
||||||
|
//#define DEBUG_LLR_SIC
|
||||||
|
|
||||||
|
|
||||||
int16_t zero[8] __attribute__ ((aligned(16))) = {0,0,0,0,0,0,0,0};
|
int16_t zero[8] __attribute__ ((aligned(16))) = {0,0,0,0,0,0,0,0};
|
||||||
int16_t ones[8] __attribute__ ((aligned(16))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff};
|
int16_t ones[8] __attribute__ ((aligned(16))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff};
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
@@ -701,7 +704,6 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
uint16_t *llr16=(uint16_t*)dlsch_llr;
|
uint16_t *llr16=(uint16_t*)dlsch_llr;
|
||||||
int i, len, nsymb;
|
int i, len, nsymb;
|
||||||
uint8_t symbol, symbol_mod;
|
uint8_t symbol, symbol_mod;
|
||||||
//uint8_t pilots;
|
|
||||||
int len_acc=0;
|
int len_acc=0;
|
||||||
uint16_t *sic_data;
|
uint16_t *sic_data;
|
||||||
uint16_t pbch_pss_sss_adjust;
|
uint16_t pbch_pss_sss_adjust;
|
||||||
@@ -719,18 +721,16 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
|
|
||||||
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) //pilots=1
|
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) //pilots=1
|
||||||
amp_tmp=dlsch0->sqrt_rho_b;
|
amp_tmp=0x1fff;//dlsch0->sqrt_rho_b; already taken into account
|
||||||
else //pilots=0
|
else //pilots=0
|
||||||
amp_tmp=dlsch0->sqrt_rho_a;
|
amp_tmp=0x1fff;//1.5*dlsch0->sqrt_rho_a; already taken into account
|
||||||
|
|
||||||
if (mod_order_0==6)
|
if (mod_order_0==6)
|
||||||
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation
|
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation to avoid overflow
|
||||||
|
|
||||||
|
|
||||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,2,subframe,symbol);
|
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,2,subframe,symbol);
|
||||||
|
|
||||||
// printf("amp_tmp=%d\n", amp_tmp);
|
|
||||||
|
|
||||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||||
if (frame_parms->mode1_flag==0)
|
if (frame_parms->mode1_flag==0)
|
||||||
len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3);
|
len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3);
|
||||||
@@ -750,26 +750,21 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
1,
|
1,
|
||||||
len);
|
len);
|
||||||
|
|
||||||
|
|
||||||
// printf ("Got x0*rho_a\n");
|
|
||||||
|
|
||||||
mult_cpx_vector((int16_t *)rho_1, //Q15
|
mult_cpx_vector((int16_t *)rho_1, //Q15
|
||||||
(int16_t *)rho_amp_x0, //Q13
|
(int16_t *)rho_amp_x0, //Q13
|
||||||
(int16_t*)rho_rho_amp_x0,
|
(int16_t*)rho_rho_amp_x0,
|
||||||
len,
|
len,
|
||||||
13);
|
13);
|
||||||
/* write_output("rho_for_multipl.m","rho_for_multipl", rho_1,len,1,
|
|
||||||
|
#ifdef DEBUG_LLR_SIC
|
||||||
|
write_output("rho_for_multipl.m","rho_for_m", rho_1,len,1,
|
||||||
symbol==num_pdcch_symbols ? 15 :
|
symbol==num_pdcch_symbols ? 15 :
|
||||||
symbol==nsymb-1 ? 14 : 13);
|
symbol==nsymb-1 ? 14 : 13);
|
||||||
|
|
||||||
write_output("rho_rho_in_llr.m","rho2", rho_rho_amp_x0,len,1,
|
write_output("rho_rho_in_llr.m","rho2", rho_rho_amp_x0,len,1,
|
||||||
symbol==num_pdcch_symbols ? 15 :
|
symbol==num_pdcch_symbols ? 15 :
|
||||||
symbol==nsymb-1 ? 14 : 13);
|
symbol==nsymb-1 ? 14 : 13);
|
||||||
// printf ("Computed rho*rho_a*x0\n");*/
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//rho_rho_amp_x0_512 = (int16_t)((512*(int16_t *)rho_rho_amp_x0)>>15);
|
|
||||||
|
|
||||||
|
|
||||||
sub_cpx_vector16((int16_t *)rxF,
|
sub_cpx_vector16((int16_t *)rxF,
|
||||||
(int16_t *)rho_rho_amp_x0,
|
(int16_t *)rho_rho_amp_x0,
|
||||||
@@ -777,23 +772,16 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
(int16_t *)rxF,
|
(int16_t *)rxF,
|
||||||
len*2);
|
len*2);
|
||||||
|
|
||||||
// write_output("rxFdata_comp1_after.m","rxF_a", rxF,len,1,1);
|
#ifdef DEBUG_LLR_SIC
|
||||||
// write_output("clean_x1.m","x1", clean_x1,len,1,1);
|
write_output("rxFdata_comp1_after.m","rxF_a", rxF,len,1,1);
|
||||||
// printf ("Interference removed \n");
|
|
||||||
/* write_output("clean_x1.m","x1", clean_x1,len,1,
|
|
||||||
symbol==num_pdcch_symbols ? 15 :
|
|
||||||
symbol==nsymb-1 ? 14 : 13);
|
|
||||||
|
|
||||||
write_output("rxF_comp1.m","rxF_1_comp", rxF,len,1,
|
write_output("rxF_comp1.m","rxF_1_comp", rxF,len,1,
|
||||||
symbol==num_pdcch_symbols ? 15 :
|
symbol==num_pdcch_symbols ? 15 :
|
||||||
symbol==nsymb-1 ? 14 : 13);*/
|
symbol==nsymb-1 ? 14 : 13);
|
||||||
|
#endif
|
||||||
// printf("dlsch_qpsk_llr_SIC: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
|
|
||||||
|
|
||||||
|
|
||||||
//this is for QPSK only!!!
|
//this is for QPSK only!!!
|
||||||
for (i=0; i<len*2; i++) {
|
for (i=0; i<len*2; i++) {
|
||||||
*llr16 =rxF[i]; //clean_x1[i];//(int16_t *)rxF[i];//clean_x1[i]; //(int16_t *)rxF[i];//; //rxF[i];
|
*llr16 =rxF[i];
|
||||||
//printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
|
//printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
|
||||||
llr16++;
|
llr16++;
|
||||||
}
|
}
|
||||||
@@ -956,7 +944,6 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
uint32_t *llr32=(uint32_t*)dlsch_llr;
|
uint32_t *llr32=(uint32_t*)dlsch_llr;
|
||||||
int i, len, nsymb;
|
int i, len, nsymb;
|
||||||
uint8_t symbol, symbol_mod;
|
uint8_t symbol, symbol_mod;
|
||||||
//uint8_t pilots;
|
|
||||||
int len_acc=0;
|
int len_acc=0;
|
||||||
uint16_t *sic_data;
|
uint16_t *sic_data;
|
||||||
uint16_t pbch_pss_sss_adjust;
|
uint16_t pbch_pss_sss_adjust;
|
||||||
@@ -975,17 +962,14 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,4,subframe,symbol);
|
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,4,subframe,symbol);
|
||||||
|
|
||||||
|
|
||||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||||
|
amp_tmp=0x1fff;//dlsch0->sqrt_rho_b; already taken into account
|
||||||
amp_tmp=dlsch0->sqrt_rho_b;
|
|
||||||
if (frame_parms->mode1_flag==0)
|
if (frame_parms->mode1_flag==0)
|
||||||
len = nb_rb*8 - (2*pbch_pss_sss_adjust/3);
|
len = nb_rb*8 - (2*pbch_pss_sss_adjust/3);
|
||||||
else
|
else
|
||||||
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6);
|
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6);
|
||||||
} else {
|
} else {
|
||||||
|
amp_tmp=0x1fff;;//dlsch0->sqrt_rho_a; already taken into account
|
||||||
amp_tmp=dlsch0->sqrt_rho_a;
|
|
||||||
len = nb_rb*12 - pbch_pss_sss_adjust;
|
len = nb_rb*12 - pbch_pss_sss_adjust;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1245,15 +1229,13 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,subframe,symbol);
|
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,subframe,symbol);
|
||||||
|
|
||||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||||
|
amp_tmp = 0x1fff;//dlsch0->sqrt_rho_b; already taken into account
|
||||||
amp_tmp = dlsch0->sqrt_rho_b;
|
|
||||||
if (frame_parms->mode1_flag==0)
|
if (frame_parms->mode1_flag==0)
|
||||||
len = nb_rb*8 - (2*pbch_pss_sss_adjust/3);
|
len = nb_rb*8 - (2*pbch_pss_sss_adjust/3);
|
||||||
else
|
else
|
||||||
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6);
|
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6);
|
||||||
} else {
|
} else {
|
||||||
|
amp_tmp = 0x1fff; //dlsch0->sqrt_rho_a; already taken into account
|
||||||
amp_tmp = dlsch0->sqrt_rho_a;
|
|
||||||
len = nb_rb*12 - pbch_pss_sss_adjust;
|
len = nb_rb*12 - pbch_pss_sss_adjust;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1354,7 +1336,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
_mm_empty();
|
_mm_empty();
|
||||||
_m_empty();
|
_m_empty();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
//==============================================================================================
|
//==============================================================================================
|
||||||
|
|||||||
@@ -585,8 +585,8 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
|
|
||||||
int first_layer0; //= dlsch0_harq->first_layer;
|
int first_layer0; //= dlsch0_harq->first_layer;
|
||||||
int Nlayers0; // = dlsch0_harq->Nlayers;
|
int Nlayers0; // = dlsch0_harq->Nlayers;
|
||||||
uint8_t mod_order0; // = get_Qm(dlsch0_harq->mcs);
|
uint8_t mod_order0=0; // = get_Qm(dlsch0_harq->mcs);
|
||||||
uint8_t mod_order1; //=2;
|
uint8_t mod_order1=0; //=2;
|
||||||
uint8_t precoder_index0,precoder_index1;
|
uint8_t precoder_index0,precoder_index1;
|
||||||
|
|
||||||
uint8_t *x1=NULL;
|
uint8_t *x1=NULL;
|
||||||
@@ -1136,13 +1136,24 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
*jj = *jj + 1;
|
*jj = *jj + 1;
|
||||||
|
|
||||||
//normalization for 2 tx antennas
|
//normalization for 2 tx antennas
|
||||||
((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])[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);
|
((int16_t*)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
|
|
||||||
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
||||||
((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])[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);
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// We remove ONE_OVER_SQRT2_Q15 that was coming from precoder, as now it applied in computation sqrt_rho_a, sqrt_rho_b, same in the receiver in precoder function
|
||||||
|
|
||||||
|
((int16_t*)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
||||||
|
((int16_t*)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
||||||
|
|
||||||
|
if (frame_parms->nb_antenna_ports_eNB == 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];
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1171,13 +1182,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam16_table_offset_re]));
|
((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*)&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_SQRT2_Q15)>>15);
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
||||||
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
||||||
|
|
||||||
if (frame_parms->nb_antennas_tx == 2) {
|
if (frame_parms->nb_antennas_tx == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
||||||
((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])[0] += ((int16_t*)&tmp_sample2)[0];
|
||||||
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1208,13 +1219,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam64_table_offset_re]));
|
((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*)&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_SQRT2_Q15)>>15);
|
((int16_t *)&txdataF[0][tti_offset])[0] += ((int16_t*)&tmp_sample1)[0];
|
||||||
((int16_t *)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
((int16_t *)&txdataF[0][tti_offset])[1] += ((int16_t*)&tmp_sample1)[1];
|
||||||
|
|
||||||
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
||||||
((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])[0] += ((int16_t*)&tmp_sample2)[0];
|
||||||
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1246,15 +1257,18 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
*jj = *jj + 1;
|
*jj = *jj + 1;
|
||||||
|
|
||||||
//normalization for 2 tx antennas
|
//normalization for 2 tx antennas
|
||||||
((int16_t*)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_2_Q15)>>15);
|
// We remove ONE_OVER_2_Q15 that was coming from precoder,
|
||||||
((int16_t*)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_2_Q15)>>15);
|
//as now it applied in computation sqrt_rho_a, sqrt_rho_b, same in the receiver in precoder function
|
||||||
|
//ONE_OVER_SQRT2_Q15 remains from it
|
||||||
|
((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);
|
||||||
|
|
||||||
//printf("%d,%d\n",((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
//printf("%d,%d\n",((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
||||||
|
|
||||||
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
||||||
((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])[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_2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1280,13 +1294,17 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
|
|
||||||
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam16_table_offset_re]));
|
((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*)&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);
|
// We remove ONE_OVER_2_Q15 that was coming from precoder,
|
||||||
|
//as now it applied in computation sqrt_rho_a, sqrt_rho_b, same in the receiver in precoder function
|
||||||
|
//ONE_OVER_SQRT2_Q15 remains from it
|
||||||
|
((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_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index0);
|
||||||
((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])[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_2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1317,13 +1335,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
|
|
||||||
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s0[qam64_table_offset_re]));
|
((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*)&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])[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_2_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_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antennas_tx == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index);
|
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])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
((int16_t*)&txdataF[1][tti_offset])[1] += ((int16_t*)&tmp_sample2)[1];
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1340,13 +1358,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
*jj2 = *jj2 + 1;
|
*jj2 = *jj2 + 1;
|
||||||
|
|
||||||
//normalization for 2 tx antennas
|
//normalization for 2 tx antennas
|
||||||
((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])[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_2_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_antenna_ports_eNB== 2) {
|
if (frame_parms->nb_antenna_ports_eNB== 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
||||||
((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])[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_2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1373,13 +1391,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
|
|
||||||
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s1[qam16_table_offset_re]));
|
((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*)&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])[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_2_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_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
||||||
((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])[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_2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1409,13 +1427,13 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
|
|
||||||
((int16_t*)&tmp_sample1)[0] = (int16_t)((qam_table_s1[qam64_table_offset_re]));
|
((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*)&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])[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_2_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_antenna_ports_eNB == 2) {
|
if (frame_parms->nb_antenna_ports_eNB == 2) {
|
||||||
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
layer1prec2A(&tmp_sample1,&tmp_sample2,precoder_index1);
|
||||||
((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])[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_2_Q15)>>15);
|
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -2402,17 +2420,12 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
|
|||||||
LTE_DL_FRAME_PARMS *frame_parms,
|
LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
uint8_t num_pdcch_symbols,
|
uint8_t num_pdcch_symbols,
|
||||||
LTE_eNB_DLSCH_t *dlsch0,
|
LTE_eNB_DLSCH_t *dlsch0,
|
||||||
LTE_eNB_DLSCH_t *dlsch1,
|
|
||||||
int G)
|
int G)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint8_t nsymb;
|
|
||||||
uint8_t harq_pid = dlsch0->current_harq_pid;
|
uint8_t harq_pid = dlsch0->current_harq_pid;
|
||||||
LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||||
LTE_DL_eNB_HARQ_t *dlsch1_harq; //= dlsch1->harq_processes[harq_pid];
|
|
||||||
uint32_t i,jj,re_allocated=0;
|
uint32_t i,jj,re_allocated=0;
|
||||||
uint16_t l,rb,re_offset, amp;
|
|
||||||
uint32_t *rb_alloc = dlsch0_harq->rb_alloc;
|
|
||||||
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
|
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
|
||||||
uint8_t *x0 = dlsch0_harq->e;
|
uint8_t *x0 = dlsch0_harq->e;
|
||||||
uint8_t qam64_table_offset_re = 0;
|
uint8_t qam64_table_offset_re = 0;
|
||||||
@@ -2427,9 +2440,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
amp=1; //we do full scale here for SIC
|
|
||||||
gain_lin_QPSK = (int16_t)((ONE_OVER_SQRT2_Q15));
|
gain_lin_QPSK = (int16_t)((ONE_OVER_SQRT2_Q15));
|
||||||
//printf("gain=%d\n", gain_lin_QPSK);
|
|
||||||
|
|
||||||
jj = 0;
|
jj = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -2439,8 +2450,6 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
|
|||||||
|
|
||||||
switch (mod_order0) {
|
switch (mod_order0) {
|
||||||
case 2: //QPSK
|
case 2: //QPSK
|
||||||
/* TODO: handle more than 1 antenna */
|
|
||||||
//printf("%d(%d) : %d,%d => ",tti_offset,*jj,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
|
||||||
|
|
||||||
((int16_t*)&sic_buffer[0][i])[0] = (x0[jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
|
((int16_t*)&sic_buffer[0][i])[0] = (x0[jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
|
||||||
|
|
||||||
|
|||||||
@@ -299,7 +299,6 @@ int32_t dlsch_modulation_SIC(int32_t **sic_buffer,
|
|||||||
LTE_DL_FRAME_PARMS *frame_parms,
|
LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
uint8_t num_pdcch_symbols,
|
uint8_t num_pdcch_symbols,
|
||||||
LTE_eNB_DLSCH_t *dlsch0,
|
LTE_eNB_DLSCH_t *dlsch0,
|
||||||
LTE_eNB_DLSCH_t *dlsch1,
|
|
||||||
int G);
|
int G);
|
||||||
/*
|
/*
|
||||||
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
|
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ void dump_dlsch(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
|
|||||||
void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe);
|
void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe);
|
||||||
void dump_dlsch_ra(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe);
|
void dump_dlsch_ra(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t subframe);
|
||||||
|
|
||||||
void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe, uint16_t coded_bits_per_codeword,int round);
|
void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe, uint16_t coded_bits_per_codeword,int round, unsigned char harq_pid);
|
||||||
|
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|||||||
@@ -2543,7 +2543,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//pdsch_vars
|
//pdsch_vars
|
||||||
|
|
||||||
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round);
|
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[0][0]->current_harq_pid);
|
||||||
|
|
||||||
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
||||||
|
|
||||||
@@ -2644,7 +2644,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//pdsch_vars
|
//pdsch_vars
|
||||||
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round);
|
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[0][0]->current_harq_pid);
|
||||||
|
|
||||||
|
|
||||||
//write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
//write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ int main(int argc, char **argv)
|
|||||||
RX_type_t rx_type=rx_standard;
|
RX_type_t rx_type=rx_standard;
|
||||||
unsigned char cur_harq_pid;
|
unsigned char cur_harq_pid;
|
||||||
int hold_rank1_precoder=0;
|
int hold_rank1_precoder=0;
|
||||||
int tpmi_retr=2;
|
int tpmi_retr=0;
|
||||||
bool is_first_time;
|
bool is_first_time;
|
||||||
int updated_csi = 0;
|
int updated_csi = 0;
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
|||||||
unsigned int coded_bits_per_codeword[2],nsymb,dci_cnt,tbs[2];
|
unsigned int coded_bits_per_codeword[2],nsymb,dci_cnt,tbs[2];
|
||||||
|
|
||||||
unsigned int tx_lev=0, tx_lev_dB=0, round=0, trials, errs[2][4]={{0,0,0,0},{0,0,0,0}}, round_trials[2][4]={{0,0,0,0},{0,0,0,0}}, decoded_in_sic[4]={0,0,0,0}, sic_attempt[4]={0,0,0,0}, round_sic=0;
|
unsigned int tx_lev=0, tx_lev_dB=0, round=0, trials, errs[2][4]={{0,0,0,0},{0,0,0,0}}, round_trials[2][4]={{0,0,0,0},{0,0,0,0}}, decoded_in_sic[4]={0,0,0,0}, sic_attempt[4]={0,0,0,0}, round_sic=0;
|
||||||
unsigned int dci_errors=0, dlsch_active=0, num_layers;
|
unsigned int dci_errors=0, dlsch_active=0;
|
||||||
unsigned int resend_one[4]={0,0,0,0}, resend_both[4]={0,0,0,0}, TB0_deact[4]={0,0,0,0}, TB1_deact[4]={0,0,0,0};
|
unsigned int resend_one[4]={0,0,0,0}, resend_both[4]={0,0,0,0}, TB0_deact[4]={0,0,0,0}, TB1_deact[4]={0,0,0,0};
|
||||||
|
|
||||||
int re_allocated;
|
int re_allocated;
|
||||||
@@ -781,25 +781,25 @@ int main(int argc, char **argv)
|
|||||||
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_u%d_imod%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1,mcs_i,rx_type,i_mod);
|
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_u%d_imod%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1,mcs_i,rx_type,i_mod);
|
||||||
else if (abstx == 1){
|
else if (abstx == 1){
|
||||||
if (perfect_ce==1)
|
if (perfect_ce==1)
|
||||||
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_pce_sh%d_rpmi%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2,interf_unaw_shift, tpmi_retr);
|
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_pce_sh%d_rpmi%d_n.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2,interf_unaw_shift, tpmi_retr);
|
||||||
else
|
else
|
||||||
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_sh%d_rtpmi%d.csv",transmission_mode,rx_type,channel_model, n_frames, n_rx, num_rounds, mcs1, mcs2,interf_unaw_shift, tpmi_retr);
|
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_ab_sh%d_rtpmi%d_n.csv",transmission_mode,rx_type,channel_model, n_frames, n_rx, num_rounds, mcs1, mcs2,interf_unaw_shift, tpmi_retr);
|
||||||
}
|
}
|
||||||
else {//abstx=0
|
else {//abstx=0
|
||||||
if (perfect_ce==1){
|
if (perfect_ce==1){
|
||||||
if (updated_csi==1){
|
if (updated_csi==1){
|
||||||
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_up_rtpmi%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_up_rtpmi%d_n.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_rtpmi%d.csv",transmission_mode,rx_type, channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_rtpmi%d_n.csv",transmission_mode,rx_type, channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if (updated_csi==1){
|
if (updated_csi==1){
|
||||||
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_up_rtpmi%d.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_up_rtpmi%d_n.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_rtpmi%d.csv",transmission_mode,rx_type, channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
sprintf(bler_fname,"bler_tx%d_r%d_ch%d_%d_nrx%d_rnd%d_mcs%d_mcsi%d_sh%d_rtpmi%csv",transmission_mode,rx_type, channel_model,n_frames, n_rx, num_rounds, mcs1, mcs2, interf_unaw_shift, tpmi_retr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -844,9 +844,9 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
else
|
else
|
||||||
if (perfect_ce==1)
|
if (perfect_ce==1)
|
||||||
sprintf(csv_fname,"dout_tx%d_r%d_mcs%d_mcsi%d_ch%d_ns%d_R%d_pce_sh%d_%d_pnort_r45.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds, interf_unaw_shift, n_ch_rlz);
|
sprintf(csv_fname,"dout_tx%d_r%d_ch%d_%d_rnd%d_mcs%d_mcsi%d_pce_sh%d_%d_csi.m",transmission_mode,rx_type, channel_model, n_frames, num_rounds, mcs1, mcs2, interf_unaw_shift, n_ch_rlz);
|
||||||
else
|
else
|
||||||
sprintf(csv_fname,"dout_tx%d_r%d_mcs%d_mcsi%d_ch%d_ns%d_R%d_sh%d_%d_pnort_r45.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds, interf_unaw_shift, n_ch_rlz);
|
sprintf(csv_fname,"dout_tx%d_r%d_ch%d_%d_rnd%d_mcs%d_mcsi%d_sh%d_%d_csi.m",transmission_mode,rx_type, channel_model, n_frames, num_rounds, mcs1, mcs2, interf_unaw_shift, n_ch_rlz);
|
||||||
|
|
||||||
csv_fd = fopen(csv_fname,"w");
|
csv_fd = fopen(csv_fname,"w");
|
||||||
fprintf(csv_fd,"data_all%d=[",mcs1);
|
fprintf(csv_fd,"data_all%d=[",mcs1);
|
||||||
@@ -3163,7 +3163,7 @@ int main(int argc, char **argv)
|
|||||||
(subframe*2)+2,
|
(subframe*2)+2,
|
||||||
&eNB->frame_parms);
|
&eNB->frame_parms);
|
||||||
|
|
||||||
if (n_frames==2) {
|
if (n_frames==1) {
|
||||||
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
||||||
if (eNB->frame_parms.nb_antennas_tx>1)
|
if (eNB->frame_parms.nb_antennas_tx>1)
|
||||||
write_output("txsigF1.m","txsF1", &eNB->common_vars.txdataF[eNB_id][1][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
write_output("txsigF1.m","txsF1", &eNB->common_vars.txdataF[eNB_id][1][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
||||||
@@ -3177,7 +3177,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
|
tx_lev_dB = (unsigned int) dB_fixed(tx_lev);
|
||||||
|
|
||||||
if (n_frames==2) {
|
if (n_frames==1) {
|
||||||
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
||||||
if (eNB->frame_parms.nb_antennas_tx>1)
|
if (eNB->frame_parms.nb_antennas_tx>1)
|
||||||
write_output("txsigF1.m","txsF1", &eNB->common_vars.txdataF[eNB_id][1][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
write_output("txsigF1.m","txsF1", &eNB->common_vars.txdataF[eNB_id][1][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
|
||||||
@@ -4086,16 +4086,17 @@ int main(int argc, char **argv)
|
|||||||
&UE->frame_parms,
|
&UE->frame_parms,
|
||||||
num_pdcch_symbols,
|
num_pdcch_symbols,
|
||||||
&UE->dlsch_eNB[0][0],
|
&UE->dlsch_eNB[0][0],
|
||||||
NULL,
|
|
||||||
coded_bits_per_codeword[0]);
|
coded_bits_per_codeword[0]);
|
||||||
|
|
||||||
// write_output("sic_buffer.m","sic", *sic_buffer,re_allocated,1,1);
|
// write_output("sic_buffer.m","sic", *sic_buffer,re_allocated,1,1);
|
||||||
// write_output("rxdataF_comp1.m","rxF_comp1", *UE->pdsch_vars[eNB_id]->rxdataF_comp1[UE->dlsch[0][0]->current_harq_pid][round],14*12*25,1,1);
|
// write_output("rxdataF_comp1.m","rxF_comp1", *UE->pdsch_vars[eNB_id]->rxdataF_comp1[UE->dlsch[0][0]->current_harq_pid][round],14*12*25,1,1);
|
||||||
// write_output("rxdataF_rho.m","rho", *UE->pdsch_vars[eNB_id]->dl_ch_rho_ext[UE->dlsch[0][0]->current_harq_pid][round],14*12*25,1,1);
|
// write_output("rxdataF_rho.m","rho", *UE->pdsch_vars[eNB_id]->dl_ch_rho_ext[UE->dlsch[0][0]->current_harq_pid][round],14*12*25,1,1);
|
||||||
|
|
||||||
|
|
||||||
switch (get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)){
|
switch (get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
|
||||||
dlsch_qpsk_llr_SIC(&UE->frame_parms,
|
dlsch_qpsk_llr_SIC(&UE->frame_parms,
|
||||||
@@ -4409,7 +4410,7 @@ int main(int argc, char **argv)
|
|||||||
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||||
}
|
}
|
||||||
//pdsch_vars
|
//pdsch_vars
|
||||||
dump_dlsch2(UE,eNB_id,coded_bits_per_codeword[0],round,UE->dlsch[0][0]->current_harq_pid);
|
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[0][0]->current_harq_pid);
|
||||||
/*
|
/*
|
||||||
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
|
||||||
write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
|
write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
|
||||||
@@ -4681,9 +4682,18 @@ int main(int argc, char **argv)
|
|||||||
if (transmission_mode == 3 || transmission_mode == 4) {
|
if (transmission_mode == 3 || transmission_mode == 4) {
|
||||||
// FOR CW0
|
// FOR CW0
|
||||||
thr_cw0[0] = rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)*(1-((double)errs[0][0]/(double)round_trials[0][0]));
|
thr_cw0[0] = rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)*(1-((double)errs[0][0]/(double)round_trials[0][0]));
|
||||||
|
if (num_rounds > 1)
|
||||||
thr_cw0[1] = (rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)/2)*(((double)errs[0][0] - (double)errs[0][1])/(double)round_trials[0][0]);
|
thr_cw0[1] = (rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)/2)*(((double)errs[0][0] - (double)errs[0][1])/(double)round_trials[0][0]);
|
||||||
|
else
|
||||||
|
thr_cw0[1]=0;
|
||||||
|
if (num_rounds > 2)
|
||||||
thr_cw0[2] = (rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)/3)*(((double)errs[0][1] - (double)errs[0][2])/(double)round_trials[0][0]);
|
thr_cw0[2] = (rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)/3)*(((double)errs[0][1] - (double)errs[0][2])/(double)round_trials[0][0]);
|
||||||
|
else
|
||||||
|
thr_cw0[2]=0;
|
||||||
|
if (num_rounds > 3)
|
||||||
thr_cw0[3] = (rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)/4)*(((double)errs[0][2] - (double)errs[0][3])/(double)round_trials[0][0]);
|
thr_cw0[3] = (rate0_init*get_Qm(eNB->dlsch[0][0]->harq_processes[0]->mcs)/4)*(((double)errs[0][2] - (double)errs[0][3])/(double)round_trials[0][0]);
|
||||||
|
else
|
||||||
|
thr_cw0[3]=0;
|
||||||
thr_cw0_tot = (double)thr_cw0[0]+(double)thr_cw0[1]+(double)thr_cw0[2]+(double)thr_cw0[3];
|
thr_cw0_tot = (double)thr_cw0[0]+(double)thr_cw0[1]+(double)thr_cw0[2]+(double)thr_cw0[3];
|
||||||
#ifdef PRINT_THROUGHPUT
|
#ifdef PRINT_THROUGHPUT
|
||||||
printf("rate %f \n", rate0_init);
|
printf("rate %f \n", rate0_init);
|
||||||
@@ -4700,9 +4710,18 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
thr_cw1[0] = rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)*(1-((double)errs[1][0]/(double)round_trials[1][0]));
|
thr_cw1[0] = rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)*(1-((double)errs[1][0]/(double)round_trials[1][0]));
|
||||||
|
if (num_rounds > 1)
|
||||||
thr_cw1[1] = (rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)/2)*(((double)errs[1][0] - (double)errs[1][1])/(double)round_trials[1][0]);
|
thr_cw1[1] = (rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)/2)*(((double)errs[1][0] - (double)errs[1][1])/(double)round_trials[1][0]);
|
||||||
|
else
|
||||||
|
thr_cw1[1] = 0;
|
||||||
|
if (num_rounds > 2)
|
||||||
thr_cw1[2] = (rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)/3)*(((double)errs[1][1] - (double)errs[1][2])/(double)round_trials[1][0]);
|
thr_cw1[2] = (rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)/3)*(((double)errs[1][1] - (double)errs[1][2])/(double)round_trials[1][0]);
|
||||||
|
else
|
||||||
|
thr_cw1[2] = 0;
|
||||||
|
if (num_rounds > 3)
|
||||||
thr_cw1[3] = (rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)/4)*(((double)errs[1][2] - (double)errs[1][3])/(double)round_trials[1][0]);
|
thr_cw1[3] = (rate1_init*get_Qm(eNB->dlsch[0][1]->harq_processes[0]->mcs)/4)*(((double)errs[1][2] - (double)errs[1][3])/(double)round_trials[1][0]);
|
||||||
|
else
|
||||||
|
thr_cw1[3]=0;
|
||||||
thr_cw1_tot = (double)thr_cw1[0]+(double)thr_cw1[1]+(double)thr_cw1[2]+(double)thr_cw1[3];
|
thr_cw1_tot = (double)thr_cw1[0]+(double)thr_cw1[1]+(double)thr_cw1[2]+(double)thr_cw1[3];
|
||||||
#ifdef PRINT_THROUGHPUT
|
#ifdef PRINT_THROUGHPUT
|
||||||
printf("Throughput cw1 sum = %f \n", thr_cw1_tot);
|
printf("Throughput cw1 sum = %f \n", thr_cw1_tot);
|
||||||
@@ -5236,10 +5255,10 @@ int main(int argc, char **argv)
|
|||||||
printf("[continue] effective rate : %f (%2.1f%%,%f)): increase snr \n",rate[0]*effective_rate, 100*effective_rate, rate[0]);
|
printf("[continue] effective rate : %f (%2.1f%%,%f)): increase snr \n",rate[0]*effective_rate, 100*effective_rate, rate[0]);
|
||||||
}
|
}
|
||||||
if (abstx == 1) {
|
if (abstx == 1) {
|
||||||
if ((rx_type==rx_IC_dual_stream) || (rx_type==rx_standard)) {
|
if ((rx_type==rx_IC_dual_stream) || (rx_type==rx_SIC_dual_stream)) {
|
||||||
|
|
||||||
if (((double)errs[0][0]/(round_trials[0][0]))<1e-2 && ((double)errs[1][0]/(round_trials[1][0]))<1e-2)
|
if ((((double)errs[0][0]/(round_trials[0][0]))<1e-2) && (((double)errs[1][0]/(round_trials[1][0]))<1e-2))
|
||||||
if (((double)errs[0][0]/(round_trials[0][0]))<1e-2 && ((double)errs[1][0]/(round_trials[1][0]))<1e-2)
|
if ((((double)errs[0][0]/(round_trials[0][0]))<1e-2) && (((double)errs[1][0]/(round_trials[1][0]))<1e-2))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -5250,8 +5269,8 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if ((rx_type==rx_IC_dual_stream) || (rx_type==rx_standard) || (rx_type==rx_SIC_dual_stream)) {
|
if ((rx_type==rx_IC_dual_stream) || (rx_type==rx_SIC_dual_stream)) {
|
||||||
if (((double)errs[0][0]/(round_trials[0][0]))<1e-3 && ((double)errs[1][0]/(round_trials[1][0]))<1e-3)
|
if ((((double)errs[0][0]/(round_trials[0][0]))<1e-3) && (((double)errs[1][0]/(round_trials[1][0]))<1e-3))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi
|
|||||||
|
|
||||||
int sent_byte;
|
int sent_byte;
|
||||||
|
|
||||||
if (eth->compression = ALAW_COMPRESS) {
|
if (eth->compression == ALAW_COMPRESS) {
|
||||||
sent_byte = RAW_PACKET_SIZE_BYTES_ALAW(nsamps);
|
sent_byte = RAW_PACKET_SIZE_BYTES_ALAW(nsamps);
|
||||||
} else {
|
} else {
|
||||||
sent_byte = RAW_PACKET_SIZE_BYTES(nsamps);
|
sent_byte = RAW_PACKET_SIZE_BYTES(nsamps);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
// Packet sizes for IF4p5 interface format
|
// Packet sizes for IF4p5 interface format
|
||||||
#define DATA_BLOCK_SIZE_BYTES(scaled_nblocks) (sizeof(uint16_t)*scaled_nblocks)
|
#define DATA_BLOCK_SIZE_BYTES(scaled_nblocks) (sizeof(uint16_t)*scaled_nblocks)
|
||||||
#define PRACH_HARD_CODED_NUM_SAMPLES (839*4)
|
#define PRACH_HARD_CODED_NUM_SAMPLES (839*2)
|
||||||
#define PRACH_BLOCK_SIZE_BYTES (sizeof(int16_t)*PRACH_HARD_CODED_NUM_SAMPLES) // FIX hard coded prach size
|
#define PRACH_BLOCK_SIZE_BYTES (sizeof(int16_t)*PRACH_HARD_CODED_NUM_SAMPLES) // FIX hard coded prach size
|
||||||
|
|
||||||
#define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
|
#define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
|
||||||
|
|||||||
@@ -1081,6 +1081,7 @@ static void get_options (int argc, char **argv) {
|
|||||||
} else {
|
} else {
|
||||||
(eth_params+j)->rf_preference = 0;
|
(eth_params+j)->rf_preference = 0;
|
||||||
}
|
}
|
||||||
|
(eth_params+j)->if_compress = enb_properties->properties[i]->rrh_gw_config[j].if_compress;
|
||||||
} else {
|
} else {
|
||||||
local_remote_radio = BBU_LOCAL_RADIO_HEAD;
|
local_remote_radio = BBU_LOCAL_RADIO_HEAD;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user