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
常顺宇
OpenXG-RAN
Commits
f4fd79c4
Commit
f4fd79c4
authored
Feb 08, 2021
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First commit
Created 3 threadpools for L1 rx, L1 tx and RU tx processing
parent
3b2d5037
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
332 additions
and
17 deletions
+332
-17
executables/nr-gnb.c
executables/nr-gnb.c
+44
-9
executables/nr-ru.c
executables/nr-ru.c
+278
-4
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+7
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-2
No files found.
executables/nr-gnb.c
View file @
f4fd79c4
...
...
@@ -870,7 +870,7 @@ void init_gNB_proc(int inst) {
pthread_cond_init
(
&
sync_phy_proc
.
cond_phy_proc_tx
,
NULL
);
sync_phy_proc
.
phy_proc_CC_id
=
0
;
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
threadPool
_ulsch
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
int
numCPU
=
sysconf
(
_SC_NPROCESSORS_ONLN
);
uint32_t
num_threads_pusch
;
...
...
@@ -884,10 +884,50 @@ void init_gNB_proc(int inst) {
sprintf
(
ul_pool
+
2
+
s_offset
,
",-1"
);
s_offset
+=
3
;
}
initTpool
(
ul_pool
,
gNB
->
threadPool
,
false
);
initTpool
(
ul_pool
,
gNB
->
threadPool
_ulsch
,
false
);
initNotifiedFIFO
(
gNB
->
respDecode
);
}
void
init_gNB_Tpool
(
int
inst
)
{
PHY_VARS_gNB
*
gNB
;
gNB
=
RC
.
gNB
[
inst
];
// ULSCH decoding threadpool
gNB
->
threadPool_ulsch
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
int
numCPU
=
sysconf
(
_SC_NPROCESSORS_ONLN
);
uint32_t
num_threads_pusch
;
paramdef_t
PUSCHThreads
[]
=
NUM_THREADS_DESC
;
config_get
(
PUSCHThreads
,
sizeof
(
PUSCHThreads
)
/
sizeof
(
paramdef_t
),
NULL
);
int
threadCnt
=
min
(
numCPU
,
num_threads_pusch
);
char
ul_pool
[
80
];
sprintf
(
ul_pool
,
"-1"
);
int
s_offset
=
0
;
for
(
int
icpu
=
1
;
icpu
<
threadCnt
;
icpu
++
)
{
sprintf
(
ul_pool
+
2
+
s_offset
,
",-1"
);
s_offset
+=
3
;
}
initTpool
(
ul_pool
,
gNB
->
threadPool_ulsch
,
false
);
initNotifiedFIFO
(
gNB
->
respDecode
);
// L1 RX threadpool
gNB
->
threadPool_L1
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
resp_L1
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initTpool
(
"-1"
,
gNB
->
threadPool_L1
,
false
);
initNotifiedFIFO
(
gNB
->
resp_L1
);
// L1 TX threadpool
gNB
->
threadPool_L1_tx
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
resp_L1_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initTpool
(
"-1"
,
gNB
->
threadPool_L1_tx
,
false
);
initNotifiedFIFO
(
gNB
->
resp_L1_tx
);
// RU TX threadpool
gNB
->
threadPool_RU_tx
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
resp_RU_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initTpool
(
"-1"
,
gNB
->
threadPool_RU_tx
,
false
);
initNotifiedFIFO
(
gNB
->
resp_RU_tx
);
}
/*!
...
...
@@ -1010,15 +1050,10 @@ void init_eNB_afterRU(void) {
* (not tested in other modes).
*/
//init_precoding_weights(RC.gNB[inst]);
init_gNB_proc
(
inst
);
//init_gNB_proc(inst);
init_gNB_Tpool
(
inst
);
}
for
(
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
{
AssertFatal
(
RC
.
ru
[
ru_id
]
!=
NULL
,
"ru_id %d is null
\n
"
,
ru_id
);
RC
.
ru
[
ru_id
]
->
nr_wakeup_rxtx
=
wakeup_rxtx
;
// RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_gNB;
RC
.
ru
[
ru_id
]
->
gNB_top
=
gNB_top
;
}
}
void
init_gNB
(
int
single_thread_flag
,
int
wait_for_sync
)
{
...
...
executables/nr-ru.c
View file @
f4fd79c4
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
f4fd79c4
...
...
@@ -640,7 +640,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
rdata
->
offset
=
offset
;
rdata
->
ulsch
=
ulsch
;
rdata
->
ulsch_id
=
UE_id
;
pushTpool
(
phy_vars_gNB
->
threadPool
,
req
);
pushTpool
(
phy_vars_gNB
->
threadPool
_ulsch
,
req
);
phy_vars_gNB
->
nbDecode
++
;
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
phy_vars_gNB
->
nbDecode
);
r_offset
+=
E
;
...
...
openair1/PHY/defs_gNB.h
View file @
f4fd79c4
...
...
@@ -832,7 +832,13 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t ulsch_freq_offset_estimation_stats;
*/
notifiedFIFO_t
*
respDecode
;
tpool_t
*
threadPool
;
notifiedFIFO_t
*
resp_L1
;
notifiedFIFO_t
*
resp_L1_tx
;
notifiedFIFO_t
*
resp_RU_tx
;
tpool_t
*
threadPool_ulsch
;
tpool_t
*
threadPool_L1
;
tpool_t
*
threadPool_L1_tx
;
tpool_t
*
threadPool_RU_tx
;
int
nbDecode
;
}
PHY_VARS_gNB
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
f4fd79c4
...
...
@@ -243,7 +243,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
}
else
{
if
(
rdata
->
nbSegments
!=
ulsch_harq
->
processedSegments
)
{
int
nb
=
abortTpool
(
gNB
->
threadPool
,
req
->
key
);
int
nb
=
abortTpool
(
gNB
->
threadPool
_ulsch
,
req
->
key
);
nb
+=
abortNotifiedFIFO
(
gNB
->
respDecode
,
req
->
key
);
gNB
->
nbDecode
-=
nb
;
LOG_D
(
PHY
,
"uplink segment error %d/%d, aborted %d segments
\n
"
,
rdata
->
segment_r
,
rdata
->
nbSegments
,
nb
);
...
...
@@ -353,7 +353,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
G
);
while
(
gNB
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
gNB
->
respDecode
,
gNB
->
threadPool
);
notifiedFIFO_elt_t
*
req
=
pullTpool
(
gNB
->
respDecode
,
gNB
->
threadPool
_ulsch
);
nr_postDecode
(
gNB
,
req
);
delNotifiedFIFO_elt
(
req
);
}
...
...
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