Commit 727e29e3 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/ulsch-rx-2ant-fix' into develop_integration_2018_w10

fixes small bug in ulsim which kills one RX antenna in channel simulation.
Another simple but bad bug in ulsch_demodulation.c (bad access of avgU
array). This probably resulted in a performance degradation for non-ideal
channels, even for 1 antenna. The avgU was read in position 1 instead of
0 for 1-antenna and in positions 1 and 2 instead of 0 and 1 for 2-antennas.
parents 3e99c7aa 957cdbab
......@@ -291,7 +291,7 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
#ifdef DEBUG_CH
if (aa==0) {
if (aa==1) {
if (Ns == 0) {
write_output("rxdataF_ext.m","rxF_ext",&rxdataF_ext[aa][symbol_offset],512*2,2,1);
write_output("tmpin_ifft.m","drs_in",temp_in_ifft_0,512,1,1);
......
......@@ -1127,7 +1127,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
uint32_t l,i;
int32_t avgs;
uint8_t log2_maxh=0,aarx;
int32_t avgU[2];
int32_t avgU[eNB->frame_parms.nb_antennas_rx];
// uint8_t harq_pid = ( ulsch->RRCConnRequest_flag== 0) ? subframe2harq_pid_tdd(frame_parms->tdd_config,subframe) : 0;
......@@ -1212,7 +1212,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
avgs = 0;
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs,avgU[(aarx<<1)]);
avgs = cmax(avgs,avgU[aarx]);
// log2_maxh = 4+(log2_approx(avgs)/2);
......@@ -1395,7 +1395,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
if (eNB->frame_parms.nb_antennas_rx>1) {
sprintf(fname,"/tmp/rxsigF1_ext_r%d.m",round);
sprintf(vname,"rxsF1_ext_r%d",round);
write_output(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_ext[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
write_output(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_ext[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
}
/*
if (eNB->srs_vars[UE_id].srs_ch_estimates) write_output("/tmp/srs_est0.m","srsest0",eNB->srs_vars[UE_id].srs_ch_estimates[0],eNB->frame_parms.ofdm_symbol_size,1,1);
......
......@@ -24,6 +24,8 @@
#include "defs.h"
//#define DEBUG_FEP
int slot_fep_ul(RU_t *ru,
unsigned char l,
unsigned char Ns,
......
......@@ -859,8 +859,8 @@ int main(int argc, char **argv)
printf("PUSCH Beta : ACK %f, RI %f, CQI %f\n",(double)beta_ack[beta_ACK]/8,(double)beta_ri[beta_RI]/8,(double)beta_cqi[beta_CQI]/8);
UE2eNB = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
UE->frame_parms.nb_antennas_rx,
UE2eNB = new_channel_desc_scm(1,
n_rx,
channel_model,
N_RB2sampling_rate(eNB->frame_parms.N_RB_UL),
N_RB2channel_bandwidth(eNB->frame_parms.N_RB_UL),
......@@ -1330,7 +1330,7 @@ int main(int argc, char **argv)
printf("SNRmeas %f\n",SNRmeas);
write_output("rxsig0UL.m","rxs0", &ru->common.rxdata[0][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1);
// write_output("rxsig1UL.m","rxs1", &ru->common_vars.rxdata[0][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1);
if (eNB->frame_parms.nb_antennas_rx>1) write_output("rxsig1UL.m","rxs1", &ru->common.rxdata[1][eNB->frame_parms.samples_per_tti*subframe],eNB->frame_parms.samples_per_tti,1,1);
}
......
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