Merge remote-tracking branch 'origin/issue326_LOGreview' into develop_integration_2018_w35

Conflicts:
	cmake_targets/CMakeLists.txt
	openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
	openair1/SCHED_UE/phy_procedures_lte_ue.c
	openair2/LAYER2/MAC/eNB_scheduler_phytest.c
This commit is contained in:
Cedric Roux
2018-08-31 12:55:28 +02:00
71 changed files with 1709 additions and 2377 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ int load_codinglib(void) {
shlib_fdesc[ENCODE_SSE_FPTRIDX].fname= "threegpplte_turbo_encoder_sse";
shlib_fdesc[ENCODE_C_FPTRIDX].fname= "threegpplte_turbo_encoder";
shlib_fdesc[ENCODE_INIT_SSE_FPTRIDX].fname= "init_encoder_sse";
ret=load_module_shlib("coding",shlib_fdesc,DECODE_NUM_FPTR);
ret=load_module_shlib("coding",shlib_fdesc,DECODE_NUM_FPTR,NULL);
if (ret < 0) exit_fun("Error loading coding library");
/* execute encoder/decoder init functions */
+1 -1
View File
@@ -20,7 +20,7 @@
*/
#include "phy_init.h"
#include "log.h"
#include "common/utils/LOG/log.h"
uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6};
uint16_t dl_S_table_extended[10]={3,8,9,10,3,8,9,5,0,0};
+15 -15
View File
@@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
LOG_M_BEGIN(DEBUG_LTEESTIM);
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M_END
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
}
return (1);
}
@@ -460,18 +460,18 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val,dB_fixed(peak_val)/2);
LOG_M_BEGIN(DEBUG_LTEESTIM)
static int debug_cnt;
if (debug_cnt == 0) {
LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
// exit(-1);
} else {
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
static int debug_cnt;
if (debug_cnt == 0) {
LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
LOG_M("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
LOG_M("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
// exit(-1);
} else {
debug_cnt++;
}
LOG_M_END
}
return(peak_pos);
@@ -23,7 +23,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "log.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
//#define k1 1000
+34 -37
View File
@@ -25,9 +25,9 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/impl_defs_top.h"
#include "common/utils/LOG/log.h"
//extern unsigned int lte_gold_table[3][20][2][14];
//#define DEBUG_DL_CELL_SPEC
@@ -64,7 +64,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
else if ((p==1) && (l>0))
nu = 0;
else {
printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
LOG_E(PHY,"lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
return(-1);
}
@@ -85,19 +85,19 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_I(PHY,"index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
}
mprime++;
#ifdef DEBUG_DL_CELL_SPEC
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
if (m<4)
printf("Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
LOG_I(PHY,"Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
#endif
}
k+=6;//b
if (k >= eNB->frame_parms.ofdm_symbol_size) {
@@ -105,7 +105,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
k-=eNB->frame_parms.ofdm_symbol_size;
}
// printf("** k %d\n",k);
// LOG_I(PHY,"** k %d\n",k);
}
return(0);
@@ -143,7 +143,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB,
else if ((p==1) && (l>0))
nu = 0;
else {
printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
LOG_E(PHY,"lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
return(-1);
}
@@ -168,27 +168,24 @@ int lte_dl_cell_spec(PHY_VARS_eNB *eNB,
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_I(PHY,"index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
}
mprime++;
#ifdef DEBUG_DL_CELL_SPEC
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
if (m<4)
LOG_I(PHY,"Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
}
if (m<4)
printf("Ns %d, l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
#endif
k+=6;
if (k >= eNB->frame_parms.ofdm_symbol_size) {
k++; // skip DC carrier
k-=eNB->frame_parms.ofdm_symbol_size;
}
// printf("** k %d\n",k);
// LOG_I(PHY,"** k %d\n",k);
}
return(0);
@@ -231,21 +228,21 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *ue,
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
LOG_I(PHY,"Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_I(PHY,"index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
}
mprime++;
#ifdef DEBUG_DL_CELL_SPEC
if (LOG_DEBUGFLAG(DEBUG_DLCELLSPEC)) {
if (m<4)
printf("Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
if (m<4)
LOG_I(PHY,"Ns %d l %d output[%d] = (%d,%d)\n",Ns,l,k,((short *)&output[k])[0],((short *)&output[k])[1]);
#endif
k++;
// printf("** k %d\n",k);
}
k++;
// LOG_I(PHY,"** k %d\n",k);
}
return(0);
+1 -1
View File
@@ -36,7 +36,7 @@
#include "lte_refsig.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "log.h"
#include "common/utils/LOG/log.h"
#include "PHY/impl_defs_top.h"
//extern unsigned int lte_gold_table[3][20][2][14];
+1 -1
View File
@@ -220,7 +220,7 @@ void fill_pdcch_order(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC_t *dci_a
break;
}
LOG_I(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n",
LOG_T(PHY,"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH\n",
proc->frame_tx, proc->subframe_tx, rel8->rnti);
}
+103 -103
View File
@@ -153,25 +153,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
subframe = eNB->proc.subframe_prach_br;
prachF = eNB->prach_vars_br.prachF;
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
LOG_DEBUG_BEGIN(PRACH)
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
br_flag,ce_level,ru->proc.frame_prach,subframe,
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
prach_ConfigIndex,rootSequenceIndex,
eNB->prach_vars_br.repetition_number[ce_level],
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
LOG_DEBUG_END
}
else
if (LOG_DEBUGFLAG(PRACH)){
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
br_flag,ce_level,ru->proc.frame_prach,subframe,
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
prach_ConfigIndex,rootSequenceIndex,
eNB->prach_vars_br.repetition_number[ce_level],
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
}
} else
#endif
{
prach_ifftp = eNB->prach_vars.prach_ifft[0];
subframe = eNB->proc.subframe_prach;
prachF = eNB->prach_vars.prachF;
rxsigF = eNB->prach_vars.rxsigF[0];
LOG_DEBUG_BEGIN(PRACH)
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
LOG_DEBUG_END
if (LOG_DEBUGFLAG(PRACH)){
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
}
}
}
else {
@@ -179,20 +178,19 @@ LOG_DEBUG_END
if (br_flag == 1) {
subframe = ru->proc.subframe_prach_br;
rxsigF = ru->prach_rxsigF_br[ce_level];
LOG_DEBUG_BEGIN(PRACH)
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
LOG_DEBUG_END
}
else
if (LOG_DEBUGFLAG(PRACH)){
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
}
} else
#endif
{
subframe = ru->proc.subframe_prach;
rxsigF = ru->prach_rxsigF;
LOG_DEBUG_BEGIN(PRACH)
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex);
LOG_DEBUG_END
if (LOG_DEBUGFLAG(PRACH)){
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex);
}
}
}
@@ -204,27 +202,25 @@ LOG_DEBUG_END
// DJP - indexing below in subframe zero takes us off the beginning of the array???
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset];
LOG_M_BEGIN(PRACH)
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
int8_t dbEn0 = dB_fixed(en0);
int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB;
char buffer[80];
if (dbEn0>32 && prach[0]!= NULL)
{
static int counter=0;
sprintf(buffer, "%s%d", "/tmp/prach_rx",counter);
LOG_M(buffer,"prach_rx",prach[0],fp->samples_per_tti,1,13);
if (LOG_DUMPFLAG(PRACH)){
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
int8_t dbEn0 = dB_fixed(en0);
int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB;
char buffer[80];
if (dbEn0>32 && prach[0]!= NULL) {
static int counter=0;
sprintf(buffer, "%s%d", "/tmp/prach_rx",counter);
LOG_M(buffer,"prach_rx",prach[0],fp->samples_per_tti,1,13);
}
if (dB_fixed(en0)>32) {
sprintf(buffer, "rach_dBm:%d",rach_dBm);
if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1);
LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n",
ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti,
prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa],
(subframe*fp->samples_per_tti)-ru->N_TA_offset);
}
if (dB_fixed(en0)>32)
{
sprintf(buffer, "rach_dBm:%d",rach_dBm);
if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1);
LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n",
ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti,
prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa],
(subframe*fp->samples_per_tti)-ru->N_TA_offset);
}
LOG_M_END
}
}
}
@@ -306,9 +302,9 @@ LOG_M_END
if (((eNB!=NULL) && (ru->function != NGFI_RAU_IF4p5))||
((eNB==NULL) && (ru->function == NGFI_RRU_IF4p5))) { // compute the DFTs of the PRACH temporal resources
// Do forward transform
LOG_DEBUG_BEGIN(PRACH)
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp);
LOG_DEBUG_END
if (LOG_DEBUGFLAG(PRACH)) {
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp);
}
for (aa=0; aa<nb_rx; aa++) {
AssertFatal(prach[aa]!=NULL,"prach[%d] is null\n",aa);
prach2 = prach[aa] + (Ncp<<1);
@@ -439,10 +435,10 @@ LOG_DEBUG_END
return;
} else if (eNB!=NULL) {
LOG_DEBUG_BEGIN(PRACH)
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
LOG_DEBUG_END
if ( LOG_DEBUGFLAG(PRACH)) {
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
}
}
// in case of RAU and prach received rx_thread wakes up prach
@@ -477,10 +473,10 @@ LOG_DEBUG_END
*max_preamble_energy=0;
for (preamble_index=0 ; preamble_index<64 ; preamble_index++) {
LOG_DEBUG_BEGIN(PRACH)
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag);
LOG_DEBUG_END
if (LOG_DEBUGFLAG(PRACH)){
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag);
}
if (restricted_set == 0) {
// This is the relative offset in the root sequence table (5.7.2-4 from 36.211) for the given preamble index
preamble_offset = ((NCS==0)? preamble_index : (preamble_index/(N_ZC/NCS)));
@@ -563,11 +559,11 @@ LOG_DEBUG_END
}
// Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex
LOG_DEBUG_BEGIN(PRACH)
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d: offset %d, preamble shift %d (br_flag %d, en %d)\n",
ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en);
LOG_DEBUG_END
if (LOG_DEBUGFLAG(PRACH)) {
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d: offset %d, preamble shift %d (br_flag %d, en %d)\n",
ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en);
}
log2_ifft_size = 10;
fft_size = 6144;
@@ -589,13 +585,13 @@ LOG_DEBUG_END
}
memset(prachF, 0, sizeof(int16_t)*2*1024 );
LOG_M_BEGIN(PRACH)
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1);
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1);
LOG_M_END
if (LOG_DUMPFLAG(PRACH)) {
if (prach[0]!= NULL) LOG_M("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
LOG_M("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
LOG_M("prach_rxF0.m","prach_rxF0",rxsigF[0],24576,1,1);
LOG_M("prach_rxF1.m","prach_rxF1",rxsigF[1],6144,1,1);
}
for (aa=0;aa<nb_rx; aa++) {
// Do componentwise product with Xu* on each antenna
@@ -623,10 +619,10 @@ LOG_M_END
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10;
}
LOG_M_BEGIN(PRACH)
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
LOG_M_END
if (LOG_DUMPFLAG(PRACH)) {
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
}
}// antennas_rx
} // new dft
@@ -637,10 +633,10 @@ LOG_M_END
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
#endif
{
LOG_DEBUG_BEGIN(PRACH)
if (LOG_DEBUGFLAG(PRACH)){
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) LOG_I(PHY,"frame %d, subframe %d: Checking for peak in time-domain (br_flag %d, en %d)\n",ru->proc.frame_prach,subframe,br_flag,en);
LOG_DEBUG_END
}
preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<<log2_ifft_size)/N_ZC));
@@ -652,44 +648,48 @@ LOG_DEBUG_END
*max_preamble_energy = levdB;
*max_preamble_delay = ((i*fft_size)>>log2_ifft_size)*update_TA/update_TA2;
*max_preamble = preamble_index;
LOG_DEBUG_BEGIN(PRACH)
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if ((en>60) && (br_flag==1)) LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",ru->proc.frame_prach,subframe,*max_preamble_energy,*max_preamble_delay,*max_preamble,br_flag,ce_level,levdB,lev);
LOG_DEBUG_END
if (LOG_DEBUGFLAG(PRACH)){
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if ((en>60) && (br_flag==1))
LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",
ru->proc.frame_prach,subframe,
*max_preamble_energy,*max_preamble_delay,
*max_preamble,br_flag,ce_level,levdB,lev);
}
}
}
}
}// preamble_index
LOG_M_BEGIN(PRACH)
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) {
k = (12*n_ra_prb) - 6*fp->N_RB_UL;
if (k<0) k+=fp->ofdm_symbol_size;
k*=12;
k+=13;
k*=2;
if (br_flag == 0) {
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
}
else {
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1);
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
exit(-1);
}
if (LOG_DUMPFLAG(PRACH)) {
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if (en>60) {
k = (12*n_ra_prb) - 6*fp->N_RB_UL;
if (k<0) k+=fp->ofdm_symbol_size;
k*=12;
k+=13;
k*=2;
if (br_flag == 0) {
LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
}
else {
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1);
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
exit(-1);
}
}
LOG_M_END
}
} /* LOG_DUMPFLAG(PRACH) */
if (eNB) stop_meas(&eNB->rx_prach);
}
+33 -60
View File
@@ -33,7 +33,6 @@
#include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h"
#include "transport_eNB.h"
//#define DEBUG_ULSCH
#include "PHY/sse_intrin.h"
#include "transport_common_proto.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
@@ -67,7 +66,7 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
// printf("Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH);
LOG_T(PHY,"Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH);
if (frame_parms->Ncp == 0) { // Normal prefix
z0 = z;
@@ -388,13 +387,13 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH)
for (i=0,ip=0; i<Msc_PUSCH; i++,ip+=4) {
z0[i] = ((uint32_t*)idft_out0)[ip];
/*
printf("out0 (%d,%d),(%d,%d),(%d,%d),(%d,%d)\n",
((int16_t*)&idft_out0[ip])[0],((int16_t*)&idft_out0[ip])[1],
((int16_t*)&idft_out0[ip+1])[0],((int16_t*)&idft_out0[ip+1])[1],
((int16_t*)&idft_out0[ip+2])[0],((int16_t*)&idft_out0[ip+2])[1],
((int16_t*)&idft_out0[ip+3])[0],((int16_t*)&idft_out0[ip+3])[1]);
*/
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
LOG_I(PHY,"out0 (%d,%d),(%d,%d),(%d,%d),(%d,%d)\n",
((int16_t*)&idft_out0[ip])[0],((int16_t*)&idft_out0[ip])[1],
((int16_t*)&idft_out0[ip+1])[0],((int16_t*)&idft_out0[ip+1])[1],
((int16_t*)&idft_out0[ip+2])[0],((int16_t*)&idft_out0[ip+2])[1],
((int16_t*)&idft_out0[ip+3])[0],((int16_t*)&idft_out0[ip+3])[1]);
}
z1[i] = ((uint32_t*)idft_out0)[ip+1];
z2[i] = ((uint32_t*)idft_out0)[ip+2];
z3[i] = ((uint32_t*)idft_out0)[ip+3];
@@ -479,10 +478,7 @@ int32_t ulsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
int i;
// printf("qpsk llr for symbol %d (pos %d), llr offset %d\n",symbol,(symbol*frame_parms->N_RB_DL*12),llr128U-(__m128i*)ulsch_llr);
for (i=0; i<(nb_rb*3); i++) {
//printf("%d,%d,%d,%d,%d,%d,%d,%d\n",((int16_t *)rxF)[0],((int16_t *)rxF)[1],((int16_t *)rxF)[2],((int16_t *)rxF)[3],((int16_t *)rxF)[4],((int16_t *)rxF)[5],((int16_t *)rxF)[6],((int16_t *)rxF)[7]);
*(*llrp128) = *rxF;
rxF++;
(*llrp128)++;
@@ -593,7 +589,9 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
ch_mag =(int16x8_t*)&ul_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
ch_magb =(int16x8_t*)&ul_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
#endif
// printf("symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0));
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
LOG_UI(PHY,"symbol %d: mag %d, magb %d\n",symbol,_mm_extract_epi16(ch_mag[0],0),_mm_extract_epi16(ch_magb[0],0));
}
for (i=0; i<(nb_rb*3); i++) {
@@ -736,9 +734,9 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
nb_rb1 = cmin(cmax((int)(frame_parms->N_RB_UL) - (int)(2*first_rb),(int)0),(int)(2*nb_rb)); // 2 times no. RBs before the DC
nb_rb2 = 2*nb_rb - nb_rb1; // 2 times no. RBs after the DC
#ifdef DEBUG_ULSCH
printf("ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2);
#endif
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
LOG_UI(PHY,"ulsch_extract_rbs_single: 2*nb_rb1 = %d, 2*nb_rb2 = %d\n",nb_rb1,nb_rb2);
}
rxF_ext = &rxdataF_ext[aarx][(symbol*frame_parms->N_RB_UL*12)];
@@ -838,7 +836,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
#endif
for (rb=0; rb<nb_rb; rb++) {
// printf("comp: symbol %d rb %d\n",symbol,rb);
LOG_D(PHY,"comp: symbol %d rb %d\n",symbol,rb);
// just compute channel magnitude without scaling, this is done after equalization for SC-FDMA
@@ -861,7 +859,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
mmtmpU1 = _mm_packs_epi32(mmtmpU0,mmtmpU0);
ul_ch_mag128[2] = _mm_unpacklo_epi16(mmtmpU1,mmtmpU1);
// printf("comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift);
LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift);
#elif defined(__arm__)
@@ -1125,10 +1123,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
Qm = ulsch[UE_id]->harq_processes[harq_pid]->Qm;
#ifdef DEBUG_ULSCH
printf("rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
#endif //DEBUG_ULSCH
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
LOG_I(PHY,"rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
}
if (ulsch[UE_id]->harq_processes[harq_pid]->nb_rb == 0) {
LOG_E(PHY,"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
@@ -1137,13 +1134,13 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
#ifdef DEBUG_ULSCH
printf("rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
LOG_I(PHY,"rx_ulsch : symbol %d (first_rb %d,nb_rb %d), rxdataF %p, rxdataF_ext %p\n",l,
ulsch[UE_id]->harq_processes[harq_pid]->first_rb,
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
common_vars->rxdataF,
pusch_vars->rxdataF_ext);
#endif //DEBUG_ULSCH
}
ulsch_extract_rbs_single(common_vars->rxdataF,
pusch_vars->rxdataF_ext,
@@ -1179,21 +1176,16 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
pusch_vars->ulsch_power[i] = signal_energy_nodc(pusch_vars->drs_ch_estimates[i],
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor;
/* printf("%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
*/
LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
}
//LOG_M("rxdataF_ext.m","rxF_ext",pusch_vars->rxdataF_ext[eNB_id][0],300*(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active),1,1);
//LOG_M("ulsch_chest.m","drs_est",pusch_vars->drs_ch_estimates[eNB_id][0],300*(frame_parms->symbols_per_tti-ulsch[UE_id]->srs_active),1,1);
ulsch_channel_level(pusch_vars->drs_ch_estimates,
frame_parms,
avgU,
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
// printf("[ULSCH] avg[0] %d\n",avgU[0]);
LOG_D(PHY,"[ULSCH] avg[0] %d\n",avgU[0]);
avgs = 0;
@@ -1205,9 +1197,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
log2_maxh = (log2_approx(avgs)/2)+ log2_approx(frame_parms->nb_antennas_rx-1)+4;
#ifdef DEBUG_ULSCH
printf("[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs);
#endif
LOG_D(PHY,"[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs);
for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
@@ -1229,9 +1221,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
log2_maxh); // log2_maxh+I0_shift
if (frame_parms->nb_antennas_rx > 1)
ulsch_detection_mrc(frame_parms,
pusch_vars->rxdataF_comp,
@@ -1240,9 +1229,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
l,
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb);
// if ((eNB->measurements.n0_power_dB[0]+3)<pusch_vars->ulsch_power[0]) {
// if ((eNB->measurements.n0_power_dB[0]+3)<pusch_vars->ulsch_power[0])
if (23<pusch_vars->ulsch_power[0]) {
freq_equalization(frame_parms,
pusch_vars->rxdataF_comp,
@@ -1254,22 +1241,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
}
}
//#ifdef DEBUG_ULSCH
// Inverse-Transform equalized outputs
// printf("Doing IDFTs\n");
lte_idft(frame_parms,
(uint32_t*)pusch_vars->rxdataF_comp[0],
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12);
// printf("Done\n");
//#endif //DEBUG_ULSCH
llrp = (int16_t*)&pusch_vars->llr[0];
@@ -1316,9 +1290,8 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
break;
default:
#ifdef DEBUG_ULSCH
printf("ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n");
#endif //DEBUG_ULSCH
LOG_E(PHY,"ulsch_demodulation.c (rx_ulsch): Unknown Qm!!!!\n");
break;
}
}
@@ -1329,7 +1302,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
uint8_t UE_index)
{
printf("[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index);
LOG_I(PHY,"[PHY] EMUL eNB %d rx_ulsch_emul : subframe %d, UE_index %d\n",eNB->Mod_id,proc->subframe_rx,UE_index);
eNB->pusch_vars[UE_index]->ulsch_power[0] = 31622; //=45dB;
eNB->pusch_vars[UE_index]->ulsch_power[1] = 31622; //=45dB;
@@ -1344,7 +1317,7 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe);
printf("Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n",
LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n",
subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
+73 -45
View File
@@ -3097,10 +3097,10 @@ void dft128(int16_t *x,int16_t *y,int scale)
dft64((int16_t*)(xtmp),(int16_t*)ytmp,1);
dft64((int16_t*)(xtmp+32),(int16_t*)(ytmp+16),1);
/* LOG_M("dft128a.m","dfta",ytmp,64,1,1);
LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128a.m","dfta",ytmp,64,1,1);
LOG_M("dft128b.m","dftb",ytmp+16,64,1,1);*/
}
for (i=0; i<16; i++) {
bfly2_16(ytmpp,ytmpp+16,
y128p,y128p+16,
@@ -3149,9 +3149,10 @@ void dft128(int16_t *x,int16_t *y,int scale)
}
/* LOG_M("dft128out.m","dft128",y,128,1,1);
exit(-1);*/
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128out.m","dft128",y,128,1,1);
exit(-1);
}
_mm_empty();
_m_empty();
@@ -3176,17 +3177,17 @@ void dft128(int16_t *x,int16_t *y,int scale)
transpose4_ooff_simd256(x256+10,xtmp+5,8);
transpose4_ooff_simd256(x256+12,xtmp+6,8);
transpose4_ooff_simd256(x256+14,xtmp+7,8);
/* LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1);
LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1);
*/
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128ina_256.m","dftina",xtmp,64,1,1);
LOG_M("dft128inb_256.m","dftinb",xtmp+8,64,1,1);
}
dft64((int16_t*)(xtmp),(int16_t*)ytmp,1);
dft64((int16_t*)(xtmp+8),(int16_t*)(ytmp+8),1);
/*LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1);
LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1);
*/
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128outa_256.m","dftouta",ytmp,64,1,1);
LOG_M("dft128outb_256.m","dftoutb",ytmp+8,64,1,1);
}
for (i=0; i<8; i++) {
bfly2_16_256(ytmpp,ytmpp+8,
@@ -3219,9 +3220,10 @@ void dft128(int16_t *x,int16_t *y,int scale)
y256[15] = mulhi_int16_simd256(y256[15],ONE_OVER_SQRT2_Q15_256);
}
/* LOG_M("dft128.m","dft",y256,128,1,1);
exit(-1);*/
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128.m","dft",y256,128,1,1);
exit(-1);
}
}
#endif
@@ -5422,10 +5424,11 @@ void dft1536(int16_t *input, int16_t *output, int scale)
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
// LOG_M("out0.m","o0",tmpo[0],2048,1,1);
// LOG_M("out1.m","o1",tmpo[1],2048,1,1);
// LOG_M("out2.m","o2",tmpo[2],2048,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft1536out0.m","o0",tmpo[0],2048,1,1);
LOG_M("dft1536out1.m","o1",tmpo[1],2048,1,1);
LOG_M("dft1536out2.m","o2",tmpo[2],2048,1,1);
}
for (i=0,i2=0; i<1024; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+1024+i),(simd_q15_t*)(output+2048+i),
@@ -5585,12 +5588,20 @@ void idft6144(int16_t *input, int16_t *output,int scale)
idft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
idft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("idft6144in.m","in",input,6144,1,1);
LOG_M("idft6144out0.m","o0",tmpo[0],2048,1,1);
LOG_M("idft6144out1.m","o1",tmpo[1],2048,1,1);
LOG_M("idft6144out2.m","o2",tmpo[2],2048,1,1);
}
for (i=0,i2=0; i<4096; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+4096+i),(simd_q15_t*)(output+8192+i),
(simd_q15_t*)(twa6144+i),(simd_q15_t*)(twb6144+i));
}
if (scale==1) {
for (i=0; i<96; i++) {
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
@@ -5643,10 +5654,11 @@ void dft6144(int16_t *input, int16_t *output,int scale)
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
// LOG_M("out0.m","o0",tmpo[0],2048,1,1);
// LOG_M("out1.m","o1",tmpo[1],2048,1,1);
// LOG_M("out2.m","o2",tmpo[2],2048,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("ft6144out0.m","o0",tmpo[0],2048,1,1);
LOG_M("ft6144out1.m","o1",tmpo[1],2048,1,1);
LOG_M("ft6144out2.m","o2",tmpo[2],2048,1,1);
}
for (i=0,i2=0; i<4096; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+4096+i),(simd_q15_t*)(output+8192+i),
@@ -5707,10 +5719,11 @@ void dft12288(int16_t *input, int16_t *output,int scale)
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
// LOG_M("out0.m","o0",tmpo[0],4096,1,1);
// LOG_M("out1.m","o1",tmpo[1],4096,1,1);
// LOG_M("out2.m","o2",tmpo[2],4096,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft12288out0.m","o0",tmpo[0],4096,1,1);
LOG_M("dft12288out1.m","o1",tmpo[1],4096,1,1);
LOG_M("dft12288out2.m","o2",tmpo[2],4096,1,1);
}
for (i=0,i2=0; i<8192; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+8192+i),(simd_q15_t*)(output+16384+i),
@@ -5758,9 +5771,18 @@ void idft12288(int16_t *input, int16_t *output,int scale)
}
idft4096((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),scale);
idft4096((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),scale);
idft4096((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),scale);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("idft12288in.m","in",input,12288,1,1);
LOG_M("idft12288out0.m","o0",tmpo[0],4096,1,1);
LOG_M("idft12288out1.m","o1",tmpo[1],4096,1,1);
LOG_M("idft12288out2.m","o2",tmpo[2],4096,1,1);
}
for (i=0,i2=0; i<8192; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+8192+i),(simd_q15_t*)(output+16384+i),
@@ -5790,8 +5812,9 @@ void idft12288(int16_t *input, int16_t *output,int scale)
}
_mm_empty();
_m_empty();
// LOG_M("out.m","out",output,6144,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("idft12288out.m","out",output,6144,1,1);
}
}
int16_t twa18432[12288] __attribute__((aligned(32)));
@@ -5920,16 +5943,18 @@ void dft24576(int16_t *input, int16_t *output,int scale)
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
// LOG_M("out0.m","o0",tmpo[0],8192,1,1);
// LOG_M("out1.m","o1",tmpo[1],8192,1,1);
// LOG_M("out2.m","o2",tmpo[2],8192,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft24576out0.m","o0",tmpo[0],8192,1,1);
LOG_M("dft24576out1.m","o1",tmpo[1],8192,1,1);
LOG_M("dft24576out2.m","o2",tmpo[2],8192,1,1);
}
for (i=0,i2=0; i<16384; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+16384+i),(simd_q15_t*)(output+32768+i),
(simd_q15_t*)(twa24576+i),(simd_q15_t*)(twb24576+i));
}
if (scale==1) {
for (i=0; i<384; i++) {
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
@@ -5953,8 +5978,9 @@ void dft24576(int16_t *input, int16_t *output,int scale)
}
_mm_empty();
_m_empty();
// LOG_M("out.m","out",output,24576,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("out.m","out",output,24576,1,1);
}
}
void idft24576(int16_t *input, int16_t *output,int scale)
@@ -5975,12 +6001,12 @@ void idft24576(int16_t *input, int16_t *output,int scale)
idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
/*
LOG_M("in.m","in",input,24576,1,1);
LOG_M("out0.m","o0",tmpo[0],8192,1,1);
LOG_M("out1.m","o1",tmpo[1],8192,1,1);
LOG_M("out2.m","o2",tmpo[2],8192,1,1);
*/
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("idft24576in.m","in",input,24576,1,1);
LOG_M("idft24576out0.m","o0",tmpo[0],8192,1,1);
LOG_M("idft24576out1.m","o1",tmpo[1],8192,1,1);
LOG_M("idft24576out2.m","o2",tmpo[2],8192,1,1);
}
for (i=0,i2=0; i<16384; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]),
@@ -6011,7 +6037,9 @@ void idft24576(int16_t *input, int16_t *output,int scale)
_mm_empty();
_m_empty();
// LOG_M("out.m","out",output,24576,1,1);
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("idft24576out.m","out",output,24576,1,1);
}
}
/// THIS SECTION IS FOR ALL PUSCH DFTS (i.e. radix 2^a * 3^b * 4^c * 5^d)
+1 -1
View File
@@ -52,7 +52,7 @@
# include "COMMON/ral_messages_types.h"
# include "UTIL/queue.h"
# endif
# include "log.h"
# include "common/utils/LOG/log.h"
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
# else
# define msg printf
+1 -1
View File
@@ -93,7 +93,7 @@
# include "COMMON/ral_messages_types.h"
# include "UTIL/queue.h"
# endif
# include "log.h"
# include "common/utils/LOG/log.h"
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
# else
# define msg printf
+6 -6
View File
@@ -347,7 +347,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
dlsch_harq->rvidx,
dlsch_harq->round);
}
#if defined(MESSAGE_CHART_GENERATOR_PHY)
MSC_LOG_TX_MESSAGE(
MSC_PHY_ENB,MSC_PHY_UE,
NULL,0,
@@ -368,7 +368,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
pmi2hex_2Ar1(dlsch_harq->pmi_alloc),
dlsch_harq->rvidx,
dlsch_harq->round);
#endif
if (ue_stats) ue_stats->dlsch_sliding_cnt++;
@@ -1375,7 +1375,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
ulsch->harq_mask &= ~(1 << harq_pid);
ulsch_harq->round = 0;
}
#if defined(MESSAGE_CHART_GENERATOR_PHY)
MSC_LOG_RX_DISCARDED_MESSAGE(
MSC_PHY_ENB,MSC_PHY_UE,
NULL,0,
@@ -1384,7 +1384,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
ulsch->rnti,harq_pid,
ulsch_harq->round-1
);
#endif
/* Mark the HARQ process to release it later if max transmission reached
* (see below).
@@ -1403,7 +1403,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
T(T_ENB_PHY_ULSCH_UE_ACK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(ulsch->rnti),
T_INT(harq_pid));
#if defined(MESSAGE_CHART_GENERATOR_PHY)
MSC_LOG_RX_MESSAGE(
MSC_PHY_ENB,MSC_PHY_UE,
NULL,0,
@@ -1411,7 +1411,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
frame,subframe,
ulsch->rnti,harq_pid
);
#endif
#ifdef DEBUG_PHY_PROC
#ifdef DEBUG_ULSCH
File diff suppressed because it is too large Load Diff
+6 -21
View File
@@ -523,7 +523,7 @@ int main(int argc, char **argv)
int c;
int k,i,j,aa;
int re;
int loglvl=OAILOG_DEBUG;
int s,Kr,Kr_bytes;
@@ -1001,7 +1001,7 @@ int main(int argc, char **argv)
break;
case 'L':
set_glog(atoi(optarg));
loglvl = atoi(optarg);
break;
case 'h':
@@ -1049,7 +1049,7 @@ int main(int argc, char **argv)
"cannot load configuration module, exiting\n");
logInit();
// enable these lines if you need debug info
set_glog(LOG_DEBUG);
set_glog(loglvl);
// moreover you need to init itti with the following line
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
@@ -2046,24 +2046,9 @@ int main(int argc, char **argv)
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
if (dump_table == 1 ) {
set_component_filelog(USIM); // file located in /tmp/usim.txt
int n;
LOG_F(USIM,"The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++) {
printf("%f ", table_tx[n]);
LOG_F(USIM,"%f ", table_tx[n]);
}
LOG_F(USIM,"\n");
LOG_F(USIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++) {
// printf("%f ", table_rx[n]);
LOG_F(USIM,"%f ", table_rx[n]);
}
LOG_F(USIM,"\n");
set_component_filelog(SIM); // file located in /tmp/usim.txt
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n");
}
double tx_median = table_tx[time_vector_tx.size/2];
+4 -17
View File
@@ -5016,24 +5016,11 @@ int main(int argc, char **argv)
if (dump_table == 1 ) {
set_component_filelog(USIM); // file located in /tmp/usim.txt
int n;
LOG_F(USIM,"The transmitter raw data: \n");
LOG_UDUMPMSG(RRC,(char *)table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,
"The transmitter raw data: \n");
LOG_UDUMPMSG(RRC,(char *)table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,
"The receiver raw data: \n");
for (n=0; n< time_vector_tx.size; n++) {
printf("%f ", table_tx[n]);
LOG_F(USIM,"%f ", table_tx[n]);
}
LOG_F(USIM,"\n");
LOG_F(USIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++) {
// printf("%f ", table_rx[n]);
LOG_F(USIM,"%f ", table_rx[n]);
}
LOG_F(USIM,"\n");
}
double tx_median = table_tx[time_vector_tx.size/2];
double tx_q1 = table_tx[time_vector_tx.size/4];
+3 -18
View File
@@ -3851,24 +3851,9 @@ PMI_FEEDBACK:
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
if (dump_table == 1 ) {
set_component_filelog(USIM); // file located in /tmp/usim.txt
int n;
LOG_F(USIM,"The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++) {
printf("%f ", table_tx[n]);
LOG_F(USIM,"%f ", table_tx[n]);
}
LOG_F(USIM,"\n");
LOG_F(USIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++) {
// printf("%f ", table_rx[n]);
LOG_F(USIM,"%f ", table_rx[n]);
}
LOG_F(USIM,"\n");
set_component_filelog(SIM); // file located in /tmp/usim.txt
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
}
double tx_median = table_tx[time_vector_tx.size/2];
+2 -17
View File
@@ -1491,24 +1491,9 @@ int main(int argc, char **argv)
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
if (dump_table == 1 ) {
int n;
set_component_filelog(SIM); // file located in /tmp/usim.txt
LOG_F(SIM,"The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++) {
// printf("%f ", table_tx[n]);
LOG_F(SIM,"%f ", table_tx[n]);
}
LOG_F(SIM,"\n");
LOG_F(SIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++) {
// printf("%f ", table_rx[n]);
LOG_F(SIM,"%f ", table_rx[n]);
}
LOG_F(SIM,"\n");
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
}
double tx_median = table_tx[time_vector_tx.size/2];