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
951d1242
Commit
951d1242
authored
Dec 08, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove async ru_tx_func and simplify
parent
348c4ed3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
56 deletions
+33
-56
executables/nr-gnb.c
executables/nr-gnb.c
+33
-53
executables/nr-ru.c
executables/nr-ru.c
+0
-2
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+0
-1
No files found.
executables/nr-gnb.c
View file @
951d1242
...
@@ -366,55 +366,43 @@ void *nrL1_stats_thread(void *param) {
...
@@ -366,55 +366,43 @@ void *nrL1_stats_thread(void *param) {
// two parallel L1 tx threads.
// two parallel L1 tx threads.
void
*
tx_reorder_thread
(
void
*
param
)
{
void
*
tx_reorder_thread
(
void
*
param
)
{
PHY_VARS_gNB
*
gNB
=
(
PHY_VARS_gNB
*
)
param
;
PHY_VARS_gNB
*
gNB
=
(
PHY_VARS_gNB
*
)
param
;
notifiedFIFO_elt_t
*
resL1
;
notifiedFIFO_elt_t
*
resL1Reserve
=
NULL
;
notifiedFIFO_elt_t
*
resL1Reserve
=
NULL
;
notifiedFIFO_elt_t
*
resRU
;
processingData_L1tx_t
*
syncMsgL1
;
processingData_RU_t
*
syncMsgRU
;
resL1Reserve
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
int
next_tx_slot
=
((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1Reserve
))
->
slot
;
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
// check if there is a message in reserve
notifiedFIFO_elt_t
*
resL1
;
if
(
resL1Reserve
)
{
if
(
resL1Reserve
)
{
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1Reserve
);
resL1
=
resL1Reserve
;
if
(
syncMsgL1
->
slot
==
gNB
->
next_tx_slot
)
{
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
{
resRU
=
pullTpool
(
gNB
->
resp_RU_tx
,
gNB
->
threadPool
);
LOG_E
(
PHY
,
"order mistake"
);
// processing of last ru_tx_func finished
resL1Reserve
=
NULL
;
syncMsgRU
=
(
processingData_RU_t
*
)
NotifiedFifoData
(
resRU
);
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
syncMsgRU
->
frame_tx
=
syncMsgL1
->
frame
;
}
syncMsgRU
->
slot_tx
=
syncMsgL1
->
slot
;
}
else
{
syncMsgRU
->
timestamp_tx
=
syncMsgL1
->
timestamp_tx
;
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
syncMsgRU
->
ru
=
gNB
->
RU_list
[
0
];
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
{
resRU
->
key
=
syncMsgL1
->
slot
;
if
(
resL1Reserve
)
gNB
->
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
syncMsgRU
->
frame_tx
,
syncMsgRU
->
slot_tx
);
LOG_E
(
PHY
,
"error, have a stored packet, then a second one
\n
"
);
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
resL1Reserve
);
resL1Reserve
=
resL1
;
pushTpool
(
gNB
->
threadPool
,
resRU
);
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
resL1Reserve
=
NULL
;
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
}
else
{
LOG_E
(
PHY
,
"error, pull two msg, none is good
\n
"
);
#if DEBUG_THREADS
}
printf
(
"Waiting for reserve L1 Tx message to be sent to RU for slot %d
\n
"
,
syncMsgL1
->
slot
);
#endif
}
}
// pull message from output FIFO of tx_func
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
);
if
(
syncMsgL1
->
slot
==
gNB
->
next_tx_slot
)
{
resRU
=
pullTpool
(
gNB
->
resp_RU_tx
,
gNB
->
threadPool
);
// processing of last ru_tx_func finished
syncMsgRU
=
(
processingData_RU_t
*
)
NotifiedFifoData
(
resRU
);
syncMsgRU
->
frame_tx
=
syncMsgL1
->
frame
;
syncMsgRU
->
slot_tx
=
syncMsgL1
->
slot
;
syncMsgRU
->
timestamp_tx
=
syncMsgL1
->
timestamp_tx
;
syncMsgRU
->
ru
=
gNB
->
RU_list
[
0
];
resRU
->
key
=
syncMsgL1
->
slot
;
gNB
->
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
syncMsgRU
->
frame_tx
,
syncMsgRU
->
slot_tx
);
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
resL1
);
pushTpool
(
gNB
->
threadPool
,
resRU
);
}
else
{
AssertFatal
(
resL1Reserve
==
NULL
,
"Error! There is already a waiting message
\n
"
);
resL1Reserve
=
resL1
;
}
}
processingData_L1tx_t
*
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
);
processingData_RU_t
syncMsgRU
;
syncMsgRU
.
frame_tx
=
syncMsgL1
->
frame
;
syncMsgRU
.
slot_tx
=
syncMsgL1
->
slot
;
syncMsgRU
.
timestamp_tx
=
syncMsgL1
->
timestamp_tx
;
syncMsgRU
.
ru
=
gNB
->
RU_list
[
0
];
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
syncMsgRU
.
frame_tx
,
syncMsgRU
.
slot_tx
);
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
resL1
);
if
(
resL1
==
resL1Reserve
)
resL1Reserve
=
NULL
;
ru_tx_func
((
void
*
)
&
syncMsgRU
);
}
}
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -473,14 +461,6 @@ void init_gNB_Tpool(int inst) {
...
@@ -473,14 +461,6 @@ void init_gNB_Tpool(int inst) {
gNB
->
phy_proc_tx_1
=
&
msgDataTx
->
phy_proc_tx
;
gNB
->
phy_proc_tx_1
=
&
msgDataTx
->
phy_proc_tx
;
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
msgL1Tx
);
// to unblock the process in the beginning
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
msgL1Tx
);
// to unblock the process in the beginning
// RU TX result FIFO
gNB
->
resp_RU_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_RU_tx
);
notifiedFIFO_elt_t
*
msgRUTx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_RU_t
),
0
,
gNB
->
resp_RU_tx
,
ru_tx_func
);
int
first_tx_slot
=
sf_ahead
*
gNB
->
frame_parms
.
slots_per_subframe
;
pushNotifiedFIFO
(
gNB
->
resp_RU_tx
,
msgRUTx
);
// to unblock the process in the beginning
gNB
->
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
0
,
first_tx_slot
-
1
);
threadCreate
(
&
proc
->
L1_stats_thread
,
nrL1_stats_thread
,(
void
*
)
gNB
,
"L1_stats"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
threadCreate
(
&
proc
->
L1_stats_thread
,
nrL1_stats_thread
,(
void
*
)
gNB
,
"L1_stats"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
threadCreate
(
&
proc
->
pthread_tx_reorder
,
tx_reorder_thread
,
(
void
*
)
gNB
,
"thread_tx_reorder"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
threadCreate
(
&
proc
->
pthread_tx_reorder
,
tx_reorder_thread
,
(
void
*
)
gNB
,
"thread_tx_reorder"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
}
}
...
...
executables/nr-ru.c
View file @
951d1242
...
@@ -1449,8 +1449,6 @@ void *ru_thread( void *param ) {
...
@@ -1449,8 +1449,6 @@ void *ru_thread( void *param ) {
delNotifiedFIFO_elt
(
res
);
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
L1_tx_free
);
res
=
pullNotifiedFIFO
(
gNB
->
L1_tx_free
);
delNotifiedFIFO_elt
(
res
);
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
resp_RU_tx
);
delNotifiedFIFO_elt
(
res
);
ru_thread_status
=
0
;
ru_thread_status
=
0
;
return
&
ru_thread_status
;
return
&
ru_thread_status
;
...
...
openair1/PHY/defs_gNB.h
View file @
951d1242
...
@@ -906,7 +906,6 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -906,7 +906,6 @@ typedef struct PHY_VARS_gNB_s {
tpool_t
*
threadPool
;
tpool_t
*
threadPool
;
int
nbDecode
;
int
nbDecode
;
uint8_t
pusch_proc_threads
;
uint8_t
pusch_proc_threads
;
int
next_tx_slot
;
int
number_of_nr_dlsch_max
;
int
number_of_nr_dlsch_max
;
int
number_of_nr_ulsch_max
;
int
number_of_nr_ulsch_max
;
void
*
scopeData
;
void
*
scopeData
;
...
...
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