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
2a35d5c2
Commit
2a35d5c2
authored
Mar 01, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Harmonize_RA_RNTI' into integration_2024_w09
parents
40987702
ff7c960b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
32 deletions
+23
-32
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+16
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-2
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+0
-20
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+4
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+1
-9
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
2a35d5c2
...
...
@@ -5325,3 +5325,19 @@ uint16_t compute_PDU_length(uint32_t num_TLV, uint16_t total_length)
pdu_length
+=
(
num_TLV
*
4
)
+
total_length
;
return
pdu_length
;
}
// RA-RNTI computation (associated to PRACH occasion in which the RA Preamble is transmitted)
// - this does not apply to contention-free RA Preamble for beam failure recovery request
// - getting star_symb, SFN_nbr from table 6.3.3.2-3 (TDD and FR1 scenario)
// - s_id is starting symbol of the PRACH occasion [0...14]
// - t_id is the first slot of the PRACH occasion in a system frame [0...80]
// - f_id: index of the PRACH occasion in the frequency domain
// - ul_carrier_id: UL carrier used for RA preamble transmission, hardcoded for NUL carrier
rnti_t
nr_get_ra_rnti
(
uint8_t
s_id
,
uint8_t
t_id
,
uint8_t
f_id
,
uint8_t
ul_carrier_id
)
{
// 3GPP TS 38.321 Section 5.1.3
rnti_t
ra_rnti
=
1
+
s_id
+
14
*
t_id
+
1120
*
f_id
+
8960
*
ul_carrier_id
;
LOG_D
(
MAC
,
"f_id %d t_id %d s_id %d ul_carrier_id %d Computed RA_RNTI is 0x%04X
\n
"
,
f_id
,
t_id
,
s_id
,
ul_carrier_id
,
ra_rnti
);
return
ra_rnti
;
}
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
2a35d5c2
...
...
@@ -322,4 +322,6 @@ uint16_t nr_get_csi_bitlen(nr_csi_report_t *csi_report_template, uint8_t csi_rep
uint16_t
compute_PDU_length
(
uint32_t
num_TLV
,
uint16_t
total_length
);
rnti_t
nr_get_ra_rnti
(
uint8_t
s_id
,
uint8_t
t_id
,
uint8_t
f_id
,
uint8_t
ul_carrier_id
);
#endif
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
2a35d5c2
...
...
@@ -458,8 +458,6 @@ void init_RA(NR_UE_MAC_INST_t *mac,
int16_t
get_prach_tx_power
(
NR_UE_MAC_INST_t
*
mac
);
void
set_ra_rnti
(
NR_UE_MAC_INST_t
*
mac
,
fapi_nr_ul_config_prach_pdu
*
prach_pdu
);
void
nr_Msg1_transmitted
(
NR_UE_MAC_INST_t
*
mac
);
void
nr_Msg3_transmitted
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
CC_id
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_id
);
void
nr_get_msg3_payload
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
*
buf
,
int
TBS_max
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
2a35d5c2
...
...
@@ -504,26 +504,6 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
}
}
// RA-RNTI computation (associated to PRACH occasion in which the RA Preamble is transmitted)
// - this does not apply to contention-free RA Preamble for beam failure recovery request
// - getting star_symb, SFN_nbr from table 6.3.3.2-3 (TDD and FR1 scenario)
// - ul_carrier_id: UL carrier used for RA preamble transmission, hardcoded for NUL carrier
// - f_id: index of the PRACH occasion in the frequency domain
// - s_id is starting symbol of the PRACH occasion [0...14]
// - t_id is the first slot of the PRACH occasion in a system frame [0...80]
void
set_ra_rnti
(
NR_UE_MAC_INST_t
*
mac
,
fapi_nr_ul_config_prach_pdu
*
prach_pdu
){
RA_config_t
*
ra
=
&
mac
->
ra
;
uint8_t
ul_carrier_id
=
0
;
// NUL
uint8_t
f_id
=
prach_pdu
->
num_ra
;
uint8_t
t_id
=
prach_pdu
->
prach_slot
;
uint8_t
s_id
=
prach_pdu
->
prach_start_symbol
;
ra
->
ra_rnti
=
1
+
s_id
+
14
*
t_id
+
1120
*
f_id
+
8960
*
ul_carrier_id
;
LOG_D
(
MAC
,
"Computed ra_RNTI is %x
\n
"
,
ra
->
ra_rnti
);
}
// This routine implements Section 5.1.2 (UE Random Access Resource Selection)
// and Section 5.1.3 (Random Access Preamble Transmission) from 3GPP TS 38.321
// - currently the PRACH preamble is set through RRC configuration for 4-step CFRA mode
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
2a35d5c2
...
...
@@ -2625,7 +2625,10 @@ static void nr_ue_prach_scheduler(NR_UE_MAC_INST_t *mac, frame_t frameP, sub_fra
nr_get_prach_resources
(
mac
,
0
,
0
,
&
ra
->
prach_resources
,
ra
->
rach_ConfigDedicated
);
pdu
->
prach_config_pdu
.
ra_PreambleIndex
=
ra
->
ra_PreambleIndex
;
pdu
->
prach_config_pdu
.
prach_tx_power
=
get_prach_tx_power
(
mac
);
set_ra_rnti
(
mac
,
&
pdu
->
prach_config_pdu
);
mac
->
ra
.
ra_rnti
=
nr_get_ra_rnti
(
pdu
->
prach_config_pdu
.
prach_start_symbol
,
pdu
->
prach_config_pdu
.
prach_slot
,
pdu
->
prach_config_pdu
.
num_ra
,
0
);
release_ul_config
(
pdu
,
false
);
nr_scheduled_response_t
scheduled_response
=
{.
ul_config
=
mac
->
ul_config_request
+
slotP
,
.
mac
=
mac
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
2a35d5c2
...
...
@@ -587,15 +587,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
continue
;
}
uint16_t
ra_rnti
;
// ra_rnti from 5.1.3 in 38.321
// FK: in case of long PRACH the phone seems to expect the subframe number instead of the slot number here.
if
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
prach_RootSequenceIndex
.
present
==
NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l839
)
ra_rnti
=
1
+
symbol
+
(
9
/*slotP*/
*
14
)
+
(
freq_index
*
14
*
80
)
+
(
ul_carrier_id
*
14
*
80
*
8
);
else
ra_rnti
=
1
+
symbol
+
(
slotP
*
14
)
+
(
freq_index
*
14
*
80
)
+
(
ul_carrier_id
*
14
*
80
*
8
);
rnti_t
ra_rnti
=
nr_get_ra_rnti
(
symbol
,
slotP
,
freq_index
,
ul_carrier_id
);
// Configure RA BWP
configure_UE_BWP
(
nr_mac
,
scc
,
NULL
,
ra
,
NULL
,
-
1
,
-
1
);
...
...
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