Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
97c55d14
Commit
97c55d14
authored
Jan 12, 2024
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TASK_MANAGER_UE_SIM NOT tested. Compiles
parent
d8eed492
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
12 deletions
+43
-12
common/utils/thread_pool/task_manager.c
common/utils/thread_pool/task_manager.c
+6
-3
common/utils/thread_pool/task_manager.h
common/utils/thread_pool/task_manager.h
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-3
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+16
-3
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+19
-2
No files found.
common/utils/thread_pool/task_manager.c
View file @
97c55d14
...
...
@@ -500,7 +500,6 @@ void init_task_manager(task_manager_t* man, size_t num_threads)
pthread_attr_t
attr
=
{
0
};
/*
int
ret
=
pthread_attr_init
(
&
attr
);
assert
(
ret
==
0
);
ret
=
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
);
...
...
@@ -510,10 +509,14 @@ void init_task_manager(task_manager_t* man, size_t num_threads)
struct
sched_param
sparam
=
{
0
};
sparam
.
sched_priority
=
94
;
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
);
*/
int
rc
=
pthread_create
(
&
man
->
t_arr
[
i
],
&
attr
,
worker_thread
,
args
);
assert
(
rc
==
0
&&
"Error creating a thread"
);
if
(
rc
!=
0
){
printf
(
"[MIR]: %s
\n
"
,
strerror
(
rc
));
printf
(
"[MIR]: Could not create the pthread with attributtes, trying without attributes
\n
"
);
rc
=
pthread_create
(
&
man
->
t_arr
[
i
],
NULL
,
worker_thread
,
args
);
assert
(
rc
==
0
&&
"Error creating a thread"
);
}
}
man
->
index
=
0
;
...
...
common/utils/thread_pool/task_manager.h
View file @
97c55d14
...
...
@@ -9,7 +9,7 @@
//#define TASK_MANAGER_UE
#define TASK_MANAGER_UE_DECODING
//
#define TASK_MANAGER_SIM
#define TASK_MANAGER_SIM
//#define TASK_MANAGER_LTE
#include "task.h"
...
...
openair1/PHY/defs_gNB.h
View file @
97c55d14
...
...
@@ -729,9 +729,7 @@ typedef struct PHY_VARS_gNB_s {
void
*
scopeData
;
/// structure for analyzing high-level RT measurements
rt_L1_profiling_t
rt_L1_profiling
;
#if defined(TASK_MANAGER_DECODING) && defined(TASK_MANAGER_CODING) && defined(TASK_MANAGER_DEMODULATION) && defined(TASK_MANAGER_RU) && defined(TASK_MANAGER_SIM)
task_manager_t
man
;
#elif !defined(TASK_MANAGER_DECODING) || !defined(TASK_MANAGER_CODING) || !defined(TASK_MANAGER_DEMODULATION) || !defined(TASK_MANAGER_RU) || !defined(TASK_MANAGER_SIM)
#if defined(TASK_MANAGER_DECODING) || defined(TASK_MANAGER_CODING) || defined(TASK_MANAGER_DEMODULATION) || defined(TASK_MANAGER_RU) || !defined(TASK_MANAGER_SIM)
task_manager_t
man
;
tpool_t
threadPool
;
#else
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
97c55d14
...
...
@@ -50,6 +50,8 @@
#include "executables/nr-uesoftmodem.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/thread_pool/task_manager.h"
//#define DEBUG_NR_DLSCHSIM
THREAD_STRUCT
thread_struct
;
...
...
@@ -372,9 +374,14 @@ int main(int argc, char **argv)
RC
.
gNB
=
(
PHY_VARS_gNB
**
)
malloc
(
sizeof
(
PHY_VARS_gNB
*
));
RC
.
gNB
[
0
]
=
calloc
(
1
,
sizeof
(
PHY_VARS_gNB
));
gNB
=
RC
.
gNB
[
0
];
initNamedTpool
(
gNBthreads
,
&
gNB
->
threadPool
,
true
,
"gNB-tpool"
);
initFloatingCoresTpool
(
dlsch_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
//gNB_config = &gNB->gNB_config;
#ifdef TASK_MANAGER_SIM
int
const
num_threads
=
parse_num_threads
(
gNBthreads
);
init_task_manager
(
&
gNB
->
man
,
num_threads
);
init_task_manager
(
&
nrUE_params
.
man
,
max
(
dlsch_threads
,
1
));
#endif
initNamedTpool
(
gNBthreads
,
&
gNB
->
threadPool
,
true
,
"gNB-tpool"
);
initFloatingCoresTpool
(
dlsch_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
//gNB_config = &gNB->gNB_config;
frame_parms
=
&
gNB
->
frame_parms
;
//to be initialized I suppose (maybe not necessary for PBCH)
frame_parms
->
nb_antennas_tx
=
n_tx
;
frame_parms
->
nb_antennas_rx
=
n_rx
;
...
...
@@ -644,6 +651,12 @@ int main(int argc, char **argv)
free
(
gNB
->
gNB_config
.
tdd_table
.
max_tdd_periodicity_list
[
i
].
max_num_of_symbol_per_slot_list
);
free
(
gNB
->
gNB_config
.
tdd_table
.
max_tdd_periodicity_list
);
#ifdef TASK_MANAGER_SIM
void
(
*
clean
)(
task_t
*
)
=
NULL
;
free_task_manager
(
&
gNB
->
man
,
clean
);
free_task_manager
(
&
nrUE_params
.
man
,
clean
);
#endif
phy_free_nr_gNB
(
gNB
);
free
(
RC
.
gNB
[
0
]);
free
(
RC
.
gNB
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
97c55d14
...
...
@@ -30,6 +30,8 @@
#include "common/utils/nr/nr_common.h"
#include "common/utils/var_array.h"
#include "common/utils/LOG/log.h"
#include "common/utils/thread_pool/task_manager.h"
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "LAYER2/NR_MAC_UE/mac_defs.h"
#include "LAYER2/NR_MAC_UE/mac_extern.h"
...
...
@@ -855,9 +857,12 @@ 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
));
#else
initFloatingCoresTpool
(
dlsch_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
test_input_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
#endif
test_input_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
estimated_output_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
// generate signal
...
...
@@ -884,7 +889,13 @@ int main(int argc, char **argv)
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
int
n_errs
=
0
;
#ifdef TASK_MANAGER_SIM
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
);
...
...
@@ -1290,6 +1301,12 @@ int main(int argc, char **argv)
free
(
r_im
[
i
]);
}
#ifdef TASK_MANAGER_SIM
void
(
*
clean
)(
task_t
*
)
=
NULL
;
free_task_manager
(
&
nrUE_params
.
man
,
clean
);
free_task_manager
(
&
gNB
->
man
,
clean
);
#endif
free
(
s_re
);
free
(
s_im
);
free
(
r_re
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment