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
833d2ae4
Commit
833d2ae4
authored
Dec 17, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved RA-RNTI computation to new function @ MAC UE
parent
b9a49238
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+18
-19
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
833d2ae4
...
@@ -274,6 +274,23 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
...
@@ -274,6 +274,23 @@ 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]
uint16_t
set_ra_rnti
(
NR_UE_MAC_INST_t
*
mac
,
fapi_nr_ul_config_prach_pdu
*
prach_pdu
){
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
;
mac
->
ra_rnti
=
1
+
s_id
+
14
*
t_id
+
1120
*
f_id
+
8960
*
ul_carrier_id
;
LOG_D
(
MAC
,
"Computed ra_RNTI is %x
\n
"
,
mac
->
ra_rnti
);
return
mac
->
ra_rnti
;
}
// This routine implements Section 5.1.2 (UE Random Access Resource Selection)
// 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
// and Section 5.1.3 (Random Access Preamble Transmission) from 3GPP TS 38.321
void
nr_get_prach_resources
(
module_id_t
mod_id
,
void
nr_get_prach_resources
(
module_id_t
mod_id
,
...
@@ -283,7 +300,6 @@ void nr_get_prach_resources(module_id_t mod_id,
...
@@ -283,7 +300,6 @@ void nr_get_prach_resources(module_id_t mod_id,
fapi_nr_ul_config_prach_pdu
*
prach_pdu
,
fapi_nr_ul_config_prach_pdu
*
prach_pdu
,
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
){
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
){
uint8_t
s_id
,
t_id
,
f_id
,
ul_carrier_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
mod_id
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
mod_id
);
NR_RACH_ConfigCommon_t
*
nr_rach_ConfigCommon
=
mac
->
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
;
NR_RACH_ConfigCommon_t
*
nr_rach_ConfigCommon
=
mac
->
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
;
...
@@ -350,31 +366,14 @@ void nr_get_prach_resources(module_id_t mod_id,
...
@@ -350,31 +366,14 @@ void nr_get_prach_resources(module_id_t mod_id,
// todo:
// todo:
// - condition on notification of suspending power ramping counter from lower layer (5.1.3 TS 38.321)
// - condition on notification of suspending power ramping counter from lower layer (5.1.3 TS 38.321)
// - check if SSB or CSI-RS have not changed since the selection in the last RA Preamble tranmission
// - check if SSB or CSI-RS have not changed since the selection in the last RA Preamble tranmission
// - Extend RA_rnti computation (e.g. f_id selection, ul_carrier_id are hardcoded)
if
(
mac
->
RA_PREAMBLE_TRANSMISSION_COUNTER
>
1
)
if
(
mac
->
RA_PREAMBLE_TRANSMISSION_COUNTER
>
1
)
mac
->
RA_PREAMBLE_POWER_RAMPING_COUNTER
++
;
mac
->
RA_PREAMBLE_POWER_RAMPING_COUNTER
++
;
prach_resources
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
=
nr_get_Po_NOMINAL_PUSCH
(
prach_resources
,
mod_id
,
CC_id
);
prach_resources
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
=
nr_get_Po_NOMINAL_PUSCH
(
prach_resources
,
mod_id
,
CC_id
);
// RA-RNTI computation (associated to PRACH occasion in which the RA Preamble is transmitted)
prach_resources
->
ra_RNTI
=
set_ra_rnti
(
mac
,
prach_pdu
);
// 1) this does not apply to contention-free RA Preamble for beam failure recovery request
// 2) getting star_symb, SFN_nbr from table 6.3.3.2-3 (TDD and FR1 scenario)
// ra_RNTI computation
// - 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]
ul_carrier_id
=
0
;
// NUL
f_id
=
prach_pdu
->
num_ra
;
t_id
=
prach_pdu
->
prach_slot
;
s_id
=
prach_pdu
->
prach_start_symbol
;
prach_resources
->
ra_RNTI
=
1
+
s_id
+
14
*
t_id
+
1120
*
f_id
+
8960
*
ul_carrier_id
;
mac
->
ra_rnti
=
prach_resources
->
ra_RNTI
;
LOG_D
(
MAC
,
"Computed ra_RNTI is %x
\n
"
,
prach_resources
->
ra_RNTI
);
}
}
// TbD: RA_attempt_number not used
// TbD: RA_attempt_number not used
...
...
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