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
653f32d3
Commit
653f32d3
authored
Dec 22, 2023
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RAN-PhySim tests
parent
1b8c81a3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
8 deletions
+29
-8
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+19
-2
common/utils/thread_pool/task_manager.c
common/utils/thread_pool/task_manager.c
+1
-1
executables/lte-softmodem.c
executables/lte-softmodem.c
+1
-1
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+2
-0
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+2
-2
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+3
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-1
No files found.
common/utils/nr/nr_common.h
View file @
653f32d3
...
...
@@ -137,9 +137,26 @@ void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
#define cmax(a,b) ((a>b) ? (a) : (b))
// How many cmin/cmax, min/max are defined in OAI? Clean in separate MR
#ifndef cmax
#define cmax(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
#endif
#define cmax3(a,b,c) ((cmax(a,b)>c) ? (cmax(a,b)) : (c))
#define cmin(a,b) ((a<b) ? (a) : (b))
#ifndef cmin
#define cmin(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; })
#endif
#ifdef __cplusplus
#ifdef min
...
...
common/utils/thread_pool/task_manager.c
View file @
653f32d3
...
...
@@ -498,7 +498,7 @@ void init_task_manager(task_manager_t* man, uint32_t num_threads)
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
);
int
rc
=
pthread_create
(
&
man
->
t_arr
[
i
],
&
attr
,
worker_thread
,
args
);
assert
(
rc
==
0
);
assert
(
rc
==
0
&&
"Error creating a thread"
);
}
man
->
index
=
0
;
...
...
executables/lte-softmodem.c
View file @
653f32d3
...
...
@@ -578,7 +578,7 @@ int main ( int argc, char **argv )
}
#ifdef TASK_MANAGER_LTE
assert
(
strlen
(
get_softmodem_params
()
->
threadPoolConfig
)
>
0
);
int
n_threads
=
num_threads
(
get_softmodem_params
()
->
threadPoolConfig
);
int
const
n_threads
=
max
(
num_threads
(
get_softmodem_params
()
->
threadPoolConfig
),
1
);
task_manager_t
man
=
{
0
};
init_task_manager
(
&
man
,
n_threads
);
#endif
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
653f32d3
...
...
@@ -790,6 +790,8 @@ int main(int argc, char **argv) {
#ifdef TASK_MANAGER_LTE
int
const
n_threads
=
1
;
proc_rxtx
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
assert
(
proc_rxtx
->
man
!=
NULL
&&
"Memory exhausted"
);
init_task_manager
(
proc_rxtx
->
man
,
n_threads
);
#else
proc_rxtx
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
653f32d3
...
...
@@ -405,9 +405,9 @@ int main(int argc, char **argv)
RC
.
gNB
[
0
]
=
calloc
(
1
,
sizeof
(
PHY_VARS_gNB
));
gNB
=
RC
.
gNB
[
0
];
#ifdef TASK_MANAGER_SIM
int
const
n_threads
=
num_threads
(
gNBthreads
);
int
const
n_threads
=
max
(
num_threads
(
gNBthreads
),
1
);
init_task_manager
(
&
gNB
->
man
,
n_threads
);
init_task_manager
(
&
nrUE_params
.
man
,
dlsch_threads
);
init_task_manager
(
&
nrUE_params
.
man
,
max
(
dlsch_threads
,
1
)
);
#else
initNamedTpool
(
gNBthreads
,
&
gNB
->
threadPool
,
true
,
"gNB-tpool"
);
initFloatingCoresTpool
(
dlsch_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
653f32d3
...
...
@@ -903,6 +903,8 @@ int main(int argc, char **argv)
unsigned
int
errors_bit
=
0
;
#ifdef TASK_MANAGER_SIM
if
(
dlsch_threads
==
0
)
dlsch_threads
=
1
;
init_task_manager
(
&
nrUE_params
.
man
,
dlsch_threads
);
#else
initFloatingCoresTpool
(
dlsch_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
...
...
@@ -945,7 +947,7 @@ int main(int argc, char **argv)
int
n_errs
=
0
;
#ifdef TASK_MANAGER_SIM
int
const
n_threads
=
num_threads
(
gNBthreads
);
int
const
n_threads
=
max
(
num_threads
(
gNBthreads
),
1
);
init_task_manager
(
&
gNB
->
man
,
n_threads
);
#else
initNamedTpool
(
gNBthreads
,
&
gNB
->
threadPool
,
true
,
"gNB-tpool"
);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
653f32d3
...
...
@@ -555,7 +555,7 @@ int main(int argc, char *argv[])
gNB
->
num_pusch_symbols_per_thread
=
1
;
#ifdef TASK_MANAGER
init_task_manager
(
&
gNB
->
man
,
threadCnt
);
init_task_manager
(
&
gNB
->
man
,
max
(
threadCnt
,
1
)
);
#else
initFloatingCoresTpool
(
threadCnt
,
&
gNB
->
threadPool
,
false
,
"gNB-tpool"
);
#endif
...
...
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