Commit 030a3452 authored by Cedric Roux's avatar Cedric Roux

bugfix: fix sync for oaisim

With the current implementation of oaisim
(rxdata and channel simulation), we cannot
call trx_read_func on a dummy buffer. The
code will actually modify the rxdata buffers
of the UE.

This is has to be rewritten properly. In the
meantime, let's introduce a simple hack. The
idea of the read at this point is to wait for
the synch to finish and not lose samples from
the hardware in the real UE. In the simulator,
as it is today, we can simply sleep until the
synch code has finished its work.
parent 3ed32a77
...@@ -698,6 +698,9 @@ void *UE_thread(void *arg) { ...@@ -698,6 +698,9 @@ void *UE_thread(void *arg) {
} }
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), "");
} else { } else {
#if OAISIM
usleep(500);
#else
// grab 10 ms of signal into dummy buffer // grab 10 ms of signal into dummy buffer
if (UE->mode != loop_through_memory) { if (UE->mode != loop_through_memory) {
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++) for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
...@@ -710,6 +713,7 @@ void *UE_thread(void *arg) { ...@@ -710,6 +713,7 @@ void *UE_thread(void *arg) {
UE->frame_parms.samples_per_tti, UE->frame_parms.samples_per_tti,
UE->frame_parms.nb_antennas_rx); UE->frame_parms.nb_antennas_rx);
} }
#endif
} }
} // UE->is_synchronized==0 } // UE->is_synchronized==0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment