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
f2a7fb53
Commit
f2a7fb53
authored
Dec 03, 2025
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix computation of RA occasions and association period in gNB
parent
91e7030c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+12
-5
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
f2a7fb53
...
...
@@ -178,7 +178,7 @@ void find_SSB_and_RO_available(gNB_MAC_INST *nrmac)
float
num_ssb_per_RO
=
ssb_per_rach_occasion
[
cfg
->
prach_config
.
ssb_per_rach
.
value
];
uint8_t
fdm
=
cfg
->
prach_config
.
num_prach_fd_occasions
.
value
;
uint64_t
L_ssb
=
(((
uint64_t
)
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
)
<<
32
)
|
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
;
uint32_t
total_RA_occasions
=
prach_info
.
N_RA_sfn
*
prach_info
.
N_t_slot
*
prach_info
.
N_RA_slot
*
fdm
;
cc
->
total_prach_occasions_per_config_period
=
prach_info
.
N_RA_sfn
*
prach_info
.
N_t_slot
*
prach_info
.
N_RA_slot
*
fdm
;
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
if
((
L_ssb
>>
(
63
-
i
))
&
0x01
)
{
// only if the bit of L_ssb at current ssb index is 1
...
...
@@ -187,15 +187,22 @@ void find_SSB_and_RO_available(gNB_MAC_INST *nrmac)
}
}
cc
->
total_prach_occasions_per_config_period
=
total_RA_occasions
;
// An association period, starting from frame 0, for mapping SS/PBCH block indexes to PRACH occasions is the smallest
// value in the set determined by the PRACH configuration period according Table 8.1-1 of 38.213
// such that all tx SSB indexes are mapped at least once to the PRACH occasions within the association period
// An association pattern period includes one or more association periods and is determined
// so that a pattern between PRACH occasions and SS/PBCH block indexes repeats at most every 160 msec
int
total_RA_occasions
=
0
;
for
(
int
i
=
1
;
(
1
<<
(
i
-
1
))
<=
prach_info
.
max_association_period
;
i
++
)
{
cc
->
max_association_period
=
(
1
<<
(
i
-
1
));
total_RA_occasions
=
total_RA_occasions
*
cc
->
max_association_period
;
if
(
total_RA_occasions
>=
(
int
)
(
num_active_ssb
/
num_ssb_per_RO
))
{
int
temp_RA_occasions
=
cc
->
total_prach_occasions_per_config_period
*
cc
->
max_association_period
;
if
(
temp_RA_occasions
>=
(
int
)
(
num_active_ssb
/
num_ssb_per_RO
))
{
total_RA_occasions
=
temp_RA_occasions
;
repetition
=
(
uint16_t
)((
total_RA_occasions
*
num_ssb_per_RO
)
/
num_active_ssb
);
break
;
}
}
AssertFatal
(
total_RA_occasions
>
0
,
"Couldn't find a valid association period for PRACH occasions
\n
"
);
unused_RA_occasion
=
total_RA_occasions
-
(
int
)((
num_active_ssb
*
repetition
)
/
num_ssb_per_RO
);
cc
->
total_prach_occasions
=
total_RA_occasions
-
unused_RA_occasion
;
...
...
@@ -756,7 +763,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
// return current SSB order in the list of tranmitted SSBs
int
n_ssb
=
ssb_index_from_prach
(
module_idP
,
frame
,
slot
,
preamble_index
,
freq_index
,
symbol
);
UE
->
UE_beam_index
=
get_fapi_beamforming_index
(
nr_mac
,
cc
->
ssb_index
[
n_ssb
]);
LOG_I
(
NR_MAC
,
"UE %04x: Sync beam index %d
\n
"
,
UE
->
rnti
,
UE
->
UE_beam_index
);
NR_SCHED_UNLOCK
(
&
nr_mac
->
sched_lock
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC
,
0
);
}
...
...
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