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
daf30bd6
Commit
daf30bd6
authored
Nov 30, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_mthread_rework' into integration_2022_wk48
parents
c99a0557
f47acc49
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
150 additions
and
137 deletions
+150
-137
executables/docs/nr-ue-design.md
executables/docs/nr-ue-design.md
+22
-0
executables/nr-ue.c
executables/nr-ue.c
+92
-104
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+2
-2
openair1/PHY/impl_defs_top.h
openair1/PHY/impl_defs_top.h
+1
-3
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+1
-2
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+19
-9
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-2
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+0
-4
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+4
-11
radio/COMMON/common_lib.h
radio/COMMON/common_lib.h
+8
-0
No files found.
executables/docs/nr-ue-design.md
0 → 100644
View file @
daf30bd6
# Multi-threading Design
The
`UE_thread`
function in
`nr-ue.c`
is the main top level thread that interacts with the radio unit. Once the thread spawns, it starts the 'Initial Syncronization'. Once its complete, the regular processing of slots commences.
## Initial Syncronization Block
```
mermaid
graph TD
A(Start) -->|UE_thread| B["readFrame<br/>--Reads samples worth 2 frames"]
B --> |Tpool thread| C["UE_synch<br/>--PSS & SSS detection<br/>--PBCH decode"]
B --> |UE_thread| D["readFrame<br/>--trash samples to unblock radio"]
C --> |Tpool thread| E[syncInFrame<br/>--shift first sample to start of frame]
D --> |UE_thread| E
```
## Regular Slot Processing
```
mermaid
graph TD
E[syncInFrame<br/>--shift first sample to start of frame] -->|UE_thread| F["trx_read_func (slot n)"]
F --> |Tpool thread| G["processSlotTX (slot n+4)<br/>--PUSCH encode<br/>--PUCCH encode<br/>--trx_write_func"]
F --> |UE_thread| H["UE_processing (slot n)<br/>--PDCCH decode<br/>--PDSCH decode"]
G --> |Tpool thread| I(Merge)
H --> |UE_thread| I(Merge)
I --> |Go to next slot<br/>UE_thread| F
```
executables/nr-ue.c
View file @
daf30bd6
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_nr_UE.h
View file @
daf30bd6
...
@@ -768,8 +768,8 @@ typedef struct nr_rxtx_thread_data_s {
...
@@ -768,8 +768,8 @@ typedef struct nr_rxtx_thread_data_s {
UE_nr_rxtx_proc_t
proc
;
UE_nr_rxtx_proc_t
proc
;
PHY_VARS_NR_UE
*
UE
;
PHY_VARS_NR_UE
*
UE
;
NR_UE_SCHED_MODE_t
ue_sched_mode
;
NR_UE_SCHED_MODE_t
ue_sched_mode
;
notifiedFIFO_t
txFifo
;
int
writeBlockSize
;
}
nr_rxtx_thread_data_t
;
}
nr_rxtx_thread_data_t
;
typedef
struct
LDPCDecode_ue_s
{
typedef
struct
LDPCDecode_ue_s
{
PHY_VARS_NR_UE
*
phy_vars_ue
;
PHY_VARS_NR_UE
*
phy_vars_ue
;
...
...
openair1/PHY/impl_defs_top.h
View file @
daf30bd6
...
@@ -269,9 +269,7 @@
...
@@ -269,9 +269,7 @@
/* FFS_NR_TODO it defines ue capability which is the number of slots */
/* FFS_NR_TODO it defines ue capability which is the number of slots */
/* - between reception of pdsch and tarnsmission of its acknowlegment */
/* - between reception of pdsch and tarnsmission of its acknowlegment */
/* - between reception of un uplink grant and its related transmission */
/* - between reception of un uplink grant and its related transmission */
/* - FIXME temprarily set to 5 to avoid timing issues at OAI UE in rfsimulator */
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (4)
/* - issues caused by no rendez-vous point between TX and RX in the OAI UE */
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (5)
#ifndef NO_RAT_NR
#ifndef NO_RAT_NR
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX)
/* for NR this will certainly depends to such UE capability which is not yet defined */
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX)
/* for NR this will certainly depends to such UE capability which is not yet defined */
...
...
openair1/SCHED_NR_UE/defs.h
View file @
daf30bd6
...
@@ -109,8 +109,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
...
@@ -109,8 +109,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
nr_phy_data_t
*
phy_data
,
nr_phy_data_t
*
phy_data
);
notifiedFIFO_t
*
txFifo
);
int
phy_procedures_slot_parallelization_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
abstraction_flag
,
uint8_t
do_pdcch_flag
,
relaying_type_t
r_type
);
int
phy_procedures_slot_parallelization_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
abstraction_flag
,
uint8_t
do_pdcch_flag
,
relaying_type_t
r_type
);
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
daf30bd6
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "executables/nr-uesoftmodem.h"
#include "executables/nr-uesoftmodem.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair1/SCHED_NR_UE/pucch_uci_ue_nr.h"
//#define DEBUG_PHY_PROC
//#define DEBUG_PHY_PROC
#define NR_PDCCH_SCHED
#define NR_PDCCH_SCHED
...
@@ -297,6 +298,23 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
...
@@ -297,6 +298,23 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
if
(
ue
->
UE_mode
[
gNB_id
]
==
PUSCH
)
{
if
(
ue
->
UE_mode
[
gNB_id
]
==
PUSCH
)
{
ue_srs_procedures_nr
(
ue
,
proc
,
gNB_id
);
ue_srs_procedures_nr
(
ue
,
proc
,
gNB_id
);
}
}
if
(
ue
->
UE_mode
[
gNB_id
]
<=
PUSCH
)
{
pucch_procedures_ue_nr
(
ue
,
gNB_id
,
proc
,
phy_data
);
}
LOG_D
(
PHY
,
"Sending Uplink data
\n
"
);
nr_ue_pusch_common_procedures
(
ue
,
proc
->
nr_slot_tx
,
&
ue
->
frame_parms
,
ue
->
frame_parms
.
nb_antennas_tx
);
if
(
ue
->
UE_mode
[
gNB_id
]
>
NOT_SYNCHED
&&
ue
->
UE_mode
[
gNB_id
]
<
PUSCH
)
nr_ue_prach_procedures
(
ue
,
proc
,
proc
->
gNB_id
);
LOG_D
(
PHY
,
"****** end TX-Chain for AbsSubframe %d.%d ******
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
LOG_D
(
PHY
,
"****** end TX-Chain for AbsSubframe %d.%d ******
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX
,
VCD_FUNCTION_OUT
);
...
@@ -981,8 +999,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -981,8 +999,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
nr_phy_data_t
*
phy_data
,
nr_phy_data_t
*
phy_data
)
{
notifiedFIFO_t
*
txFifo
)
{
int
frame_rx
=
proc
->
frame_rx
;
int
frame_rx
=
proc
->
frame_rx
;
int
nr_slot_rx
=
proc
->
nr_slot_rx
;
int
nr_slot_rx
=
proc
->
nr_slot_rx
;
...
@@ -1176,13 +1193,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -1176,13 +1193,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#endif //NR_PDCCH_SCHED
#endif //NR_PDCCH_SCHED
// Start PUSCH processing here. It runs in parallel with PDSCH processing
notifiedFIFO_elt_t
*
newElt
=
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
proc
->
nr_slot_tx
,
txFifo
,
processSlotTX
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
newElt
);
curMsg
->
proc
=
*
proc
;
curMsg
->
UE
=
ue
;
curMsg
->
ue_sched_mode
=
SCHED_PUSCH
;
pushTpool
(
&
(
get_nrUE_params
()
->
Tpool
),
newElt
);
start_meas
(
&
ue
->
generic_stat
);
start_meas
(
&
ue
->
generic_stat
);
// do procedures for C-RNTI
// do procedures for C-RNTI
int
ret_pdsch
=
0
;
int
ret_pdsch
=
0
;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
daf30bd6
...
@@ -1266,8 +1266,7 @@ int main(int argc, char **argv)
...
@@ -1266,8 +1266,7 @@ int main(int argc, char **argv)
phy_procedures_nrUE_RX
(
UE
,
phy_procedures_nrUE_RX
(
UE
,
&
UE_proc
,
&
UE_proc
,
0
,
0
,
&
phy_data
,
&
phy_data
);
NULL
);
//----------------------------------------------------------
//----------------------------------------------------------
//---------------------- count errors ----------------------
//---------------------- count errors ----------------------
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
daf30bd6
...
@@ -1243,10 +1243,6 @@ int main(int argc, char **argv)
...
@@ -1243,10 +1243,6 @@ int main(int argc, char **argv)
phy_procedures_nrUE_TX
(
UE
,
&
UE_proc
,
gNB_id
,
&
phy_data
);
phy_procedures_nrUE_TX
(
UE
,
&
UE_proc
,
gNB_id
,
&
phy_data
);
/* We need to call common sending function to send signal */
LOG_D
(
PHY
,
"Sending Uplink data
\n
"
);
nr_ue_pusch_common_procedures
(
UE
,
slot
,
&
UE
->
frame_parms
,
UE
->
frame_parms
.
nb_antennas_tx
);
if
(
n_trials
==
1
)
{
if
(
n_trials
==
1
)
{
LOG_M
(
"txsig0.m"
,
"txs0"
,
&
UE
->
common_vars
.
txdata
[
0
][
slot_offset
],
slot_length
,
1
,
1
);
LOG_M
(
"txsig0.m"
,
"txs0"
,
&
UE
->
common_vars
.
txdata
[
0
][
slot_offset
],
slot_length
,
1
,
1
);
LOG_M
(
"txsig0F.m"
,
"txs0F"
,
UE
->
common_vars
.
txdataF
[
0
],
frame_parms
->
ofdm_symbol_size
*
14
,
1
,
1
);
LOG_M
(
"txsig0F.m"
,
"txs0F"
,
UE
->
common_vars
.
txdataF
[
0
],
frame_parms
->
ofdm_symbol_size
*
14
,
1
,
1
);
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
daf30bd6
...
@@ -1140,17 +1140,10 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
...
@@ -1140,17 +1140,10 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
LOG_T
(
NR_MAC
,
"In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d
\n
"
,
LOG_T
(
NR_MAC
,
"In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d
\n
"
,
__FUNCTION__
,
__LINE__
,
ul_info
->
ue_sched_mode
,
mac
->
ra
.
ra_state
);
__FUNCTION__
,
__LINE__
,
ul_info
->
ue_sched_mode
,
mac
->
ra
.
ra_state
);
switch
(
ul_info
->
ue_sched_mode
)
{
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
case
SCHED_PUSCH
:
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
)
&&
!
get_softmodem_params
()
->
phy_test
)
{
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
nr_ue_pucch_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
phy_data
);
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
)
&&
!
get_softmodem_params
()
->
phy_test
)
nr_ue_prach_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
);
nr_ue_prach_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
);
break
;
case
SCHED_PUCCH
:
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
))
nr_ue_pucch_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
phy_data
);
break
;
}
}
switch
(
ret
){
switch
(
ret
){
...
...
radio/COMMON/common_lib.h
View file @
daf30bd6
...
@@ -150,6 +150,14 @@ typedef enum {
...
@@ -150,6 +150,14 @@ typedef enum {
gpsdo
=
2
gpsdo
=
2
}
clock_source_t
;
}
clock_source_t
;
/*! \brief Radio Tx burst flags */
typedef
enum
{
Invalid
=
0
,
MiddleOfBurst
,
StartOfBurst
,
EndOfBurst
}
radio_tx_flag_t
;
/*! \brief Structure used for initializing UDP read threads */
/*! \brief Structure used for initializing UDP read threads */
typedef
struct
{
typedef
struct
{
openair0_device
*
device
;
openair0_device
*
device
;
...
...
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