fixes running FR2 test with sanitize

This commit is contained in:
francescomani
2023-07-13 16:27:34 +02:00
committed by Laurent THOMAS
parent cf387a48ec
commit e198b74155
8 changed files with 37 additions and 28 deletions
+7 -4
View File
@@ -1015,10 +1015,13 @@ void ru_tx_func(void *param) {
int print_frame = 8;
char filename[40];
// note that this will break for 60/120 kHz, to be handled
int absslot_tx = info->timestamp_tx/fp->get_samples_per_slot(slot_tx,fp);
int absslot_rx = absslot_tx-ru->sl_ahead;
int cumul_samples = fp->get_samples_per_slot(0, fp);
int i = 0;
for (i = 1; i < fp->slots_per_subframe / 2; i++)
cumul_samples += fp->get_samples_per_slot(i, fp);
int samples = cumul_samples / (i + 1);
int absslot_tx = info->timestamp_tx / samples;
int absslot_rx = absslot_tx - ru->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.start_RU_TX[rt_prof_idx]);
// do TX front-end processing if needed (precoding and/or IDFTs)