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
spbro
OpenXG-RAN
Commits
44d1fbc0
Commit
44d1fbc0
authored
May 14, 2024
by
ndomingues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor enum nr_ra_type_t and make it common for both gNB and UE
parent
f5e73c51
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
14 deletions
+37
-14
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+5
-0
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+3
-6
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+29
-8
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
44d1fbc0
...
...
@@ -616,5 +616,10 @@ typedef struct NR_tda_info {
long
k2
;
}
NR_tda_info_t
;
typedef
enum
{
RA_4_STEP
=
0
,
RA_2_STEP
=
1
,
}
nr_ra_type_t
;
#endif
/*__LAYER2_MAC_H__ */
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
44d1fbc0
...
...
@@ -186,11 +186,6 @@ typedef enum {
RE_ESTABLISHMENT
}
NR_UE_MAC_reset_cause_t
;
typedef
enum
{
RA_2STEP
=
0
,
RA_4STEP
}
nr_ra_type_e
;
typedef
struct
{
// after multiplexing buffer remain for each lcid
int32_t
LCID_buffer_remain
;
...
...
@@ -286,7 +281,7 @@ typedef struct {
///
uint8_t
RA_SCALING_FACTOR_BI
;
/// Indicating whether it is 2-step or 4-step RA
nr_ra_type_
e
RA_TYPE
;
nr_ra_type_
t
RA_TYPE
;
/// UE configured maximum output power
int
RA_PCMAX
;
}
NR_PRACH_RESOURCES_t
;
...
...
@@ -299,6 +294,8 @@ typedef struct {
nrRA_UE_state_t
ra_state
;
/// RA contention type
uint8_t
cfra
;
/// RA type
nr_ra_type_t
ra_type
;
/// RA rx frame offset: compensate RA rx offset introduced by OAI gNB.
uint8_t
RA_offset
;
/// RA-rnti
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
44d1fbc0
...
...
@@ -85,15 +85,20 @@ void init_RA(NR_UE_MAC_INST_t *mac,
prach_resources
->
POWER_OFFSET_2STEP_RA
=
0
;
prach_resources
->
RA_SCALING_FACTOR_BI
=
1
;
int16_t
dl_pathloss
=
!
get_softmodem_params
()
->
emulate_l1
?
compute_nr_SSB_PL
(
mac
,
mac
->
ssb_measurements
.
ssb_rsrp_dBm
)
:
0
;
// Contention Free
if
(
rach_ConfigDedicated
)
{
if
(
rach_ConfigDedicated
->
cfra
){
LOG_I
(
NR_MAC
,
"Initialization of 2-step contention-free random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2STEP
;
LOG_I
(
MAC
,
"Initialization of 4-Step CFRA procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_4_STEP
;
ra
->
ra_type
=
RA_4_STEP
;
ra
->
cfra
=
1
;
}
else
if
(
rach_ConfigDedicated
->
ext1
){
if
(
rach_ConfigDedicated
->
ext1
->
cfra_TwoStep_r16
){
LOG_I
(
NR_MAC
,
"Setting RA type to 2-step...
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2STEP
;
if
(
rach_ConfigDedicated
->
ext1
->
cfra_TwoStep_r16
)
{
// if 2 step CFRA is configured in SIB1
LOG_I
(
MAC
,
"Initialization of 2-Step CFRA procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2_STEP
;
ra
->
ra_type
=
RA_2_STEP
;
ra
->
cfra
=
1
;
}
else
{
LOG_E
(
NR_MAC
,
"Config not handled
\n
"
);
...
...
@@ -101,10 +106,26 @@ void init_RA(NR_UE_MAC_INST_t *mac,
}
else
{
LOG_E
(
NR_MAC
,
"Config not handled
\n
"
);
}
}
else
{
LOG_I
(
NR_MAC
,
"Initialization of 4-step contention-based random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_4STEP
;
// Contention Based
}
else
if
(
mac
->
current_UL_BWP
->
msgA_ConfigCommon_r16
&&
dl_pathloss
>
*
mac
->
current_UL_BWP
->
msgA_ConfigCommon_r16
->
rach_ConfigCommonTwoStepRA_r16
.
msgA_RSRP_Threshold_r16
)
{
LOG_I
(
MAC
,
"Initialization of 2-Step CBRA procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2_STEP
;
ra
->
ra_type
=
RA_2_STEP
;
ra
->
cfra
=
0
;
}
else
if
(
mac
->
current_UL_BWP
->
msgA_ConfigCommon_r16
)
{
LOG_I
(
MAC
,
"Initialization of 2-Step CBRA procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_2_STEP
;
ra
->
ra_type
=
RA_2_STEP
;
ra
->
cfra
=
0
;
}
else
if
(
nr_rach_ConfigCommon
)
{
LOG_I
(
MAC
,
"Initialization of 4-Step CBRA procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_4_STEP
;
ra
->
ra_type
=
RA_4_STEP
;
ra
->
cfra
=
0
;
}
else
{
LOG_E
(
MAC
,
"Config not handled
\n
"
);
AssertFatal
(
false
,
"In %s: config not handled
\n
"
,
__FUNCTION__
);
}
switch
(
rach_ConfigGeneric
->
powerRampingStep
){
// in dB
...
...
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