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
cbbbeb80
Commit
cbbbeb80
authored
May 14, 2024
by
ndomingues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Baseline implementation of RA 2-Step MsgA procedures at gNB
parent
c609dd8f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
189 additions
and
39 deletions
+189
-39
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+153
-15
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+24
-17
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+12
-7
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
cbbbeb80
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
cbbbeb80
...
...
@@ -596,7 +596,7 @@ void handle_nr_ul_harq(const int CC_idP,
}
}
NR_SCHED_UNLOCK
(
&
nrmac
->
sched_lock
);
LOG_
E
(
NR_MAC
,
"no RA proc for RNTI 0x%04x in Msg3/
PUSCH
\n
"
,
crc_pdu
->
rnti
);
LOG_
D
(
NR_MAC
,
"no RA proc for RNTI 0x%04x in Msg3/MsgA-
PUSCH
\n
"
,
crc_pdu
->
rnti
);
return
;
}
if
(
nrmac
->
radio_config
.
disable_harq
)
{
...
...
@@ -819,7 +819,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
* it. */
for
(
int
i
=
0
;
i
<
NR_NB_RA_PROC_MAX
;
++
i
)
{
NR_RA_t
*
ra
=
&
gNB_mac
->
common_channels
[
CC_idP
].
ra
[
i
];
if
(
ra
->
ra_state
!=
nrRA_WAIT_Msg3
)
if
(
ra
->
ra_
type
==
RA_4_STEP
&&
ra
->
ra_
state
!=
nrRA_WAIT_Msg3
)
continue
;
if
(
no_sig
)
{
...
...
@@ -827,22 +827,29 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
handle_msg3_failed_rx
(
ra
,
i
,
gNB_mac
->
ul_bler
.
harq_round_max
);
continue
;
}
// random access pusch with TC-RNTI
if
(
ra
->
rnti
!=
current_rnti
)
{
LOG_D
(
NR_MAC
,
"expected TC_RNTI %04x to match current RNTI %04x
\n
"
,
ra
->
rnti
,
current_rnti
);
if
((
frameP
==
ra
->
Msg3_frame
)
&&
(
slotP
==
ra
->
Msg3_slot
))
{
LOG_W
(
NR_MAC
,
"Random Access %i failed at state %s (TC_RNTI %04x RNTI %04x)
\n
"
,
i
,
nrra_text
[
ra
->
ra_state
],
ra
->
rnti
,
current_rnti
);
nr_clear_ra_proc
(
ra
);
if
(
ra
->
ra_type
==
RA_2_STEP
)
{
// random access pusch with RA-RNTI
if
(
ra
->
RA_rnti
!=
current_rnti
)
{
LOG_E
(
NR_MAC
,
"expected TC_RNTI %04x to match current RNTI %04x
\n
"
,
ra
->
RA_rnti
,
current_rnti
);
continue
;
}
}
else
{
// random access pusch with TC-RNTI
if
(
ra
->
rnti
!=
current_rnti
)
{
LOG_E
(
NR_MAC
,
"expected TC_RNTI %04x to match current RNTI %04x
\n
"
,
ra
->
rnti
,
current_rnti
);
if
((
frameP
==
ra
->
Msg3_frame
)
&&
(
slotP
==
ra
->
Msg3_slot
))
{
LOG_W
(
NR_MAC
,
"Random Access %i failed at state %s (TC_RNTI %04x RNTI %04x)
\n
"
,
i
,
nrra_text
[
ra
->
ra_state
],
ra
->
rnti
,
current_rnti
);
nr_clear_ra_proc
(
ra
);
}
continue
;
continue
;
}
}
UE
=
UE
?
UE
:
add_new_nr_ue
(
gNB_mac
,
ra
->
rnti
,
ra
->
CellGroup
);
...
...
@@ -882,7 +889,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
process_addmod_bearers_cellGroupConfig
(
&
UE
->
UE_sched_ctrl
,
ra
->
CellGroup
->
rlc_BearerToAddModList
);
nr_clear_ra_proc
(
ra
);
}
else
{
LOG_D
(
NR_MAC
,
"[RAPROC] Received
Msg3:
\n
"
);
LOG_D
(
NR_MAC
,
"[RAPROC] Received
%s:
\n
"
,
ra
->
ra_type
==
RA_2_STEP
?
"MsgA-PUSCH"
:
"Msg3
"
);
for
(
uint32_t
k
=
0
;
k
<
sdu_lenP
;
k
++
)
{
LOG_D
(
NR_MAC
,
"(%i): 0x%x
\n
"
,
k
,
sduP
[
k
]);
}
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
cbbbeb80
...
...
@@ -114,16 +114,18 @@ typedef struct {
}
NR_list_t
;
typedef
enum
{
nrRA_gNB_IDLE
=
0
,
nrRA_Msg2
=
1
,
nrRA_WAIT_Msg3
=
2
,
nrRA_Msg3_retransmission
=
3
,
nrRA_Msg4
=
4
,
nrRA_WAIT_Msg4_ACK
=
5
,
nrRA_gNB_IDLE
,
nrRA_Msg2
,
nrRA_WAIT_MsgA_PUSCH
,
nrRA_WAIT_Msg3
,
nrRA_Msg3_retransmission
,
nrRA_Msg4
,
nrRA_MsgB
,
nrRA_WAIT_Msg4_ACK
,
}
RA_gNB_state_t
;
static
const
char
*
const
nrra_text
[]
=
{
"IDLE"
,
"Msg2"
,
"WAIT_Msg
3"
,
"Msg3_retransmission"
,
"Msg3_dcch_dtch"
,
"Msg4
"
,
"WAIT_Msg4_ACK"
};
{
"IDLE"
,
"Msg2"
,
"WAIT_Msg
A_PUSCH"
,
"WAIT_Msg3"
,
"Msg3_retransmission"
,
"Msg3_dcch_dtch"
,
"Msg4"
,
"MsgB
"
,
"WAIT_Msg4_ACK"
};
typedef
struct
{
int
idx
;
...
...
@@ -219,6 +221,8 @@ typedef struct {
rnti_t
rnti
;
/// RA RNTI allocated from received PRACH
uint16_t
RA_rnti
;
/// MsgB RNTI allocated from received MsgA
uint16_t
MsgB_rnti
;
/// Received UE Contention Resolution Identifier
uint8_t
cont_res_id
[
6
];
/// Msg3 first RB
...
...
@@ -247,6 +251,7 @@ typedef struct {
/// Preambles for contention-free access
NR_preamble_ue_t
preambles
;
int
contention_resolution_timer
;
nr_ra_type_t
ra_type
;
/// CFRA flag
bool
cfra
;
// BWP for RA
...
...
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