Commit 42e08ff4 authored by mir's avatar mir

BugFix for nr_dlsim test

parent 5a06ace1
...@@ -423,10 +423,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -423,10 +423,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
set_abort(&harq_process->abort_decode, false); set_abort(&harq_process->abort_decode, false);
#ifdef TASK_MANAGER_UE_DECODING #ifdef TASK_MANAGER_UE_DECODING
assert(harq_process->C < 64 && "Increase values of the arrays that follow"); ldpcDecode_ue_t arr[harq_process->C];
ldpcDecode_ue_t arr[64] = {0}; task_ans_t ans[harq_process->C];
task_ans_t ans[64] = {0}; memset(ans, 0, harq_process->C*sizeof(task_ans_t));
//memset(ans, 0, harq_process->C*sizeof(task_ans_t));
#endif #endif
for (r=0; r<harq_process->C; r++) { for (r=0; r<harq_process->C; r++) {
...@@ -479,8 +478,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -479,8 +478,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
#ifdef TASK_MANAGER_UE_DECODING #ifdef TASK_MANAGER_UE_DECODING
if(nbDecode > 0){ if(nbDecode > 0){
join_task_ans(ans, nbDecode); join_task_ans(ans, nbDecode);
for(size_t i = 0; i < nbDecode; ++i){ for(size_t i = 0; i < nbDecode ; ++i){
nr_ue_postDecode(phy_vars_ue, &arr[i], nbDecode == 1, b_size, b, &num_seg_ok, proc); nr_ue_postDecode(phy_vars_ue, &arr[i], i == nbDecode - 1, b_size, b, &num_seg_ok, proc);
} }
} }
#else #else
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
#include <executables/softmodem-common.h> #include <executables/softmodem-common.h>
#include <openair3/ocp-gtpu/gtp_itf.h> #include <openair3/ocp-gtpu/gtp_itf.h>
#include <executables/nr-uesoftmodem.h> #include <executables/nr-uesoftmodem.h>
#include "common/utils/thread_pool/task_manager.h"
const char *__asan_default_options() const char *__asan_default_options()
{ {
...@@ -857,8 +858,8 @@ int main(int argc, char **argv) ...@@ -857,8 +858,8 @@ int main(int argc, char **argv)
unsigned char *test_input_bit; unsigned char *test_input_bit;
unsigned int errors_bit = 0; unsigned int errors_bit = 0;
#ifdef TASK_MANAGER_SIM #ifdef TASK_MANAGER_UE_DECODING
init_task_manager(&nrUE_params.man, max(dlsch_threads, 1)); init_task_manager(&nrUE_params.man, max(1, dlsch_threads));
#else #else
initFloatingCoresTpool(dlsch_threads, &nrUE_params.Tpool, false, "UE-tpool"); initFloatingCoresTpool(dlsch_threads, &nrUE_params.Tpool, false, "UE-tpool");
#endif #endif
...@@ -889,13 +890,12 @@ int main(int argc, char **argv) ...@@ -889,13 +890,12 @@ int main(int argc, char **argv)
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels; //NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
int n_errs = 0; int n_errs = 0;
#ifdef TASK_MANAGER_SIM #ifdef TASK_MANAGER_UE_DECODING
int const num_threads = parse_num_threads(gNBthreads); int const num_threads = parse_num_threads(gNBthreads);
init_task_manager(&gNB->man, num_threads); init_task_manager(&gNB->man, num_threads);
#else #else
initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool"); initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool");
#endif #endif
initNotifiedFIFO(&gNB->L1_tx_free); initNotifiedFIFO(&gNB->L1_tx_free);
initNotifiedFIFO(&gNB->L1_tx_filled); initNotifiedFIFO(&gNB->L1_tx_filled);
initNotifiedFIFO(&gNB->L1_tx_out); initNotifiedFIFO(&gNB->L1_tx_out);
......
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