fix computation of absolute slot

This commit is contained in:
francescomani
2023-07-20 14:52:31 +02:00
parent 02e1b64379
commit c56b4bf515
2 changed files with 9 additions and 10 deletions
+6 -7
View File
@@ -117,10 +117,10 @@ void tx_func(void *param)
int frame_tx = info->frame;
int slot_tx = info->slot;
int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms);
int i = 0;
for (i = 1; i < gNB->frame_parms.slots_per_subframe / 2; i++)
int i = 1;
for (; i < gNB->frame_parms.slots_per_subframe / 2; i++)
cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms);
int samples = cumul_samples / (i + 1);
int samples = cumul_samples / i;
int absslot_tx = info->timestamp_tx / samples;
int absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
@@ -182,12 +182,11 @@ void rx_func(void *param)
int frame_tx = info->frame_tx;
int slot_tx = info->slot_tx;
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms);
int i = 0;
for (i = 1; i < gNB->frame_parms.slots_per_subframe / 2; i++)
int i = 1;
for (; i < gNB->frame_parms.slots_per_subframe / 2; i++)
cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms);
int samples = cumul_samples / (i + 1);
int samples = cumul_samples / i;
int absslot_tx = info->timestamp_tx / samples;
int absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
+3 -3
View File
@@ -1016,10 +1016,10 @@ void ru_tx_func(void *param) {
char filename[40];
int cumul_samples = fp->get_samples_per_slot(0, fp);
int i = 0;
for (i = 1; i < fp->slots_per_subframe / 2; i++)
int i = 1;
for (; i < fp->slots_per_subframe / 2; i++)
cumul_samples += fp->get_samples_per_slot(i, fp);
int samples = cumul_samples / (i + 1);
int samples = cumul_samples / i;
int absslot_tx = info->timestamp_tx / samples;
int absslot_rx = absslot_tx - ru->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;