Commit 874cefb9 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Fixed build errors

Also added warning messages for gNB number of threads required
parent a702fd55
...@@ -346,7 +346,9 @@ void init_gNB_Tpool(int inst) { ...@@ -346,7 +346,9 @@ void init_gNB_Tpool(int inst) {
// ULSCH decoding threadpool // ULSCH decoding threadpool
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t)); gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
int numCPU = sysconf(_SC_NPROCESSORS_ONLN); int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->pusch_proc_threads,numCPU);
int threadCnt = min(numCPU, gNB->pusch_proc_threads); int threadCnt = min(numCPU, gNB->pusch_proc_threads);
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
char ul_pool[80]; char ul_pool[80];
sprintf(ul_pool,"-1"); sprintf(ul_pool,"-1");
int s_offset = 0; int s_offset = 0;
......
...@@ -252,6 +252,17 @@ void nr_dlsim_preprocessor(module_id_t module_id, ...@@ -252,6 +252,17 @@ void nr_dlsim_preprocessor(module_id_t module_id,
sched_ctrl->numDmrsCdmGrpsNoData = 1; sched_ctrl->numDmrsCdmGrpsNoData = 1;
} }
typedef struct {
uint64_t optmask; //mask to store boolean config options
uint8_t nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
tpool_t Tpool; // thread pool
} nrUE_params_t;
nrUE_params_t nrUE_params;
nrUE_params_t *get_nrUE_params(void) {
return &nrUE_params;
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
...@@ -841,6 +852,11 @@ int main(int argc, char **argv) ...@@ -841,6 +852,11 @@ int main(int argc, char **argv)
unsigned int errors_bit = 0; unsigned int errors_bit = 0;
uint32_t errors_scrambling = 0; uint32_t errors_scrambling = 0;
initTpool("N", &(nrUE_params.Tpool), false);
notifiedFIFO_t txFifo;
UE->txFifo = &txFifo;
initNotifiedFIFO(&txFifo);
pushNotifiedFIFO(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&txFifo,NULL));
test_input_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384); test_input_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384);
estimated_output_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384); estimated_output_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384);
......
...@@ -159,6 +159,18 @@ int nr_derive_key(int alg_type, uint8_t alg_id, ...@@ -159,6 +159,18 @@ int nr_derive_key(int alg_type, uint8_t alg_id,
return 0; return 0;
} }
typedef struct {
uint64_t optmask; //mask to store boolean config options
uint8_t nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
tpool_t Tpool; // thread pool
} nrUE_params_t;
nrUE_params_t nrUE_params;
nrUE_params_t *get_nrUE_params(void) {
return &nrUE_params;
}
int main(int argc, char **argv){ int main(int argc, char **argv){
char c; char c;
......
...@@ -183,6 +183,17 @@ int nr_derive_key(int alg_type, uint8_t alg_id, ...@@ -183,6 +183,17 @@ int nr_derive_key(int alg_type, uint8_t alg_id,
return 0; return 0;
} }
typedef struct {
uint64_t optmask; //mask to store boolean config options
uint8_t nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
tpool_t Tpool; // thread pool
} nrUE_params_t;
nrUE_params_t nrUE_params;
nrUE_params_t *get_nrUE_params(void) {
return &nrUE_params;
}
// needed for some functions // needed for some functions
uint16_t n_rnti = 0x1234; uint16_t n_rnti = 0x1234;
openair0_config_t openair0_cfg[MAX_CARDS]; openair0_config_t openair0_cfg[MAX_CARDS];
......
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