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
Michael Black
OpenXG-RAN
Commits
356da54c
Commit
356da54c
authored
Jun 06, 2023
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE softmodem working
parent
97dc9997
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
5 deletions
+31
-5
common/utils/thread_pool/task_manager.c
common/utils/thread_pool/task_manager.c
+5
-1
common/utils/thread_pool/task_manager.h
common/utils/thread_pool/task_manager.h
+1
-1
executables/nr-gnb.c
executables/nr-gnb.c
+13
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+5
-3
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+2
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+5
-0
No files found.
common/utils/thread_pool/task_manager.c
View file @
356da54c
...
...
@@ -12,6 +12,7 @@
#include <string.h>
#include <poll.h>
#include <sys/types.h>
#include <sys/sysinfo.h>
#include <fcntl.h>
...
...
@@ -413,7 +414,10 @@ void* worker_thread(void* arg)
task_thread_args_t
*
args
=
(
task_thread_args_t
*
)
arg
;
int
const
idx
=
args
->
idx
;
pin_thread_to_core
(
idx
+
4
);
int
const
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
// Assuming: 2 x Physical cores = Logical cores
pin_thread_to_core
(
idx
+
log_cores
/
2
);
task_manager_t
*
man
=
args
->
man
;
...
...
common/utils/thread_pool/task_manager.h
View file @
356da54c
...
...
@@ -2,7 +2,7 @@
#define TASK_MANAGER_WORKING_STEALING_H
// Comment for deactivating ws tpool
//
#define TASK_MANAGER
#define TASK_MANAGER
#include "task.h"
...
...
executables/nr-gnb.c
View file @
356da54c
...
...
@@ -52,6 +52,11 @@
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h"
#include "common/utils/thread_pool/task_manager.h"
#include <stdlib.h>
#include <stdio.h>
#include <sys/sysinfo.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
...
...
@@ -88,6 +93,7 @@
#include <openair1/PHY/NR_TRANSPORT/nr_dlsch.h>
#include <PHY/NR_ESTIMATION/nr_ul_estimation.h>
//#define USRP_DEBUG 1
// Fix per CC openair rf/if device update
// extern openair0_device openair0;
...
...
@@ -466,6 +472,13 @@ void init_gNB_Tpool(int inst) {
gNB
=
RC
.
gNB
[
inst
];
gNB_L1_proc_t
*
proc
=
&
gNB
->
proc
;
#ifdef TASK_MANAGER
int
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
// Assuming: 2 x Physical cores = Logical cores
init_task_manager
(
&
gNB
->
man
,
log_cores
/
2
);
#endif
// ULSCH decoding threadpool
initTpool
(
get_softmodem_params
()
->
threadPoolConfig
,
&
gNB
->
threadPool
,
cpumeas
(
CPUMEAS_GETSTATE
));
// ULSCH decoder result FIFO
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
356da54c
...
...
@@ -297,7 +297,7 @@ void nr_processULSegment(void *arg)
}
#ifdef TASK_MANAGER
if
(
phy_vars_gNB
->
ldpc_offload_flag
)
if
(
phy_vars_gNB
->
ldpc_offload_flag
==
0
)
nr_postDecode
(
rdata
->
gNB
,
rdata
);
#endif
...
...
@@ -331,7 +331,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
int
Kr
;
int
Kr_bytes
;
#ifndef TASK_MANAGER
phy_vars_gNB
->
nbDecode
=
0
;
#endif
harq_process
->
processedSegments
=
0
;
// ------------------------------------------------------------------
...
...
@@ -645,9 +647,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
async_task_manager
(
&
phy_vars_gNB
->
man
,
t
);
#else
pushTpool
(
&
phy_vars_gNB
->
threadPool
,
req
);
#endif
phy_vars_gNB
->
nbDecode
++
;
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
phy_vars_gNB
->
nbDecode
);
#endif
r_offset
+=
E
;
offset
+=
(
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
//////////////////////////////////////////////////////////////////////////////////////////
...
...
openair1/PHY/defs_gNB.h
View file @
356da54c
...
...
@@ -777,7 +777,9 @@ typedef struct PHY_VARS_gNB_s {
pthread_t
L1_tx_thread
;
int
L1_tx_thread_core
;
struct
processingData_L1tx
*
msgDataTx
;
#ifndef TASK_MANAGER
int
nbDecode
;
#endif
void
*
scopeData
;
/// structure for analyzing high-level RT measurements
rt_L1_profiling_t
rt_L1_profiling
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
356da54c
...
...
@@ -251,8 +251,11 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req)
ulsch_harq
->
processedSegments
++
;
LOG_D
(
PHY
,
"processing result of segment: %d, processed %d/%d
\n
"
,
rdata
->
segment_r
,
ulsch_harq
->
processedSegments
,
rdata
->
nbSegments
);
#ifndef TASK_MANAGER
gNB
->
nbDecode
--
;
LOG_D
(
PHY
,
"remain to decoded in subframe: %d
\n
"
,
gNB
->
nbDecode
);
#endif
if
(
decodeSuccess
)
{
memcpy
(
ulsch_harq
->
b
+
rdata
->
offset
,
ulsch_harq
->
c
[
r
],
...
...
@@ -261,6 +264,8 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req)
}
else
{
if
(
rdata
->
nbSegments
!=
ulsch_harq
->
processedSegments
)
{
// Let's forget about this optimization for now
printf
(
"openair1/SCHED_NR/phy_procedures_nr_gNB.c:267
\n
"
);
assert
(
0
!=
0
);
#ifndef TASK_MANAGER
int
nb
=
abortTpoolJob
(
&
gNB
->
threadPool
,
req
->
key
);
nb
+=
abortNotifiedFIFOJob
(
&
gNB
->
respDecode
,
req
->
key
);
...
...
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