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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
53d0fc05
Commit
53d0fc05
authored
Mar 12, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more RA_state_t to accommodate all the output values from nr_ue_get_rach
parent
e2627f80
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
21 deletions
+26
-21
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+7
-7
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+7
-4
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+10
-8
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+2
-2
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
53d0fc05
...
...
@@ -2162,7 +2162,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
}
if
(
nr_prach
==
1
)
{
if
(
nr_prach
==
GENERATE_PREAMBLE
)
{
if
(
ue
->
mac_enabled
==
1
)
{
int16_t
pathloss
=
get_nr_PL
(
mod_id
,
ue
->
CC_id
,
gNB_id
);
...
...
@@ -2208,14 +2208,14 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
if
(
ue
->
mac_enabled
==
1
)
nr_Msg1_transmitted
(
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
);
}
else
if
(
nr_prach
==
2
)
{
LOG_
W
(
PHY
,
"In %s: [UE %d] RA waiting contention resolution
\n
"
,
__FUNCTION__
,
mod_id
);
}
else
if
(
nr_prach
==
WAIT_CONTENTION_RESOLUTION
)
{
LOG_
D
(
PHY
,
"In %s: [UE %d] RA waiting contention resolution
\n
"
,
__FUNCTION__
,
mod_id
);
ue
->
UE_mode
[
gNB_id
]
=
RA_WAIT_CR
;
}
else
if
(
nr_prach
==
3
)
{
LOG_
W
(
PHY
,
"In %s: [UE %d] RA completed, setting UE mode to PUSCH
\n
"
,
__FUNCTION__
,
mod_id
);
}
else
if
(
nr_prach
==
RA_SUCCEEDED
)
{
LOG_
D
(
PHY
,
"In %s: [UE %d] RA completed, setting UE mode to PUSCH
\n
"
,
__FUNCTION__
,
mod_id
);
ue
->
UE_mode
[
gNB_id
]
=
PUSCH
;
}
else
if
(
nr_prach
==
4
){
LOG_
W
(
PHY
,
"In %s: [UE %d] RA failed, setting UE mode to PRACH
\n
"
,
__FUNCTION__
,
mod_id
);
}
else
if
(
nr_prach
==
RA_FAILED
){
LOG_
D
(
PHY
,
"In %s: [UE %d] RA failed, setting UE mode to PRACH
\n
"
,
__FUNCTION__
,
mod_id
);
ue
->
UE_mode
[
gNB_id
]
=
PRACH
;
}
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
53d0fc05
...
...
@@ -234,9 +234,12 @@ typedef struct {
typedef
enum
{
RA_UE_IDLE
=
0
,
WAIT_RAR
=
1
,
WAIT_CONTENTION_RESOLUTION
=
2
,
RA_SUCCEEDED
=
3
GENERATE_IDLE
=
0
,
GENERATE_PREAMBLE
=
1
,
WAIT_RAR
=
2
,
WAIT_CONTENTION_RESOLUTION
=
3
,
RA_SUCCEEDED
=
4
,
RA_FAILED
=
5
}
RA_state_t
;
typedef
struct
{
...
...
@@ -260,7 +263,7 @@ typedef struct {
/// Random-access preamble index
int
ra_PreambleIndex
;
/// Flag for the Msg1 generation: enabled at every occurrence of nr prach slot
uint8
_t
generate_nr_prach
;
RA_state
_t
generate_nr_prach
;
/// Random-access window counter
int16_t
RA_window_cnt
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
53d0fc05
...
...
@@ -582,7 +582,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
nr_get_RA_window
(
mac
);
// Fill in preamble and PRACH resources
if
(
ra
->
generate_nr_prach
==
1
)
if
(
ra
->
generate_nr_prach
==
GENERATE_PREAMBLE
)
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
offset
=
nr_generate_ulsch_pdu
((
uint8_t
*
)
mac_sdus
,
// sdus buffer
...
...
@@ -635,7 +635,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
nr_ra_succeeded
(
mod_id
,
frame
,
nr_slot_tx
);
}
else
{
ra
->
generate_nr_prach
=
2
;
ra
->
generate_nr_prach
=
GENERATE_IDLE
;
}
}
else
if
(
ra
->
RA_window_cnt
==
0
&&
!
ra
->
RA_RAPID_found
)
{
...
...
@@ -658,21 +658,23 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
ra
->
RA_backoff_cnt
--
;
if
((
ra
->
RA_backoff_cnt
>
0
&&
ra
->
generate_nr_prach
==
1
)
||
ra
->
RA_backoff_cnt
==
0
){
if
((
ra
->
RA_backoff_cnt
>
0
&&
ra
->
generate_nr_prach
==
GENERATE_PREAMBLE
)
||
ra
->
RA_backoff_cnt
==
0
){
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
}
}
}
}
else
{
return
3
;
}
if
(
ra
->
RA_contention_resolution_timer_active
){
nr_ue_contention_resolution
(
mod_id
,
CC_id
,
frame
,
nr_slot_tx
,
prach_resources
);
}
if
(
ra
->
generate_nr_prach
!=
GENERATE_IDLE
)
{
return
ra
->
generate_nr_prach
;
}
else
{
return
ra
->
ra_state
;
}
}
...
...
@@ -781,7 +783,7 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){
LOG_D
(
MAC
,
"In %s: [UE %d] clearing RA_active flag...
\n
"
,
__FUNCTION__
,
mod_id
);
ra
->
RA_active
=
0
;
ra
->
generate_nr_prach
=
3
;
ra
->
generate_nr_prach
=
GENERATE_IDLE
;
ra
->
ra_state
=
RA_SUCCEEDED
;
}
...
...
@@ -797,7 +799,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res
RA_config_t
*
ra
=
&
mac
->
ra
;
ra
->
first_Msg3
=
0
;
ra
->
generate_nr_prach
=
4
;
ra
->
generate_nr_prach
=
RA_FAILED
;
ra
->
ra_state
=
RA_UE_IDLE
;
prach_resources
->
RA_PREAMBLE_TRANSMISSION_COUNTER
++
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
53d0fc05
...
...
@@ -1669,7 +1669,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
NR_RACH_ConfigGeneric_t
*
rach_ConfigGeneric
=
&
setup
->
rach_ConfigGeneric
;
ra
->
RA_offset
=
2
;
// to compensate the rx frame offset at the gNB
ra
->
generate_nr_prach
=
0
;
// Reset flag for PRACH generation
ra
->
generate_nr_prach
=
GENERATE_IDLE
;
// Reset flag for PRACH generation
if
(
is_nr_UL_slot
(
scc
,
slotP
))
{
...
...
@@ -1686,7 +1686,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
if
(
is_nr_prach_slot
&&
ra
->
ra_state
==
RA_UE_IDLE
)
{
AssertFatal
(
NULL
!=
prach_occasion_info_p
,
"PRACH Occasion Info not returned in a valid NR Prach Slot
\n
"
);
ra
->
generate_nr_prach
=
1
;
ra
->
generate_nr_prach
=
GENERATE_PREAMBLE
;
format
=
prach_occasion_info_p
->
format
;
format0
=
format
&
0xff
;
// single PRACH format
...
...
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