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
5067a2de
Commit
5067a2de
authored
Feb 20, 2023
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial changes for MsgQ use without threadPool for L1_rx_thread and L1_tx_thread
parent
87e7bfce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
2 deletions
+42
-2
executables/nr-gnb.c
executables/nr-gnb.c
+19
-2
executables/nr-ru.c
executables/nr-ru.c
+10
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+4
-0
openair2/GNB_APP/L1_nr_paramdef.h
openair2/GNB_APP/L1_nr_paramdef.h
+7
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+2
-0
No files found.
executables/nr-gnb.c
View file @
5067a2de
...
...
@@ -140,6 +140,18 @@ void tx_func(void *param) {
stop_meas
(
&
info
->
gNB
->
phy_proc_tx
);
}
void
*
L1_rx_thread
(
void
*
arg
)
{
PHY_VARS_gNB
*
gNB
=
(
PHY_VARS_gNB
*
)
arg
;
while
(
oai_exit
==
0
)
{
notifiedFIFO_elt_t
*
res
=
pullNotifiedFIFO
(
&
gNB
->
resp_L1
);
processingData_L1_t
*
info
=
(
processingData_L1_t
*
)
NotifiedFifoData
(
res
);
rx_func
(
info
);
delNotifiedFIFO_elt
(
res
);
}
}
void
rx_func
(
void
*
param
)
{
processingData_L1_t
*
info
=
(
processingData_L1_t
*
)
param
;
PHY_VARS_gNB
*
gNB
=
info
->
gNB
;
...
...
@@ -479,14 +491,19 @@ void init_gNB_Tpool(int inst) {
// L1 RX result FIFO
initNotifiedFIFO
(
&
gNB
->
resp_L1
);
#ifndef USE_MSGQ
notifiedFIFO_elt_t
*
msg
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1_t
),
0
,
&
gNB
->
resp_L1
,
rx_func
);
pushNotifiedFIFO
(
&
gNB
->
resp_L1
,
msg
);
// to unblock the process in the beginning
#endif
// L1 TX result FIFO
initNotifiedFIFO
(
&
gNB
->
L1_tx_free
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_filled
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_out
);
#ifdef USE_MSGQ
threadCreate
(
&
gNB
->
L1_rx_thread
,
L1_rx_thread
,
(
void
*
)
gNB
,
"L1_rx_thread"
,
gNB
->
L1_rx_thread_core
,
OAI_PRIORITY_RT_MAX
);
#endif
if
(
get_softmodem_params
()
->
reorder_thread_disable
)
{
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
&
gNB
->
L1_tx_out
,
tx_func
);
processingData_L1tx_t
*
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
...
...
executables/nr-ru.c
View file @
5067a2de
...
...
@@ -60,6 +60,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#endif
#define USE_MSGQ 1
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
static
int
DEFBANDS
[]
=
{
7
};
static
int
DEFENBS
[]
=
{
0
};
...
...
@@ -1281,9 +1283,13 @@ void *ru_thread( void *param ) {
}
// end if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
// At this point, all information for subframe has been received on FH interface
#ifndef USE_MSGQ
res
=
pullTpool
(
&
gNB
->
resp_L1
,
&
gNB
->
threadPool
);
if
(
res
==
NULL
)
break
;
// Tpool has been stopped
#else
res
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1_t
),
0
,
&
gNB
->
resp_L1
,
NULL
);
#endif
syncMsg
=
(
processingData_L1_t
*
)
NotifiedFifoData
(
res
);
syncMsg
->
gNB
=
gNB
;
syncMsg
->
frame_rx
=
proc
->
frame_rx
;
...
...
@@ -1292,7 +1298,11 @@ void *ru_thread( void *param ) {
syncMsg
->
slot_tx
=
proc
->
tti_tx
;
syncMsg
->
timestamp_tx
=
proc
->
timestamp_tx
;
res
->
key
=
proc
->
tti_rx
;
#ifndef USE_MSGQ
pushTpool
(
&
gNB
->
threadPool
,
res
);
#else
pushNotifiedFIFO
(
&
gNB
->
resp_L1
,
res
);
#endif
}
printf
(
"Exiting ru_thread
\n
"
);
...
...
openair1/PHY/defs_gNB.h
View file @
5067a2de
...
...
@@ -766,6 +766,10 @@ typedef struct PHY_VARS_gNB_s {
notifiedFIFO_t
L1_tx_out
;
notifiedFIFO_t
resp_RU_tx
;
tpool_t
threadPool
;
pthread_t
L1_rx_thread
;
int
L1_rx_thread_core
;
pthread_t
thread_L1_tx
;
int
L1_tx_thread_core
;
int
nbDecode
;
int
number_of_nr_dlsch_max
;
int
number_of_nr_ulsch_max
;
...
...
openair2/GNB_APP/L1_nr_paramdef.h
View file @
5067a2de
...
...
@@ -54,6 +54,9 @@
#define CONFIG_STRING_L1_SRS_DTX_THRESHOLD "srs_dtx_threshold"
#define CONFIG_STRING_L1_MAX_LDPC_ITERATIONS "max_ldpc_iterations"
#define CONFIG_STRING_L1_TX_AMP_BACKOFF_dB "tx_amp_backoff_dB"
#define CONFIG_STRING_L1_RX_THREAD_CORE "L1_rx_thread_core"
#define CONFIG_STRING_L1_TX_THREAD_CORE "L1_tx_thread_core"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
...
...
@@ -76,6 +79,8 @@
{CONFIG_STRING_L1_SRS_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_MAX_LDPC_ITERATIONS, NULL, 0, uptr:NULL, defintval:5, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_TX_AMP_BACKOFF_dB, NULL, 0, uptr:NULL, defintval:36, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_RX_THREAD_CORE, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_TX_THREAD_CORE, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \
}
#define L1_CC_IDX 0
#define L1_TRANSPORT_N_PREFERENCE_IDX 1
...
...
@@ -94,6 +99,8 @@
#define L1_SRS_DTX_THRESHOLD 14
#define L1_MAX_LDPC_ITERATIONS 15
#define L1_TX_AMP_BACKOFF_dB 15
#define L1_RX_THREAD_CORE 16
#define L1_TX_THREAD_CORE 17
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif
openair2/GNB_APP/gnb_config.c
View file @
5067a2de
...
...
@@ -762,6 +762,8 @@ void RCconfig_NR_L1(void)
RC
.
gNB
[
j
]
->
srs_thres
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_SRS_DTX_THRESHOLD
].
uptr
);
RC
.
gNB
[
j
]
->
max_ldpc_iterations
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_MAX_LDPC_ITERATIONS
].
uptr
);
RC
.
gNB
[
j
]
->
TX_AMP
=
(
int16_t
)(
32767
.
0
/
pow
(
10
.
0
,.
05
*
(
double
)(
*
L1_ParamList
.
paramarray
[
j
][
L1_TX_AMP_BACKOFF_dB
].
uptr
)));
RC
.
gNB
[
j
]
->
L1_rx_thread_core
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_RX_THREAD_CORE
].
iptr
);
RC
.
gNB
[
j
]
->
L1_tx_thread_core
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_TX_THREAD_CORE
].
iptr
);
LOG_I
(
PHY
,
"TX_AMP = %d (-%d dBFS)
\n
"
,
RC
.
gNB
[
j
]
->
TX_AMP
,
*
L1_ParamList
.
paramarray
[
j
][
L1_TX_AMP_BACKOFF_dB
].
uptr
);
if
(
strcmp
(
*
(
L1_ParamList
.
paramarray
[
j
][
L1_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"local_mac"
)
==
0
)
{
// sf_ahead = 2; // Need 4 subframe gap between RX and TX
...
...
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