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