Commit 71d7fcb0 authored by Elena Lukashova's avatar Elena Lukashova

Merge branch 'bugfix-243-dlsim' into feature-59-tm4

parents 037da404 f152ddaa
...@@ -2,8 +2,6 @@ job1: ...@@ -2,8 +2,6 @@ job1:
script: script:
- date - date
- pwd - pwd
- echo $OAI_USER
- echo $OAI_PASS
- echo $OAI_TEST_CASE_GROUP - echo $OAI_TEST_CASE_GROUP
- echo $MACHINELIST - echo $MACHINELIST
- echo $MACHINELISTGENERIC - echo $MACHINELISTGENERIC
......
...@@ -236,6 +236,9 @@ add_boolean_option(XFORMS False "This adds the possibility to see t ...@@ -236,6 +236,9 @@ add_boolean_option(XFORMS False "This adds the possibility to see t
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status") add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(T_TRACER False "Activate the T tracer, a debugging/monitoring framework" ) add_boolean_option(T_TRACER False "Activate the T tracer, a debugging/monitoring framework" )
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs") add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs")
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
...@@ -1633,9 +1636,25 @@ else() ...@@ -1633,9 +1636,25 @@ else()
endif() endif()
# Atlas is required by some packages, but not found in pkg-config # Atlas is required by some packages, but not found in pkg-config
if(EXISTS "/usr/include/atlas/cblas.h") # So, here are some hacks here. Hope this gets fixed in future!
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
include_directories("/usr/include/atlas") include_directories("/usr/include/atlas")
list(APPEND ATLAS_LIBRARIES cblas atlas lapack) LINK_DIRECTORIES("/usr/lib64")
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES blas)
else() # Case for Ubuntu
list(APPEND ATLAS_LIBRARIES cblas)
endif()
if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES tatlas)
else()
list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
endif()
list(APPEND ATLAS_LIBRARIES lapack)
else() else()
message("No Blas/Atlas libs found, some targets will fail") message("No Blas/Atlas libs found, some targets will fail")
endif() endif()
......
sudo rmmod nasmesh || true sudo rmmod nasmesh || true
sudo rmmod ue_ip || true sudo rmmod ue_ip || true
sudo /opt/ltebox/tools/stop_ltebox || true sudo /opt/ltebox/tools/stop_ltebox || true
sudo killall -9 hss_sim || true
sudo /opt/hss_sim0609/starthss_real sudo /opt/hss_sim0609/starthss_real
...@@ -61,9 +61,12 @@ BUILD_DOXYGEN=0 ...@@ -61,9 +61,12 @@ BUILD_DOXYGEN=0
T_TRACER="False" T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False" DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE="" CMAKE_BUILD_TYPE=""
CMAKE_CMD="$CMAKE"
UE_AUTOTEST_TRACE="False" UE_AUTOTEST_TRACE="False"
UE_DEBUG_TRACE="False"
UE_TIMING_TRACE="False"
DISABLE_LOG_X="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
CMAKE_CMD='cmake'
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
...@@ -147,6 +150,12 @@ Options ...@@ -147,6 +150,12 @@ Options
Disable HW dependency during installation Disable HW dependency during installation
--ue-autotest-trace --ue-autotest-trace
Enable specific traces for UE autotest framework Enable specific traces for UE autotest framework
--ue-trace
Enable traces for UE debugging
--ue-timing
Enable traces for timing
--disable-log
Disable all LOG_* macros
--build-eclipse --build-eclipse
Build eclipse project files. Paths are auto corrected by fixprj.sh Build eclipse project files. Paths are auto corrected by fixprj.sh
Usage (first build): Usage (first build):
...@@ -316,6 +325,18 @@ function main() { ...@@ -316,6 +325,18 @@ function main() {
UE_AUTOTEST_TRACE="True" UE_AUTOTEST_TRACE="True"
echo_info "Enabling autotest specific trace for UE" echo_info "Enabling autotest specific trace for UE"
shift 1;; shift 1;;
--ue-trace)
UE_DEBUG_TRACE="True"
echo_info "Enabling UE trace for debug"
shift 1;;
--ue-timing)
UE_TIMING_TRACE="True"
echo_info "Enabling UE timing trace"
shift 1;;
--disable-log)
DISABLE_LOG_X="True"
echo_info "Disabling all LOG_* traces"
shift 1;;
--uhd-images-dir) --uhd-images-dir)
UHD_IMAGES_DIR=$2 UHD_IMAGES_DIR=$2
echo_info "Downloading UHD images in the indicated location" echo_info "Downloading UHD images in the indicated location"
...@@ -504,6 +525,9 @@ function main() { ...@@ -504,6 +525,9 @@ function main() {
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
echo_info "Compiling UE S1 build : enabling Linux and NETLINK" echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
echo "set (LINUX True )" >> $cmake_file echo "set (LINUX True )" >> $cmake_file
......
This diff is collapsed.
...@@ -44,7 +44,11 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -44,7 +44,11 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
uint8_t log2_osf; uint8_t log2_osf;
#if DISABLE_LOG_X
printf("Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
#else
LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf); LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
#endif
if (frame_parms->Ncp==EXTENDED) { if (frame_parms->Ncp==EXTENDED) {
frame_parms->nb_prefix_samples0=512; frame_parms->nb_prefix_samples0=512;
......
...@@ -1754,8 +1754,8 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1754,8 +1754,8 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
avgs = cmax(avgs,avgP[(aarx<<1)+aatx]); avgs = cmax(avgs,avgP[(aarx<<1)+aatx]);
log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx; log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx;
#ifdef DEBUG_PHY #ifdef UE_DEBUG_TRACE
LOG_I(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs); LOG_D(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs);
#endif #endif
#if T_TRACER #if T_TRACER
...@@ -2653,7 +2653,8 @@ int get_nCCE_offset_l1(int *CCE_table, ...@@ -2653,7 +2653,8 @@ int get_nCCE_offset_l1(int *CCE_table,
search_space_free = 1; search_space_free = 1;
for (l=0; l<L; l++) { for (l=0; l<L; l++) {
if (CCE_table[(((Yk+m)%(nCCE/L))*L) + l] == 1) { int cce = (((Yk+m)%(nCCE/L))*L) + l;
if (cce >= nCCE || CCE_table[cce] == 1) {
search_space_free = 0; search_space_free = 0;
break; break;
} }
......
...@@ -6416,24 +6416,23 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6416,24 +6416,23 @@ int generate_ue_dlsch_params_from_dci(int frame,
break; break;
} }
/*#ifdef DEBUG_DCI #ifdef UE_DEBUG_TRACE
if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) { if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) {
printf("dci_format:%d Abssubframe: %d.%d \n",dci_format,frame%1024,subframe); LOG_I(PHY,"dci_format:%d Abssubframe: %d.%d \n",dci_format,frame%1024,subframe);
printf("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti); LOG_D(PHY,"PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti);
printf("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); LOG_D(PHY,"PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb);
printf("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]); LOG_D(PHY,"PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]);
printf("PDSCH dlsch0 UE: harq_pid %d\n",harq_pid); LOG_D(PHY,"PDSCH dlsch0 UE: harq_pid %d\n",harq_pid);
//printf("PDSCH dlsch0 UE: tpc %d\n",TPC); LOG_D(PHY,"PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch);
printf("PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch); LOG_D(PHY,"PDSCH dlsch0 UE: round %d\n",dlsch0_harq->round);
printf("PDSCH dlsch0 UE: round %d\n",dlsch0_harq->round); LOG_D(PHY,"PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi);
printf("PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi); LOG_D(PHY,"PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx);
printf("PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx); LOG_D(PHY,"PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS);
printf("PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS); LOG_D(PHY,"PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs);
printf("PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs); LOG_D(PHY,"PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off);
printf("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off); }
} #endif
#endif*/
#if T_TRACER #if T_TRACER
if( (dlsch[0]->rnti != si_rnti) && (dlsch[0]->rnti != ra_rnti) && (dlsch[0]->rnti != p_rnti)) if( (dlsch[0]->rnti != si_rnti) && (dlsch[0]->rnti != ra_rnti) && (dlsch[0]->rnti != p_rnti))
...@@ -8061,7 +8060,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -8061,7 +8060,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (ulsch->bundling) if (ulsch->bundling)
ulsch->harq_processes[harq_pid]->O_ACK = (dai == 3)? 0 : 1; ulsch->harq_processes[harq_pid]->O_ACK = (dai == 3)? 0 : 1;
else else
ulsch->harq_processes[harq_pid]->O_ACK = (dai+1)&3; ulsch->harq_processes[harq_pid]->O_ACK = (dai >= 2)? 2 : (dai+1)&3; //(dai+1)&3;
// ulsch->harq_processes[harq_pid]->V_UL_DAI = dai+1; // ulsch->harq_processes[harq_pid]->V_UL_DAI = dai+1;
} }
...@@ -8129,28 +8128,28 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -8129,28 +8128,28 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
// ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift; // ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift;
#ifdef DEBUG_DCI #ifdef UE_DEBUG_TRACE
printf("Format 0 DCI : ulsch (ue): AbsSubframe %d.%d\n",proc->frame_rx%1024,subframe); LOG_I(PHY,"Format 0 DCI : ulsch (ue): AbsSubframe %d.%d\n",proc->frame_rx%1024,subframe);
printf("Format 0 DCI : ulsch (ue): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb); LOG_D(PHY,"Format 0 DCI : ulsch (ue): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb);
printf("Format 0 DCI :ulsch (ue): first_rb %d\n",ulsch->harq_processes[harq_pid]->first_rb); LOG_D(PHY,"Format 0 DCI :ulsch (ue): first_rb %d\n",ulsch->harq_processes[harq_pid]->first_rb);
printf("Format 0 DCI :ulsch (ue): rballoc %d\n",rballoc); LOG_D(PHY,"Format 0 DCI :ulsch (ue): rballoc %d\n",rballoc);
printf("Format 0 DCI :ulsch (ue): harq_pid %d\n",harq_pid); LOG_D(PHY,"Format 0 DCI :ulsch (ue): harq_pid %d\n",harq_pid);
printf("Format 0 DCI :ulsch (ue): first_tx %d\n",ulsch->harq_processes[harq_pid]->first_tx); LOG_D(PHY,"Format 0 DCI :ulsch (ue): first_tx %d\n",ulsch->harq_processes[harq_pid]->first_tx);
printf("Format 0 DCI :ulsch (ue): DCINdi %d\n",ulsch->harq_processes[harq_pid]->DCINdi); LOG_D(PHY,"Format 0 DCI :ulsch (ue): DCINdi %d\n",ulsch->harq_processes[harq_pid]->DCINdi);
printf("Format 0 DCI :ulsch (ue): round %d\n",ulsch->harq_processes[harq_pid]->round); LOG_D(PHY,"Format 0 DCI :ulsch (ue): round %d\n",ulsch->harq_processes[harq_pid]->round);
//printf("Format 0 DCI :ulsch (ue): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS); //LOG_I(PHY,"Format 0 DCI :ulsch (ue): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS);
printf("Format 0 DCI :ulsch (ue): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs); LOG_D(PHY,"Format 0 DCI :ulsch (ue): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs);
//printf("Format 0 DCI :ulsch (ue): O %d\n",ulsch->O); //LOG_I(PHY,"Format 0 DCI :ulsch (ue): O %d\n",ulsch->O);
//printf("Format 0 DCI :ulsch (ue): cqiReq %d\n",cqi_req); //LOG_I(PHY,"Format 0 DCI :ulsch (ue): cqiReq %d\n",cqi_req);
//if (frame_parms->frame_type == TDD) //if (frame_parms->frame_type == TDD)
// printf("Format 0 DCI :ulsch (ue): O_ACK/DAI %d/%d\n",ulsch->harq_processes[harq_pid]->O_ACK,dai); // LOG_I(PHY,"Format 0 DCI :ulsch (ue): O_ACK/DAI %d/%d\n",ulsch->harq_processes[harq_pid]->O_ACK,dai);
//else //else
// printf("Format 0 DCI :ulsch (ue): O_ACK %d\n",ulsch->harq_processes[harq_pid]->O_ACK); // LOG_I(PHY,"Format 0 DCI :ulsch (ue): O_ACK %d\n",ulsch->harq_processes[harq_pid]->O_ACK);
printf("Format 0 DCI :ulsch (ue): Nsymb_pusch %d\n",ulsch->Nsymb_pusch); LOG_D(PHY,"Format 0 DCI :ulsch (ue): Nsymb_pusch %d\n",ulsch->Nsymb_pusch);
printf("Format 0 DCI :ulsch (ue): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2); LOG_D(PHY,"Format 0 DCI :ulsch (ue): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2);
printf("Format 0 DCI :ulsch (ue): phich status %d\n",ulsch->harq_processes[harq_pid]->status); LOG_D(PHY,"Format 0 DCI :ulsch (ue): phich status %d\n",ulsch->harq_processes[harq_pid]->status);
#else #else
UNUSED_VARIABLE(dai); UNUSED_VARIABLE(dai);
#endif #endif
......
...@@ -167,10 +167,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -167,10 +167,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
uint8_t llr8_flag) uint8_t llr8_flag)
{ {
#if UE_TIMING_TRACE
time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats; time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats;
time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats; time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats;
time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats; time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats;
#endif
uint32_t A,E; uint32_t A,E;
uint32_t G; uint32_t G;
uint32_t ret,offset; uint32_t ret,offset;
...@@ -372,7 +373,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -372,7 +373,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
printf("f1 %d, f2 %d, F %d\n",f1f2mat_old[2*iind],f1f2mat_old[1+(2*iind)],(r==0) ? harq_process->F : 0); printf("f1 %d, f2 %d, F %d\n",f1f2mat_old[2*iind],f1f2mat_old[1+(2*iind)],(r==0) ? harq_process->F : 0);
#endif #endif
#if UE_TIMING_TRACE
start_meas(dlsch_rate_unmatching_stats); start_meas(dlsch_rate_unmatching_stats);
#endif
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short)); memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8), harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t*) &dummy_w[r][0], (uint8_t*) &dummy_w[r][0],
...@@ -408,12 +411,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -408,12 +411,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->Nl, harq_process->Nl,
r, r,
&E)==-1) { &E)==-1) {
#if UE_TIMING_TRACE
stop_meas(dlsch_rate_unmatching_stats); stop_meas(dlsch_rate_unmatching_stats);
#endif
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n"); LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
return(dlsch->max_turbo_iterations); return(dlsch->max_turbo_iterations);
} else } else
{
#if UE_TIMING_TRACE
stop_meas(dlsch_rate_unmatching_stats); stop_meas(dlsch_rate_unmatching_stats);
#endif
}
r_offset += E; r_offset += E;
/* /*
...@@ -421,13 +429,16 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -421,13 +429,16 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->d[r], harq_process->d[r],
harq_process->w); harq_process->w);
*/ */
#if UE_TIMING_TRACE
start_meas(dlsch_deinterleaving_stats); start_meas(dlsch_deinterleaving_stats);
#endif
sub_block_deinterleaving_turbo(4+Kr, sub_block_deinterleaving_turbo(4+Kr,
&harq_process->d[r][96], &harq_process->d[r][96],
harq_process->w[r]); harq_process->w[r]);
#if UE_TIMING_TRACE
stop_meas(dlsch_deinterleaving_stats); stop_meas(dlsch_deinterleaving_stats);
#endif
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
/* /*
if (r==0) { if (r==0) {
...@@ -472,8 +483,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -472,8 +483,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n", AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n",
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round); Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round);
} }
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1); LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
ret = tc ret = tc
(&harq_process->d[r][96], (&harq_process->d[r][96],
...@@ -492,14 +504,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -492,14 +504,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
#endif
} }
#else #else
if ((harq_process->C == 1) || if ((harq_process->C == 1) ||
((r==harq_process->C-1) && (skipped_last==0))) { // last segment with odd number of segments ((r==harq_process->C-1) && (skipped_last==0))) { // last segment with odd number of segments
start_meas(dlsch_turbo_decoding_stats); #if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats);
#endif
ret = tc ret = tc
(&harq_process->d[r][96], (&harq_process->d[r][96],
harq_process->c[r], harq_process->c[r],
...@@ -516,7 +531,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -516,7 +531,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_ext_stats, &phy_vars_ue->dlsch_tc_ext_stats,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
#endif
// printf("single decode, exit\n"); // printf("single decode, exit\n");
// exit(-1); // exit(-1);
} }
...@@ -533,7 +550,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -533,7 +550,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
printf("single decoding segment %d (%p)\n",r-1,&harq_process->d[r-1][96]); printf("single decoding segment %d (%p)\n",r-1,&harq_process->d[r-1][96]);
#endif #endif
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
printf("double decoding segments %d,%d (%p,%p)\n",r-1,r,&harq_process->d[r-1][96],&harq_process->d[r][96]); printf("double decoding segments %d,%d (%p,%p)\n",r-1,r,&harq_process->d[r-1][96],&harq_process->d[r][96]);
#endif #endif
...@@ -574,10 +593,14 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -574,10 +593,14 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
exit(-1);*/ exit(-1);*/
stop_meas(dlsch_turbo_decoding_stats); #if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats);
#endif
} }
else { // Kr_last != Kr else { // Kr_last != Kr
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
ret = tc ret = tc
(&harq_process->d[r-1][96], (&harq_process->d[r-1][96],
harq_process->c[r-1], harq_process->c[r-1],
...@@ -594,9 +617,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -594,9 +617,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_ext_stats, &phy_vars_ue->dlsch_tc_ext_stats,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
stop_meas(dlsch_turbo_decoding_stats); #if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats);
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
ret = tc ret = tc
(&harq_process->d[r][96], (&harq_process->d[r][96],
harq_process->c[r], harq_process->c[r],
...@@ -613,6 +639,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -613,6 +639,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_ext_stats, &phy_vars_ue->dlsch_tc_ext_stats,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
/*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n", /*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n",
...@@ -621,7 +650,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -621,7 +650,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0), dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0),
dlsch_deinterleaving_stats->p_time/(cpuf*1000.0), dlsch_deinterleaving_stats->p_time/(cpuf*1000.0),
dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/ dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/
#endif
} }
} }
} }
...@@ -643,9 +672,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -643,9 +672,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
frame_rx_prev = frame_rx_prev%1024; frame_rx_prev = frame_rx_prev%1024;
if (err_flag == 1) { if (err_flag == 1) {
//LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n", #if UE_DEBUG_TRACE
// phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round); LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
#endif
dlsch->harq_ack[subframe].ack = 0; dlsch->harq_ack[subframe].ack = 0;
dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1; dlsch->harq_ack[subframe].send_harq_status = 1;
...@@ -666,9 +696,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -666,9 +696,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return((1+dlsch->max_turbo_iterations)); return((1+dlsch->max_turbo_iterations));
} else { } else {
#if UE_DEBUG_TRACE
//LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d harq_process->mcs %d harq_process->nb_rb %d\n", LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d mcs %d nb_rb %d\n",
//phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb); phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb);
#endif
harq_process->status = SCH_IDLE; harq_process->status = SCH_IDLE;
harq_process->round = 0; harq_process->round = 0;
......
...@@ -471,13 +471,13 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -471,13 +471,13 @@ int rx_pdsch(PHY_VARS_UE *ue,
avg, avg,
symbol, symbol,
nb_rb); nb_rb);
#ifdef DEBUG_PHY #ifdef UE_DEBUG_TRACE
LOG_I(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n", LOG_D(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n",
frame%1024,subframe, pdsch_vars[eNB_id]->log2_maxh, frame%1024,subframe, pdsch_vars[eNB_id]->log2_maxh,
pdsch_vars[eNB_id]->log2_maxh0, pdsch_vars[eNB_id]->log2_maxh0,
pdsch_vars[eNB_id]->log2_maxh1, pdsch_vars[eNB_id]->log2_maxh1,
avg[0],avgs); avg[0],avgs);
LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode); //LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
#endif #endif
} }
......
...@@ -87,7 +87,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue, ...@@ -87,7 +87,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
if (Msc_idx_ptr) if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes; Msc_RS_idx = Msc_idx_ptr - dftsizes;
else { else {
printf("generate_drs_pusch: index for Msc_RS=%d not found\n",Msc_RS); LOG_I(PHY,"generate_drs_pusch: index for Msc_RS=%d not found\n",Msc_RS);
return(-1); return(-1);
} }
......
...@@ -468,13 +468,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -468,13 +468,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
if( (abs(ue->common_vars.freq_offset) > 150) && (ret == 0) ) if( (abs(ue->common_vars.freq_offset) > 150) && (ret == 0) )
{ {
ret=-1; ret=-1;
LOG_E(HW,"Ignore MIB with high freq offset [%d Hz] estimation \n",ue->common_vars.freq_offset); #if DISABLE_LOG_X
printf("Ignore MIB with high freq offset [%d Hz] estimation \n",ue->common_vars.freq_offset);
#else
LOG_E(HW, "Ignore MIB with high freq offset [%d Hz] estimation \n",ue->common_vars.freq_offset);
#endif
} }
if (ret==0) { // PBCH found so indicate sync to higher layers and configure frame parameters if (ret==0) { // PBCH found so indicate sync to higher layers and configure frame parameters
//#ifdef DEBUG_INITIAL_SYNCH //#ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY,"[UE%d] In synch, rx_offset %d samples\n",ue->Mod_id, ue->rx_offset); #if DISABLE_LOG_X
printf("[UE%d] In synch, rx_offset %d samples\n",ue->Mod_id, ue->rx_offset);
#else
LOG_I(PHY, "[UE%d] In synch, rx_offset %d samples\n",ue->Mod_id, ue->rx_offset);
#endif
//#endif //#endif
if (ue->UE_scan_carrier == 0) { if (ue->UE_scan_carrier == 0) {
...@@ -505,7 +513,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -505,7 +513,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
} }
LOG_I(PHY,"[UE %d] Frame %d RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm, rsrp %3.1f dBm/RE, rsrq %3.1f dB\n",ue->Mod_id, #if DISABLE_LOG_X
printf("[UE %d] Frame %d RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm, rsrp %3.1f dBm/RE, rsrq %3.1f dB\n",ue->Mod_id,
ue->proc.proc_rxtx[0].frame_rx, ue->proc.proc_rxtx[0].frame_rx,
10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB, 10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB,
10*log10(ue->measurements.rssi), 10*log10(ue->measurements.rssi),
...@@ -515,7 +524,27 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -515,7 +524,27 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
(10*log10(ue->measurements.rsrq[0]))); (10*log10(ue->measurements.rsrq[0])));
LOG_I(PHY,"[UE %d] Frame %d MIB Information => %s, %s, NidCell %d, N_RB_DL %d, PHICH DURATION %d, PHICH RESOURCE %s, TX_ANT %d\n", printf("[UE %d] Frame %d MIB Information => %s, %s, NidCell %d, N_RB_DL %d, PHICH DURATION %d, PHICH RESOURCE %s, TX_ANT %d\n",
ue->Mod_id,
ue->proc.proc_rxtx[0].frame_rx,
duplex_string[ue->frame_parms.frame_type],
prefix_string[ue->frame_parms.Ncp],
ue->frame_parms.Nid_cell,
ue->frame_parms.N_RB_DL,
ue->frame_parms.phich_config_common.phich_duration,
phich_string[ue->frame_parms.phich_config_common.phich_resource],
ue->frame_parms.nb_antenna_ports_eNB);
#else
LOG_I(PHY, "[UE %d] Frame %d RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm, rsrp %3.1f dBm/RE, rsrq %3.1f dB\n",ue->Mod_id,
ue->proc.proc_rxtx[0].frame_rx,
10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB,
10*log10(ue->measurements.rssi),
ue->rx_total_gain_dB,
ue->measurements.n0_power_tot_dBm,
10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB,
(10*log10(ue->measurements.rsrq[0])));
LOG_I(PHY, "[UE %d] Frame %d MIB Information => %s, %s, NidCell %d, N_RB_DL %d, PHICH DURATION %d, PHICH RESOURCE %s, TX_ANT %d\n",
ue->Mod_id, ue->Mod_id,
ue->proc.proc_rxtx[0].frame_rx, ue->proc.proc_rxtx[0].frame_rx,