Commit 1218cc8f authored by Cedric Roux's avatar Cedric Roux

bugfix: fix dump_dlsch2

the argument 'coded_bits_per_codeword' has to be an array in
case of several codewords.

The calling sites have been adapted.

Today, only the first index is used, so calling sites where
'coded_bits_per_codeword' is an integer pass the address
of it. It is expected that 'dump_dlsch2' will check in the
future that there is one or two codewords and only access
'coded_bits_per_codeword[1]' when it's sure there are
really two codewords.
parent 7ffc2042
......@@ -5880,7 +5880,7 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
#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, unsigned char harq_pid)
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
{
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
char fname[32],vname[32];
......@@ -5959,7 +5959,7 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,uint16_t coded_
sprintf(fname,"dlsch%d_rxF_r%d_llr.m",eNB_id,round);
sprintf(vname,"dl%d_r%d_llr",eNB_id,round);
write_output(fname,vname, ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0],coded_bits_per_codeword,1,0);
write_output(fname,vname, ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0],coded_bits_per_codeword[0],1,0);
sprintf(fname,"dlsch%d_r%d_mag1.m",eNB_id,round);
sprintf(vname,"dl%d_r%d_mag1",eNB_id,round);
write_output(fname,vname,ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag0[0],12*N_RB_DL*nsymb,1,1);
......
......@@ -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_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, unsigned char harq_pid);
void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe, unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid);
/*@}*/
......
......@@ -2548,7 +2548,7 @@ int main(int argc, char **argv)
//pdsch_vars
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid);
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][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);
......@@ -2649,7 +2649,7 @@ int main(int argc, char **argv)
}
//pdsch_vars
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][0][0]->current_harq_pid);
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round, UE->dlsch[subframe&0x1][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);
......
......@@ -3504,7 +3504,7 @@ PMI_FEEDBACK:
UE->frame_parms.ofdm_symbol_size*nsymb/2,1,1);
//pdsch_vars
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round);
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round);
//dump_dlsch2(UE,eNB_id_i,coded_bits_per_codeword);
write_output("dlsch_e.m","e",eNB->dlsch[0][0]->harq_processes[0]->e,coded_bits_per_codeword,1,4);
......@@ -3721,7 +3721,7 @@ PMI_FEEDBACK:
}
//pdsch_vars
dump_dlsch2(UE,eNB_id,subframe,coded_bits_per_codeword,round);
dump_dlsch2(UE,eNB_id,subframe,&coded_bits_per_codeword,round);
/*
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);
......
......@@ -406,7 +406,7 @@ int main(int argc, char **argv)
DCI_ALLOC_t dci_alloc[8],dci_alloc_rx[8];
uint16_t n_rnti=1234,dci_cnt;
uint16_t coded_bits_per_codeword;
unsigned int coded_bits_per_codeword;
double tmp_re,tmp_im,foff,deltaF=0.0,cs,sn;
uint32_t carrier_freq[4]= {1907600000,1907600000,1907600000,1907600000};
uint32_t rf_mode[4] = {55759,55759,55759,55759};
......@@ -1739,7 +1739,7 @@ int main(int argc, char **argv)
PHY_vars_UE[0]->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
0);
dump_dlsch2(PHY_vars_UE[0],0,0,coded_bits_per_codeword);
dump_dlsch2(PHY_vars_UE[0],0,0,&coded_bits_per_codeword);
}
} else {
......
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