From 9e4f700aae08b7a1e1d73cd509443803c37f5d48 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Thu, 3 Aug 2017 10:27:06 +0200 Subject: [PATCH] bugfix for phy simulators (not sure if enough) With the new threading architecture of the UE dlsim (and others) does not work properly anymore. When looking at the scope, you see a difference in PDSCH LLR display. The end is always 0 where in the current develop branch (tag 2017.w25) it's not. This commit attempts to fix it. We still don't have the same behavior as in 2017.w25. I disabled channel simulation (so that UE RX = eNB TX) and I have one error where in 2017.w25 I have zero. For example, here comes the output of a run of "./dlsim": **********************SNR = 0.000000 dB (tx_lev 51.000000)************************** Errors (1(0)/1000 0/1 0/0 0/0), Pe = (1.000000e-03,0.000000e+00,-nan,-nan), dci_errors 0/1001, Pe = 0.000000e+00 => effective rate 99.900100, normalized delay 0.001472 (1.001000) And in 2017.w25 we have (with the same hack to disable channel simulation): **********************SNR = 0.000000 dB (tx_lev 51.000000)************************** Errors (0(0)/1000 0/0 0/0 0/0), Pe = (0.000000e+00,-nan,-nan,-nan), dci_errors 0/1000, Pe = 0.000000e+00 => effective rate 100.000000, normalized delay 0.001471 (1.000000) There may be a problem somewhere. Or there was one before and we should have had one error and the new UE architecture fixed things and now it's as it has to be. Hard to say at this point... When looking at the scope we quickly see some zeros for the PDSCH LLR, at the begining this time, not at the end. This is just when the GUI appears and then all is fine, so this seems to be for the first frame only. In 2017.w25 this does not happen. --- openair1/PHY/INIT/lte_param_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openair1/PHY/INIT/lte_param_init.c b/openair1/PHY/INIT/lte_param_init.c index f3833b7709..dbc8718dfa 100644 --- a/openair1/PHY/INIT/lte_param_init.c +++ b/openair1/PHY/INIT/lte_param_init.c @@ -129,6 +129,9 @@ void lte_param_init(unsigned char N_tx_port_eNB, UE->perfect_ce = perfect_ce; + /* the UE code is multi-thread "aware", we need to setup this array */ + for (i = 0; i < 10; i++) UE->current_thread_id[i] = i % 2; + printf("Done lte_param_init\n"); -- GitLab