From 31f770978cbe2a428e9d4cd4b8258e1af4b1cd36 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 18 Sep 2024 16:02:14 +0200 Subject: [PATCH] option q is to set cpu measurements but it is hardcoded in some places --- common/utils/time_meas.c | 6 +- common/utils/time_meas.h | 20 ++--- executables/lte-enb.c | 2 +- executables/lte-ru.c | 6 +- executables/lte-ue.c | 1 - executables/nr-ru.c | 14 ++-- executables/nr-softmodem.c | 2 +- executables/softmodem-common.h | 2 +- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 2 +- openair1/PHY/CODING/TESTBENCH/polartest.c | 2 +- .../PHY/CODING/TESTBENCH/smallblocktest.c | 2 +- .../PHY/LTE_UE_TRANSPORT/dlsch_decoding.c | 1 - openair1/PHY/NR_UE_TRANSPORT/pss_nr.c | 13 ---- openair1/PHY/TOOLS/calibration_test.c | 2 +- openair1/PHY/TOOLS/oai_dfts.c | 76 +++++++++---------- openair1/PHY/TOOLS/oai_dfts_neon.c | 76 +++++++++---------- openair1/SCHED/phy_procedures_lte_eNb.c | 2 +- openair1/SCHED/ru_procedures.c | 10 +-- openair1/SIMULATION/LTE_PHY/dlsim.c | 2 +- openair1/SIMULATION/LTE_PHY/dlsim_tm4.c | 2 +- openair1/SIMULATION/LTE_PHY/dlsim_tm7.c | 2 +- openair1/SIMULATION/LTE_PHY/mbmssim.c | 2 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 3 +- openair1/SIMULATION/NR_PHY/dlsim.c | 2 +- openair1/SIMULATION/NR_PHY/ulsim.c | 2 +- 25 files changed, 114 insertions(+), 140 deletions(-) diff --git a/common/utils/time_meas.c b/common/utils/time_meas.c index 3e36f1b69b..31e9cfd6fb 100644 --- a/common/utils/time_meas.c +++ b/common/utils/time_meas.c @@ -29,7 +29,7 @@ #include "common/config/config_userapi.h" #include // global var for openair performance profiler -int opp_enabled = 0; +int cpu_meas_enabled = 0; double cpu_freq_GHz __attribute__ ((aligned(32))); double cpu_freq_GHz __attribute__ ((aligned(32)))=0.0; @@ -56,7 +56,7 @@ void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name) { - if (opp_enabled) { + if (cpu_meas_enabled) { //static double cpu_freq_GHz = 3.2; //if (cpu_freq_GHz == 0.0) @@ -73,7 +73,7 @@ void print_meas(time_stats_t *ts, time_stats_t *total_exec_time, time_stats_t *sf_exec_time) { - if (opp_enabled) { + if (cpu_meas_enabled) { static int first_time = 0; static double cpu_freq_GHz = 0.0; diff --git a/common/utils/time_meas.h b/common/utils/time_meas.h index f791b485d1..bc37104a60 100644 --- a/common/utils/time_meas.h +++ b/common/utils/time_meas.h @@ -32,7 +32,7 @@ #include #include // global var to enable openair performance profiler -extern int opp_enabled; +extern int cpu_meas_enabled; extern double cpu_freq_GHz __attribute__ ((aligned(32)));; // structure to store data to compute cpu measurment #if defined(__x86_64__) || defined(__i386__) @@ -74,13 +74,9 @@ typedef struct time_stats { } time_stats_t; #define MEASURE_ENABLED(X) (X->meas_enabled) - - - static inline void start_meas(time_stats_t *ts) __attribute__((always_inline)); static inline void stop_meas(time_stats_t *ts) __attribute__((always_inline)); - void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name); void print_meas(time_stats_t *ts, const char *name, time_stats_t *total_exec_time, time_stats_t *sf_exec_time); size_t print_meas_log(time_stats_t *ts, @@ -130,11 +126,11 @@ static inline uint32_t rdtsc_oai(void) { static inline int cpumeas(int action) { switch (action) { case CPUMEAS_ENABLE: - opp_enabled = 1; + cpu_meas_enabled = 1; break; case CPUMEAS_DISABLE: - opp_enabled = 0; + cpu_meas_enabled = 0; break; case CPUMEAS_GETSTATE: @@ -142,11 +138,11 @@ static inline int cpumeas(int action) { break; } - return opp_enabled; + return cpu_meas_enabled; } static inline void start_meas(time_stats_t *ts) { - if (opp_enabled) { + if (cpu_meas_enabled) { if (ts->meas_flag==0) { ts->trials++; ts->in = rdtsc_oai(); @@ -159,7 +155,7 @@ static inline void start_meas(time_stats_t *ts) { } static inline void stop_meas(time_stats_t *ts) { - if (opp_enabled) { + if (cpu_meas_enabled) { long long out = rdtsc_oai(); if (ts->in) { ts->diff += (out - ts->in); @@ -186,7 +182,7 @@ static inline void reset_meas(time_stats_t *ts) { } static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) { - if (opp_enabled) { + if (cpu_meas_enabled) { dst_ts->trials=src_ts->trials; dst_ts->diff=src_ts->diff; dst_ts->max=src_ts->max; @@ -195,7 +191,7 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) { static inline void merge_meas(time_stats_t *dst_ts, const time_stats_t *src_ts) { - if (!opp_enabled) + if (!cpu_meas_enabled) return; dst_ts->trials += src_ts->trials; dst_ts->diff += src_ts->diff; diff --git a/executables/lte-enb.c b/executables/lte-enb.c index 1a26644a43..29238aa882 100644 --- a/executables/lte-enb.c +++ b/executables/lte-enb.c @@ -925,7 +925,7 @@ void init_eNB_proc(int inst) { AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach); - if (opp_enabled == 1) + if (cpu_meas_enabled) threadCreate(&proc->process_stats_thread, process_stats_thread, (void *)eNB, "opp stats", -1, sched_get_priority_min(SCHED_OAI)); if (!IS_SOFTMODEM_NOSTATS_BIT) threadCreate(&proc->L1_stats_thread, L1_stats_thread, (void *)eNB, "L1 stats", -1, sched_get_priority_min(SCHED_OAI)); diff --git a/executables/lte-ru.c b/executables/lte-ru.c index 0ae8b86216..aadf1ca9b0 100644 --- a/executables/lte-ru.c +++ b/executables/lte-ru.c @@ -1460,7 +1460,7 @@ static void *ru_stats_thread(void *param) { while (!oai_exit) { sleep(1); - if (opp_enabled) { + if (cpu_meas_enabled) { if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx_ru",NULL,NULL); if (ru->feptx_ofdm) print_meas(&ru->ofdm_mod_stats,"feptx_ofdm_ru",NULL,NULL); @@ -2322,7 +2322,7 @@ void init_RU_proc(RU_t *ru) { init_feptx_thread(ru, NULL); } - if (opp_enabled == 1) + if (cpu_meas_enabled) pthread_create(&ru->ru_stats_thread, NULL, ru_stats_thread, (void *)ru); } @@ -2420,7 +2420,7 @@ void kill_RU_proc(RU_t *ru) { } } - if (opp_enabled) { + if (cpu_meas_enabled) { LOG_D(PHY, "Joining ru_stats_thread\n"); pthread_join(ru->ru_stats_thread, NULL); } diff --git a/executables/lte-ue.c b/executables/lte-ue.c index ee51346f46..6b77e75c83 100644 --- a/executables/lte-ue.c +++ b/executables/lte-ue.c @@ -2264,7 +2264,6 @@ static void *timer_thread( void *param ) { //double t_diff; int external_timer = 0; wait_sync("timer_thread"); - opp_enabled = 1; // first check if we are receiving timing indications if(NFAPI_MODE==NFAPI_UE_STUB_OFFNET) { diff --git a/executables/nr-ru.c b/executables/nr-ru.c index aff3b5b8c2..8a29e6ac2f 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1040,7 +1040,7 @@ void *ru_stats_thread(void *param) { while (!oai_exit) { sleep(1); - if (opp_enabled == 1) { + if (cpu_meas_enabled) { if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx (all ports)",NULL,NULL); if (ru->feptx_ofdm) { @@ -1142,8 +1142,7 @@ void *ru_thread( void *param ) { int slot = fp->slots_per_frame-1; int frame = 1023; char threadname[40]; - int initial_wait=0; - int opp_enabled0 = opp_enabled; + int initial_wait = 0; #ifndef OAI_FHI72 bool rx_tti_busy[RU_RX_SLOT_DEPTH] = {false}; @@ -1231,7 +1230,7 @@ void *ru_thread( void *param ) { else LOG_I(PHY,"RU %d rf device ready\n",ru->idx); } else LOG_I(PHY,"RU %d no rf device\n",ru->idx); - LOG_I(PHY,"RU %d RF started opp_enabled %d\n",ru->idx,opp_enabled); + LOG_I(PHY, "RU %d RF started cpu_meas_enabled %d\n", ru->idx, cpu_meas_enabled); // start trx write thread if(usrp_tx_thread == 1) { if (ru->start_write_thread) { @@ -1294,8 +1293,7 @@ void *ru_thread( void *param ) { continue; } if (proc->frame_rx>=300) { - initial_wait=0; - opp_enabled = opp_enabled0; + initial_wait = 0; } if (initial_wait == 0 && ru->rx_fhaul.trials > 1000) { reset_meas(&ru->rx_fhaul); @@ -1460,7 +1458,7 @@ void init_RU_proc(RU_t *ru) { if(emulate_rf) threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT ); - if (opp_enabled == 1) + if (cpu_meas_enabled) threadCreate(&ru->ru_stats_thread, ru_stats_thread, (void *)ru, "ru_stats", -1, OAI_PRIORITY_RT); LOG_I(PHY, "Initialized RU proc %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]); } @@ -1485,7 +1483,7 @@ void kill_NR_RU_proc(int inst) { pthread_mutex_unlock( &proc->mutex_fep[0] ); pthread_join(proc->pthread_FH, NULL); - if (opp_enabled) { + if (cpu_meas_enabled) { LOG_D(PHY, "Joining ru_stats_thread\n"); pthread_join(ru->ru_stats_thread, NULL); } diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index c28b741406..caf21243c2 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -631,7 +631,7 @@ int main( int argc, char **argv ) { set_taus_seed (0); printf("configuring for RAU/RRU\n"); - if (opp_enabled ==1) { + if (cpu_meas_enabled) { reset_opp_meas(); } diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index 141afa1a37..b6bbc11a2e 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -166,7 +166,7 @@ extern int usrp_tx_thread; {"CO" , CONFIG_HLP_ULF, 0, .iptr=&(uplink_frequency_offset[0][0]), .defintval=0, TYPE_INT, 0}, \ {"a" , CONFIG_HLP_CHOFF, 0, .iptr=&CHAIN_OFFSET, .defintval=0, TYPE_INT, 0}, \ {"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, .uptr=&do_forms, .defintval=0, TYPE_UINT, 0}, \ - {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&opp_enabled, .defintval=0, TYPE_INT, 0}, \ + {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&cpu_meas_enabled, .defintval=0, TYPE_INT, 0}, \ {"numerology" , CONFIG_HLP_NUMEROLOGY, 0, .iptr=&NUMEROLOGY, .defintval=1, TYPE_INT, 0}, \ {"band" , CONFIG_HLP_BAND, 0, .iptr=&BAND, .defintval=78, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, .iptr=&EMULATE_RF, .defintval=0, TYPE_INT, 0}, \ diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 8a87682e4a..1d4a31e655 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -118,7 +118,7 @@ one_measurement_t test_ldpc(short max_iterations, double sigma; sigma = 1.0/sqrt(2*SNR); - opp_enabled=1; + cpu_meas_enabled = 1; //short test_input[block_length]; uint8_t *test_input[MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER * NR_MAX_NB_LAYERS]; uint8_t estimated_output[MAX_NUM_DLSCH_SEGMENTS][block_length]; diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index be7987f340..cd280c236e 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) } //Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.) time_stats_t timeEncoder,timeDecoder; - opp_enabled=1; + cpu_meas_enabled = 1; reset_meas(&timeEncoder); reset_meas(&timeDecoder); randominit(0); diff --git a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c index dfc8aadc8e..3759b1eab7 100644 --- a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c +++ b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c @@ -10,7 +10,7 @@ configmodule_interface_t *uniqCfg = NULL; int main(int argc, char *argv[]) { time_stats_t timeEncoder, timeDecoder; - opp_enabled = 1; + cpu_meas_enabled = 1; reset_meas(&timeEncoder); reset_meas(&timeDecoder); randominit(0); diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c index a89588050f..995e3222ec 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c @@ -277,7 +277,6 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, #ifdef DEBUG_DLSCH_DECODING printf("Segmentation: C %d, Cminus %d, Kminus %d, Kplus %d\n",harq_process->C,harq_process->Cminus,harq_process->Kminus,harq_process->Kplus); #endif - opp_enabled=1; set_abort(&harq_process->abort_decode, false); for (r=0; rC; r++) { // Get Turbo interleaver parameters diff --git a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c index 54d9022e87..180ca99918 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c @@ -342,14 +342,7 @@ void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change, int **r NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); int samples_for_frame = 2*frame_parms->samples_per_frame; -#if TEST_SYNCHRO_TIMING_PSS - - opp_enabled = 1; - start_meas(&generic_time[TIME_RATE_CHANGE]); - -#endif - /* build with cic filter does not work properly. Performances are significantly deteriorated */ #ifdef CIC_DECIMATOR @@ -409,14 +402,8 @@ int pss_synchro_nr(const c16_t **rxdata, #endif -#if TEST_SYNCHRO_TIMING_PSS - - opp_enabled = 1; - start_meas(&generic_time[TIME_PSS]); -#endif - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR, VCD_FUNCTION_IN); int synchro_position = diff --git a/openair1/PHY/TOOLS/calibration_test.c b/openair1/PHY/TOOLS/calibration_test.c index 1bb97b5a2f..f3c1e8fef3 100644 --- a/openair1/PHY/TOOLS/calibration_test.c +++ b/openair1/PHY/TOOLS/calibration_test.c @@ -12,7 +12,7 @@ uint32_t timing_advance; int8_t threequarter_fs; uint64_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -int opp_enabled; +int cpu_meas_enabled; THREAD_STRUCT thread_struct; uint32_t target_ul_mcs = 9; uint32_t target_dl_mcs = 9; diff --git a/openair1/PHY/TOOLS/oai_dfts.c b/openair1/PHY/TOOLS/oai_dfts.c index 233590b51f..e97913633f 100644 --- a/openair1/PHY/TOOLS/oai_dfts.c +++ b/openair1/PHY/TOOLS/oai_dfts.c @@ -8118,47 +8118,47 @@ int main(int argc, char**argv) dfts_autoinit(); set_taus_seed(0); - opp_enabled = 1; - /* - ((int16_t *)&tw0)[0] = 32767; - ((int16_t *)&tw0)[1] = 0; - ((int16_t *)&tw0)[2] = 32767; - ((int16_t *)&tw0)[3] = 0; - ((int16_t *)&tw0)[4] = 32767; - ((int16_t *)&tw0)[5] = 0; - ((int16_t *)&tw0)[6] = 32767; - ((int16_t *)&tw0)[7] = 0; + cpu_meas_enabled = 1; + /* + ((int16_t *)&tw0)[0] = 32767; + ((int16_t *)&tw0)[1] = 0; + ((int16_t *)&tw0)[2] = 32767; + ((int16_t *)&tw0)[3] = 0; + ((int16_t *)&tw0)[4] = 32767; + ((int16_t *)&tw0)[5] = 0; + ((int16_t *)&tw0)[6] = 32767; + ((int16_t *)&tw0)[7] = 0; - ((int16_t *)&tw1)[0] = 32767; - ((int16_t *)&tw1)[1] = 0; - ((int16_t *)&tw1)[2] = 32767; - ((int16_t *)&tw1)[3] = 0; - ((int16_t *)&tw1)[4] = 32767; - ((int16_t *)&tw1)[5] = 0; - ((int16_t *)&tw1)[6] = 32767; - ((int16_t *)&tw1)[7] = 0; + ((int16_t *)&tw1)[0] = 32767; + ((int16_t *)&tw1)[1] = 0; + ((int16_t *)&tw1)[2] = 32767; + ((int16_t *)&tw1)[3] = 0; + ((int16_t *)&tw1)[4] = 32767; + ((int16_t *)&tw1)[5] = 0; + ((int16_t *)&tw1)[6] = 32767; + ((int16_t *)&tw1)[7] = 0; - ((int16_t *)&tw2)[0] = 32767; - ((int16_t *)&tw2)[1] = 0; - ((int16_t *)&tw2)[2] = 32767; - ((int16_t *)&tw2)[3] = 0; - ((int16_t *)&tw2)[4] = 32767; - ((int16_t *)&tw2)[5] = 0; - ((int16_t *)&tw2)[6] = 32767; - ((int16_t *)&tw2)[7] = 0; + ((int16_t *)&tw2)[0] = 32767; + ((int16_t *)&tw2)[1] = 0; + ((int16_t *)&tw2)[2] = 32767; + ((int16_t *)&tw2)[3] = 0; + ((int16_t *)&tw2)[4] = 32767; + ((int16_t *)&tw2)[5] = 0; + ((int16_t *)&tw2)[6] = 32767; + ((int16_t *)&tw2)[7] = 0; - ((int16_t *)&tw3)[0] = 32767; - ((int16_t *)&tw3)[1] = 0; - ((int16_t *)&tw3)[2] = 32767; - ((int16_t *)&tw3)[3] = 0; - ((int16_t *)&tw3)[4] = 32767; - ((int16_t *)&tw3)[5] = 0; - ((int16_t *)&tw3)[6] = 32767; - ((int16_t *)&tw3)[7] = 0; - */ - for (i=0;i<300;i++) { - x[i] = simde_mm256_set1_epi32(taus()); - x[i] = simde_mm256_srai_epi16(x[i],4); + ((int16_t *)&tw3)[0] = 32767; + ((int16_t *)&tw3)[1] = 0; + ((int16_t *)&tw3)[2] = 32767; + ((int16_t *)&tw3)[3] = 0; + ((int16_t *)&tw3)[4] = 32767; + ((int16_t *)&tw3)[5] = 0; + ((int16_t *)&tw3)[6] = 32767; + ((int16_t *)&tw3)[7] = 0; + */ + for (i = 0; i < 300; i++) { + x[i] = simde_mm256_set1_epi32(taus()); + x[i] = simde_mm256_srai_epi16(x[i], 4); } /* bfly2_tw1(x,x+1,y,y+1); diff --git a/openair1/PHY/TOOLS/oai_dfts_neon.c b/openair1/PHY/TOOLS/oai_dfts_neon.c index 058d4601b3..5b72359179 100644 --- a/openair1/PHY/TOOLS/oai_dfts_neon.c +++ b/openair1/PHY/TOOLS/oai_dfts_neon.c @@ -7337,47 +7337,47 @@ int main(int argc, char**argv) dfts_autoinit(); set_taus_seed(0); - opp_enabled = 1; - /* - ((int16_t *)&tw0)[0] = 32767; - ((int16_t *)&tw0)[1] = 0; - ((int16_t *)&tw0)[2] = 32767; - ((int16_t *)&tw0)[3] = 0; - ((int16_t *)&tw0)[4] = 32767; - ((int16_t *)&tw0)[5] = 0; - ((int16_t *)&tw0)[6] = 32767; - ((int16_t *)&tw0)[7] = 0; + cpu_meas_enabled = 1; + /* + ((int16_t *)&tw0)[0] = 32767; + ((int16_t *)&tw0)[1] = 0; + ((int16_t *)&tw0)[2] = 32767; + ((int16_t *)&tw0)[3] = 0; + ((int16_t *)&tw0)[4] = 32767; + ((int16_t *)&tw0)[5] = 0; + ((int16_t *)&tw0)[6] = 32767; + ((int16_t *)&tw0)[7] = 0; - ((int16_t *)&tw1)[0] = 32767; - ((int16_t *)&tw1)[1] = 0; - ((int16_t *)&tw1)[2] = 32767; - ((int16_t *)&tw1)[3] = 0; - ((int16_t *)&tw1)[4] = 32767; - ((int16_t *)&tw1)[5] = 0; - ((int16_t *)&tw1)[6] = 32767; - ((int16_t *)&tw1)[7] = 0; + ((int16_t *)&tw1)[0] = 32767; + ((int16_t *)&tw1)[1] = 0; + ((int16_t *)&tw1)[2] = 32767; + ((int16_t *)&tw1)[3] = 0; + ((int16_t *)&tw1)[4] = 32767; + ((int16_t *)&tw1)[5] = 0; + ((int16_t *)&tw1)[6] = 32767; + ((int16_t *)&tw1)[7] = 0; - ((int16_t *)&tw2)[0] = 32767; - ((int16_t *)&tw2)[1] = 0; - ((int16_t *)&tw2)[2] = 32767; - ((int16_t *)&tw2)[3] = 0; - ((int16_t *)&tw2)[4] = 32767; - ((int16_t *)&tw2)[5] = 0; - ((int16_t *)&tw2)[6] = 32767; - ((int16_t *)&tw2)[7] = 0; + ((int16_t *)&tw2)[0] = 32767; + ((int16_t *)&tw2)[1] = 0; + ((int16_t *)&tw2)[2] = 32767; + ((int16_t *)&tw2)[3] = 0; + ((int16_t *)&tw2)[4] = 32767; + ((int16_t *)&tw2)[5] = 0; + ((int16_t *)&tw2)[6] = 32767; + ((int16_t *)&tw2)[7] = 0; - ((int16_t *)&tw3)[0] = 32767; - ((int16_t *)&tw3)[1] = 0; - ((int16_t *)&tw3)[2] = 32767; - ((int16_t *)&tw3)[3] = 0; - ((int16_t *)&tw3)[4] = 32767; - ((int16_t *)&tw3)[5] = 0; - ((int16_t *)&tw3)[6] = 32767; - ((int16_t *)&tw3)[7] = 0; - */ - for (i=0;i<300;i++) { - x[i] = (int16x8_t)vdupq_n_s32(taus()); - x[i] = vshrq_n_s16(x[i],4); + ((int16_t *)&tw3)[0] = 32767; + ((int16_t *)&tw3)[1] = 0; + ((int16_t *)&tw3)[2] = 32767; + ((int16_t *)&tw3)[3] = 0; + ((int16_t *)&tw3)[4] = 32767; + ((int16_t *)&tw3)[5] = 0; + ((int16_t *)&tw3)[6] = 32767; + ((int16_t *)&tw3)[7] = 0; + */ + for (i = 0; i < 300; i++) { + x[i] = (int16x8_t)vdupq_n_s32(taus()); + x[i] = vshrq_n_s16(x[i], 4); } /* bfly2_tw1(x,x+1,y,y+1); diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index e109ae8146..0e9d72d99d 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -374,7 +374,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB, dlsch_encoding(eNB, proc, dlsch_harq->pdu, dlsch_harq->pdsch_start, dlsch, frame, subframe, &eNB->dlsch_rate_matching_stats, &eNB->dlsch_turbo_encoding_stats, &eNB->dlsch_interleaving_stats); stop_meas(&eNB->dlsch_encoding_stats); - if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) { + if (eNB->dlsch_encoding_stats.p_time > 500 * 3000 && cpu_meas_enabled) { print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr); } diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c index 96e32c6444..ecc7ba3149 100644 --- a/openair1/SCHED/ru_procedures.c +++ b/openair1/SCHED/ru_procedures.c @@ -229,10 +229,6 @@ static void *feptx_thread(void *param) exit_fun( "ERROR pthread_cond_signal" ); return NULL; } - /*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.p_time>30*3000){ - print_meas_now(&ru->ofdm_mod_wakeup_stats,"fep wakeup",stderr); - printf("delay in fep wakeup in frame_tx: %d subframe_rx: %d \n",proc->frame_tx,proc->tti_tx); - }*/ } return(NULL); } @@ -288,7 +284,7 @@ void feptx_ofdm_2thread(RU_t *ru, start_meas(&ru->ofdm_mod_wait_stats); wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread"); stop_meas(&ru->ofdm_mod_wait_stats); - /*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.p_time>30*3000){ + /*if(cpu_meas_enabled == 1 && ru->ofdm_mod_wait_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr); printf("delay in feptx wait on condition in frame_rx: %d subframe_rx: %d \n", proc->frame_tx, proc->tti_tx); }*/ @@ -578,7 +574,7 @@ static void *fep_thread(void *param) exit_fun( "ERROR pthread_cond_signal" ); return NULL; } - /*if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){ + /*if(cpu_meas_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){ print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr); printf("delay in fep wakeup in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx); }*/ @@ -699,7 +695,7 @@ void ru_fep_full_2thread(RU_t *ru, start_meas(&ru->ofdm_demod_wait_stats); wait_on_busy_condition(&proc->mutex_fep[0],&proc->cond_fep[0],&proc->instance_cnt_fep[0],"fep thread"); stop_meas(&ru->ofdm_demod_wait_stats); - if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){ + if (cpu_meas_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time > 30 * 3000) { print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr); printf("delay in fep wait on condition in frame_rx: %d subframe_rx: %d \n", proc->frame_rx, proc->tti_rx); } diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 1d012dc352..75a8028df7 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -573,7 +573,7 @@ int main(int argc, char **argv) { uint32_t Nsoft; int sf; int CCE_table[800]; - opp_enabled=1; // to enable the time meas + cpu_meas_enabled = 1; // to enable the time meas FILE *csv_fd=NULL; char csv_fname[FILENAME_MAX]; int DLSCH_RB_ALLOC = 0; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index 2f26be3d84..f32a4d4485 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -307,7 +307,7 @@ int main(int argc, char **argv) int threequarter_fs=0; - opp_enabled=1; // to enable the time meas + cpu_meas_enabled = 1; // to enable the time meas #if defined(__arm__) || defined(__aarch64__) FILE *proc_fd = NULL; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c index 84480dfdde..43c3c653cd 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c @@ -189,7 +189,7 @@ int main(int argc, char **argv) { uint32_t Nsoft; int CCE_table[800]; int threequarter_fs=0; - opp_enabled=1; // to enable the time meas + cpu_meas_enabled = 1; // to enable the time meas #if defined(__arm__) || defined(__aarch64__) FILE *proc_fd = NULL; char buf[64]; diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index ba21bf8ec1..f10c287a1a 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -661,7 +661,7 @@ int main(int argc, char **argv) { uint32_t Nsoft; int sf; int CCE_table[800]; - opp_enabled=1; // to enable the time meas + cpu_meas_enabled = 1; // to enable the time meas FILE *csv_fd=NULL; char csv_fname[FILENAME_MAX]; int DLSCH_RB_ALLOC = 0; diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 60d3514253..e9b7d99e5c 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -380,7 +380,6 @@ int main(int argc, char **argv) { int sf; static int threequarter_fs=0; int ndi; - opp_enabled=1; // to enable the time meas sched_resp.DL_req = &DL_req; sched_resp.UL_req = &UL_req; sched_resp.HI_DCI0_req = &HI_DCI0_req; @@ -568,7 +567,7 @@ int main(int argc, char **argv) { case 'P': dump_perf=1; - opp_enabled=1; + cpu_meas_enabled = 1; break; case 'L': diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 0a4dc1b44b..cf11638ea2 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -460,7 +460,7 @@ int main(int argc, char **argv) case 'P': print_perf=1; - opp_enabled=1; + cpu_meas_enabled = 1; break; case 'I': diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 5403bedbf7..702e50927c 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -432,7 +432,7 @@ int main(int argc, char *argv[]) case 'P': print_perf=1; - opp_enabled=1; + cpu_meas_enabled = 1; break; case 'L':