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
e689e4b2
Commit
e689e4b2
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
da922910
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
307 additions
and
181 deletions
+307
-181
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+264
-153
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+31
-19
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-2
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 @
e689e4b2
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
e689e4b2
...
...
@@ -557,7 +557,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_E
(
NR_MAC
,
"no RA proc for RNTI 0x%04x in Msg3/
MsgA-
PUSCH
\n
"
,
crc_pdu
->
rnti
);
return
;
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
...
...
@@ -770,7 +770,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
)
{
...
...
@@ -778,22 +778,29 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
nr_clear_ra_proc
(
ra
);
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
);
...
...
@@ -838,8 +845,13 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
nr_clear_ra_proc
(
ra
);
process_addmod_bearers_cellGroupConfig
(
&
UE
->
UE_sched_ctrl
,
ra
->
CellGroup
->
rlc_BearerToAddModList
);
}
else
{
LOG_A
(
NR_MAC
,
"[RAPROC] RA-Msg3 received (sdu_lenP %d)
\n
"
,
sdu_lenP
);
LOG_D
(
NR_MAC
,
"[RAPROC] Received Msg3:
\n
"
);
LOG_A
(
NR_MAC
,
"[RAPROC][%d.%d] RA %s received (sdu_lenP %d)
\n
"
,
frameP
,
slotP
,
ra
->
ra_type
==
RA_2_STEP
?
"MsgA-PUSCH"
:
"Msg3"
,
sdu_lenP
);
LOG_D
(
NR_MAC
,
"[RAPROC] Received %s:
\n
"
,
ra
->
ra_type
==
RA_2_STEP
?
"MsgA-PUSCH"
:
"Msg3"
);
for
(
int
k
=
0
;
k
<
sdu_lenP
;
k
++
)
{
LOG_D
(
NR_MAC
,
"(%i): 0x%x
\n
"
,
k
,
sduP
[
k
]);
}
...
...
@@ -925,7 +937,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
return
;
}
LOG_D
(
NR_MAC
,
"Random Access %i Msg3 CRC did not pass
)
\n
"
,
i
);
LOG_D
(
NR_MAC
,
"Random Access %i Msg3 CRC did not pass
\n
"
,
i
);
ra
->
msg3_round
++
;
ra
->
ra_state
=
nrRA_Msg3_retransmission
;
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
e689e4b2
...
...
@@ -122,8 +122,6 @@ int nr_allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t slo
void
schedule_nr_prach
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
schedule_nr_MsgA_pusch
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
nfapi_nr_prach_pdu_t
*
prach_pdu
);
uint16_t
nr_mac_compute_RIV
(
uint16_t
N_RB_DL
,
uint16_t
RBstart
,
uint16_t
Lcrbs
);
/////// Phy test scheduler ///////
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
e689e4b2
...
...
@@ -113,15 +113,17 @@ 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_MsgB_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
nr_pdsch_AntennaPorts_t
{
int
N1
;
int
N2
;
...
...
@@ -206,6 +208,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
...
...
@@ -234,6 +238,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