option q is to set cpu measurements but it is hardcoded in some places

This commit is contained in:
Laurent THOMAS
2024-09-18 16:02:14 +02:00
parent ba2d7aad18
commit 31f770978c
25 changed files with 114 additions and 140 deletions
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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);
@@ -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);
@@ -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; r<harq_process->C; r++) {
// Get Turbo interleaver parameters
-13
View File
@@ -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 =
+1 -1
View File
@@ -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;
+38 -38
View File
@@ -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);
+38 -38
View File
@@ -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);
+1 -1
View File
@@ -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);
}
+3 -7
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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;
+1 -2
View File
@@ -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':
+1 -1
View File
@@ -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':
+1 -1
View File
@@ -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':