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
24fed617
Commit
24fed617
authored
Nov 29, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reworking prach scheduler to use new rach occasion information
parent
8f1661c6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
141 deletions
+46
-141
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+1
-3
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+0
-1
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+11
-11
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+34
-126
No files found.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
24fed617
...
...
@@ -320,7 +320,7 @@ typedef struct {
int
Pc_max
;
}
NR_PRACH_RESOURCES_t
;
typedef
struct
{
typedef
struct
{
float
ssb_per_ro
;
int
preambles_per_ssb
;
}
ssb_ro_preambles_t
;
...
...
@@ -362,8 +362,6 @@ typedef struct {
bool
RA_active
;
/// Random-access preamble index
int
ra_PreambleIndex
;
// When multiple SSBs per RO is configured, this indicates which one is selected in this RO -> this is used to properly compute the PRACH preamble
uint8_t
ssb_nb_in_ro
;
int
zeroCorrelationZoneConfig
;
int
restricted_set_config
;
// selected SSB for RACH (not the SSB-Index but the cumulative index, excluding not trasmitted SSBs)
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
24fed617
...
...
@@ -302,4 +302,3 @@ void release_mac_configuration(NR_UE_MAC_INST_t *mac, NR_UE_MAC_reset_cause_t ca
for
(
int
i
=
mac
->
TAG_list
.
count
;
i
>
0
;
i
--
)
asn_sequence_del
(
&
mac
->
TAG_list
,
i
-
1
,
1
);
}
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
24fed617
...
...
@@ -403,7 +403,7 @@ static void ra_resource_selection(NR_UE_MAC_INST_t *mac)
ssb
=
mac
->
mib_ssb
;
// set the PREAMBLE_INDEX to a ra-PreambleIndex corresponding to the selected SSB
ra
->
ra_PreambleIndex
=
res
->
ra_PreambleIndex
;
ra
->
ro_mask_index
=
cfra
->
resourcesTwoStep_r16
.
ra_ssb_OccasionMaskIndex
;
ra
->
ro_mask_index
=
cfra
->
resourcesTwoStep_r16
.
ra_ssb_OccasionMaskIndex
;
break
;
}
}
...
...
@@ -454,7 +454,7 @@ static void select_prach_occasion(RA_config_t *ra,
int
idx_ssb
=
0
;
int
temp_idx
=
0
;
if
(
ra
->
ssb_ro_config
.
ssb_per_ro
<
1
)
{
num_ros_per_ssb
=
(
int
)
(
1
/
ra
->
ssb_ro_config
.
ssb_per_ro
);
num_ros_per_ssb
=
(
int
)(
1
/
ra
->
ssb_ro_config
.
ssb_per_ro
);
idx_ssb
=
(
rand_r
(
&
seed
)
%
num_ros_per_ssb
);
temp_idx
=
ra
->
ra_ssb
*
num_ros_per_ssb
+
idx_ssb
;
}
else
{
...
...
@@ -508,13 +508,13 @@ static void configure_prach_occasions(NR_UE_MAC_INST_t *mac, int prach_config_in
if
(
fs
->
frame_type
==
TDD
&&
!
check_mixed_slot_prach
(
fs
,
slot
,
start_symbol
,
end_symbol
))
continue
;
for
(
int
f
=
0
;
f
<
num_fd_occasions
;
f
++
)
{
// fd occasions
ra_occasions_period
[
num_ra_occasions_period
]
=
(
prach_occasion_info_t
)
{
.
slot
=
slot
,
.
frame_info
[
0
]
=
prach_info
.
x
,
.
frame_info
[
1
]
=
n
==
0
?
prach_info
.
y
:
prach_info
.
y2
,
.
start_symbol
=
start_symbol
,
.
fdm
=
f
,
.
format
=
prach_info
.
format
};
ra_occasions_period
[
num_ra_occasions_period
]
=
(
prach_occasion_info_t
){
.
slot
=
slot
,
.
frame_info
[
0
]
=
prach_info
.
x
,
.
frame_info
[
1
]
=
n
==
0
?
prach_info
.
y
:
prach_info
.
y2
,
.
start_symbol
=
start_symbol
,
.
fdm
=
f
,
.
format
=
prach_info
.
format
};
LOG_D
(
NR_MAC
,
"RA occasion %d: slot %d start symbol %d fd occasion %d
\n
"
,
num_ra_occasions_period
,
...
...
@@ -533,10 +533,10 @@ static void configure_prach_occasions(NR_UE_MAC_INST_t *mac, int prach_config_in
ra
->
association_periods
=
1
;
int
nb_eq_ssb
=
mac
->
ssb_list
.
nb_tx_ssb
;
if
(
ra
->
ssb_ro_config
.
ssb_per_ro
<
1
)
nb_eq_ssb
*=
(
int
)
(
1
/
ra
->
ssb_ro_config
.
ssb_per_ro
);
nb_eq_ssb
*=
(
int
)(
1
/
ra
->
ssb_ro_config
.
ssb_per_ro
);
int
nb_eq_ro
=
num_ra_occasions_period
;
if
(
ra
->
ssb_ro_config
.
ssb_per_ro
>
1
)
nb_eq_ro
*=
(
int
)
ra
->
ssb_ro_config
.
ssb_per_ro
;
nb_eq_ro
*=
(
int
)
ra
->
ssb_ro_config
.
ssb_per_ro
;
while
(
nb_eq_ssb
>
nb_eq_ro
)
{
// not enough PRACH occasions -> need to increase association period
ra
->
association_periods
<<=
1
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
24fed617
This diff is collapsed.
Click to expand it.
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