Commit 28b0c07d authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/359-dlsim-performance-counters' into...

Merge remote-tracking branch 'origin/359-dlsim-performance-counters' into develop_integration_2018_w44
parents a7cf0cfa 97ac7809
......@@ -956,20 +956,20 @@
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel14</main_exec>
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60</main_exec_args>
<main_exec_args> -m=5 -g=F -s=-1= -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</main_exec_args>
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
......@@ -9,4 +9,5 @@ set(MU_RECIEVER False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel14")
set (UE_TIMING_TRACE True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
......@@ -847,6 +847,7 @@ typedef struct {
time_stats_t pdsch_procedures_stat[RX_NB_TH];
time_stats_t pdsch_procedures_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
time_stats_t dlsch_procedures_stat[RX_NB_TH];
time_stats_t crnti_procedures_stats;
time_stats_t ofdm_demod_stats;
time_stats_t dlsch_rx_pdcch_stats;
......
......@@ -1074,12 +1074,12 @@ typedef struct PHY_VARS_eNB_s {
int hw_timing_advance;
time_stats_t phy_proc;
time_stats_t phy_proc_tx;
time_stats_t phy_proc_rx;
time_stats_t rx_prach;
time_stats_t ofdm_mod_stats;
time_stats_t dlsch_common_and_dci;
time_stats_t dlsch_encoding_stats;
time_stats_t dlsch_modulation_stats;
time_stats_t dlsch_scrambling_stats;
......
......@@ -484,6 +484,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),1);
if (do_meas==1) start_meas(&eNB->phy_proc_tx);
if (do_meas==1) start_meas(&eNB->dlsch_common_and_dci);
// clear the transmit data array for the current subframe
for (aa=0; aa<fp->nb_antenna_ports_eNB; aa++) {
......@@ -578,6 +579,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
subframe);
}
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
......
......@@ -1715,7 +1715,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
if ( LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->phy_proc_tx);
LOG_UI(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0));
LOG_I(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0));
stop_meas(&ue->ulsch_encoding_stats);
}
......@@ -3369,7 +3369,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
if(m >= ue->frame_parms.symbols_per_tti>>1)
slot = 1;
stop_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]);
LOG_UI(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
}
......@@ -3604,9 +3604,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, " --> Unscrambling for CW0 %5.3f\n",
LOG_I(PHY, " --> Unscrambling for CW0 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
}
......@@ -3661,9 +3661,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, " --> Unscrambling for CW1 %5.3f\n",
LOG_I(PHY, " --> Unscrambling for CW1 %5.3f\n",
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n",
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n",
frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
}
......@@ -4005,7 +4005,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
if ( LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
}
......@@ -4099,7 +4099,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
if ( LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
}
......@@ -4319,7 +4319,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
if (LOG_DEBUGFLAG(UE_TIMING)) {
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
//proc->dci_slot0_available = 1;
......@@ -4328,7 +4328,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
//proc->dci_slot0_available=1;
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
}
......@@ -4337,7 +4337,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
}
//wait until slot1 FE is done
......@@ -4350,7 +4350,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
}
/**** End Subframe FE Processing ****/
......@@ -4439,7 +4439,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (LOG_DEBUGFLAG(UE_TIMING)){
stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
}
......@@ -4455,7 +4455,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (LOG_DEBUGFLAG(UE_TIMING)){
stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
......@@ -4526,7 +4526,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (LOG_DEBUGFLAG(UE_TIMING)
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
// duplicate harq structure
......@@ -4589,7 +4589,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (LOG_DEBUGFLAG(UE_TIMING)){
stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
......@@ -4632,7 +4632,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
if(LOG_DEBUGFLAG(UE_TIMING)) {
start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
start_meas(&ue->generic_stat);
start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
}
pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
......@@ -4757,15 +4757,17 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->generic_stat);
LOG_UI(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
LOG_I(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
if (LOG_DEBUGFLAG(UE_TIMING)) {
start_meas(&ue->generic_stat);
start_meas(&ue->crnti_procedures_stats);
}
// do procedures for C-RNTI
if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
......@@ -4782,12 +4784,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
}
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->crnti_procedures_stats);
}
LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
// do procedures for SI-RNTI
if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue,
proc,
eNB_id,
SI_PDSCH,
......@@ -4870,7 +4874,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
} // not an S-subframe
if(LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->generic_stat);
LOG_UI(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
LOG_I(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
}
LOG_D(PHY," ------ end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
......@@ -4915,8 +4919,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
abstraction_flag);
if (LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_UI(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
......@@ -5059,14 +5063,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
if ( LOG_DEBUGFLAG(UE_TIMING)) {
stop_meas(&ue->generic_stat);
LOG_UI(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
LOG_I(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
if ( LOG_DEBUGFLAG(UE_TIMING) ) {
stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
LOG_UI(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_I(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
}
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
......
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
double median(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
}
double q1(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize);
}
double q3(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(3*input->size/4)*input->atomSize);
}
void dumpVarArray(varArray_t *input) {
double *ptr=dataArray(input);
printf("dumping size=%ld\n", input->size);
for (int i=0; i < input->size; i++)
printf("%.1f:", *ptr++);
printf("\n");
}
void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
reset_meas(res);
for (int i=0; i<RX_NB_TH; i++) {
res->diff+=src[i].diff;
res->diff_square+=src[i].diff_square;
res->trials+=src[i].trials;
if (src[i].max > res->max)
res->max=src[i].max;
}
res->p_time=src[lastActive].p_time;
}
void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastActive) {
reset_meas(res);
for (int i=0; i<RX_NB_TH; i++) {
res->diff+=src[i][0].diff+src[i][1].diff;
res->diff_square+=src[i][0].diff_square+src[i][1].diff_square;
res->trials+=src[i][0].trials+src[i][1].trials;
if (src[i][0].max > res->max)
res->max=src[i][0].max;
if (src[i][1].max > res->max)
res->max=src[i][1].max;}
int last=src[lastActive][0].in < src[lastActive][1].in? 1 : 0 ;
res->p_time=src[lastActive][last].p_time;
}
void printStatIndent(time_stats_t *ptr, char *txt) {
printf("|__ %-50s %.2f us (%d trials)\n",
txt,
ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
ptr->trials);
}
void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) {
double timeBase=1/(1000*cpu_freq_GHz);
printf(" |__ %-45s %.2f us (cycles/block %ld, %5d trials)\n",
txt,
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
turbo_iter?(uint64_t)round(((double)ptr->diff)/turbo_iter):0,
ptr->trials);
}
double squareRoot(time_stats_t *ptr) {
double timeBase=1/(1000*cpu_freq_GHz);
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
pow((double)ptr->diff/ptr->trials*timeBase,2));
}
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
printf("%-50s :%.2f us (%d trials)\n",
txt,
(double)ptr->diff/ptr->trials*timeBase,
ptr->trials);
printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
}
void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) {
fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;",
squareRoot(ptr),
(double)ptr->max, *(double*)dataArray(sortedList),
median(sortedList),q1(sortedList),q3(sortedList),
dropped);
}
struct option * parse_oai_options(paramdef_t *options) {
int l;
for(l=0; options[l].optname[0]!=0; l++) {};
struct option *long_options=calloc(sizeof(struct option),l);
for(int i=0; options[i].optname[0]!=0; i++) {
long_options[i].name=options[i].optname;
long_options[i].has_arg=options[i].paramflags==PARAMFLAG_BOOL?no_argument:required_argument;
if ( options[i].voidptr)
switch (options[i].type) {
case TYPE_INT:
*options[i].iptr=options[i].defintval;
break;
case TYPE_DOUBLE:
*options[i].dblptr=options[i].defdblval;
break;
case TYPE_UINT8:
*options[i].u8ptr=options[i].defintval;
break;
case TYPE_UINT16:
*options[i].u16ptr=options[i].defintval;
break;
default:
printf("not parsed type for default value %s\n", options[i].optname );
exit(1);
}
continue;
};
return long_options;
}
void display_options_values(paramdef_t *options, int verbose) {
for(paramdef_t * ptr=options; ptr->optname[0]!=0; ptr++) {
char varText[256]="need specific display";
if (ptr->voidptr != NULL) {
if ( (ptr->paramflags & PARAMFLAG_BOOL) )
strcpy(varText, *(bool *)ptr->iptr ? "True": "False" );
else switch (ptr->type) {
case TYPE_INT:
sprintf(varText,"%d",*ptr->iptr);
break;
case TYPE_DOUBLE:
sprintf(varText,"%.2f",*ptr->dblptr);
break;
case TYPE_UINT8:
sprintf(varText,"%d",(int)*ptr->u8ptr);
break;
case TYPE_UINT16:
sprintf(varText,"%d",(int)*ptr->u16ptr);
break;
default:
printf("not decoded type\n");
exit(1);
}
}
printf("--%-20s set to %s\n",ptr->optname, varText);
if (verbose) printf("%s\n",ptr->helpstr);
}
}
<
......@@ -72,6 +72,9 @@ void feptx_ofdm(RU_t *ru);
void feptx_prec(RU_t *ru);
double cpuf;
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
//#define MCS_COUNT 23//added for PHY abstraction
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
int otg_enabled=0;
/*the following parameters are used to control the processing times calculations*/
......@@ -535,23 +538,42 @@ void fill_DCI(PHY_VARS_eNB *eNB,
}
int n_users = 1;
sub_frame_t subframe=7;
int subframe=7;
int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1;
uint16_t n_rnti=0x1234;
int nfapi_mode=0;
int nfapi_mode=0;
int abstx=0;
int Nid_cell=0;
int N_RB_DL=25;
int tdd_config=3;
int dci_flag=0;
int threequarter_fs=0;
double snr_step=1,input_snr_step=1, snr_int=30;
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
int test_perf=0;
int n_frames;
int n_ch_rlz = 1;
int rx_sample_offset = 0;
int xforms=0;
int dump_table=0;
int loglvl=OAILOG_WARNING;
int mcs1=0,mcs2=0,mcs_i=0,dual_stream_UE = 0,awgn_flag=0;
int two_thread_flag=0;
int num_rounds = 4;//,fix_rounds=0;
int perfect_ce = 0;
int extended_prefix_flag=0;
int verbose=0, help=0;
double SNR,snr0=-2.0,snr1,rate = 0;
int print_perf=0;
int main(int argc, char **argv)
{
int c;
int k,i,j,aa;
int re;
int loglvl=OAILOG_DEBUG;
int s,Kr,Kr_bytes;
double SNR,snr0=-2.0,snr1,rate = 0;
double snr_step=1,input_snr_step=1, snr_int=30;
LTE_DL_FRAME_PARMS *frame_parms;
double s_re0[30720*2],s_im0[30720*2],r_re0[30720*2],r_im0[30720*2];
......@@ -560,17 +582,14 @@ int main(int argc, char **argv)
double *s_im[2]={s_im0,s_im1};
double *r_re[2]={r_re0,r_re1};
double *r_im[2]={r_im0,r_im1};
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
uint8_t extended_prefix_flag=0,transmission_mode=1,n_tx_port=1,n_tx_phy=1,n_rx=2;
uint16_t Nid_cell=0;
uint8_t transmission_mode=1,n_tx_port=1,n_tx_phy=1,n_rx=2;
int eNB_id = 0;
unsigned char mcs1=0,mcs2=0,mcs_i=0,dual_stream_UE = 0,awgn_flag=0,round;
unsigned char round;
unsigned char i_mod = 2;
unsigned short NB_RB;
uint16_t tdd_config=3;
SCM_t channel_model=Rayleigh1;
......@@ -602,18 +621,13 @@ int main(int argc, char **argv)
FILE *input_fd=NULL;
unsigned char input_file=0;
int n_frames;
int n_ch_rlz = 1;
channel_desc_t *eNB2UE[4];
//uint8_t num_pdcch_symbols_2=0;
uint8_t rx_sample_offset = 0;
//char stats_buffer[4096];
//int len;
uint8_t num_rounds = 4;//,fix_rounds=0;
//int u;
int n=0;
int abstx=0;
//int iii;
int ch_realization;
......@@ -625,9 +639,8 @@ int main(int argc, char **argv)
// int bler;
double blerr[4];
short *uncoded_ber_bit=NULL;
uint8_t N_RB_DL=25,osf=1;
int osf=1;
frame_t frame_type = FDD;
int xforms=0;
FD_lte_phy_scope_ue *form_ue = NULL;
char title[255];
......@@ -640,16 +653,12 @@ int main(int argc, char **argv)
// time_stats_t ts;//,sts,usts;
int avg_iter,iter_trials;
int rballocset=0;
int print_perf=0;
int test_perf=0;
int test_passed=0;
int dump_table=0;
double effective_rate=0.0;
char channel_model_input[10]="I";
int TB0_active = 1;
uint32_t perfect_ce = 0;
// LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
// LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
......@@ -657,20 +666,11 @@ int main(int argc, char **argv)
uint8_t ue_category=4;
uint32_t Nsoft;
int sf;
int CCE_table[800];
int threequarter_fs=0;