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
7fc8fe25
Commit
7fc8fe25
authored
1 year ago
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing mapped_ssb_idx (it was not containing SSB index anymore)
parent
a4bb7da1
Branches unavailable
2025.w14
2025.w13
2025.w12
2025.w11
2025.w10
2025.w09
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
v2.2.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+22
-8
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
7fc8fe25
...
@@ -1695,13 +1695,25 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac)
...
@@ -1695,13 +1695,25 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac)
uint32_t
curr_mask
=
cfg
->
ssb_table
.
ssb_mask_list
[
ssb_index
/
32
].
ssb_mask
;
uint32_t
curr_mask
=
cfg
->
ssb_table
.
ssb_mask_list
[
ssb_index
/
32
].
ssb_mask
;
// check if if current SSB is transmitted
// check if if current SSB is transmitted
if
((
curr_mask
>>
(
31
-
(
ssb_index
%
32
)))
&
0x01
)
{
if
((
curr_mask
>>
(
31
-
(
ssb_index
%
32
)))
&
0x01
)
{
ssb_list
->
nb_ssb_per_index
[
ssb_index
]
=
ssb_list
->
nb_tx_ssb
;
ssb_list
->
nb_ssb_per_index
[
ssb_index
]
=
ssb_list
->
nb_tx_ssb
;
ssb_list
->
nb_tx_ssb
++
;
ssb_list
->
nb_tx_ssb
++
;
}
}
else
ssb_list
->
nb_ssb_per_index
[
ssb_index
]
=
-
1
;
}
}
ssb_list
->
tx_ssb
=
calloc
(
ssb_list
->
nb_tx_ssb
,
sizeof
(
*
ssb_list
->
tx_ssb
));
ssb_list
->
tx_ssb
=
calloc
(
ssb_list
->
nb_tx_ssb
,
sizeof
(
*
ssb_list
->
tx_ssb
));
}
}
static
int
get_ssb_idx_from_list
(
ssb_list_info_t
*
ssb_list
,
int
idx
)
{
for
(
int
ssb_index
=
0
;
ssb_index
<
MAX_NB_SSB
;
ssb_index
++
)
{
if
(
ssb_list
->
nb_ssb_per_index
[
ssb_index
]
==
idx
)
return
ssb_index
;
}
AssertFatal
(
false
,
"Couldn't find SSB index in SSB list
\n
"
);
return
0
;
}
// Map the transmitted SSBs to the ROs and create the association pattern according to the config
// Map the transmitted SSBs to the ROs and create the association pattern according to the config
static
void
map_ssb_to_ro
(
NR_UE_MAC_INST_t
*
mac
)
static
void
map_ssb_to_ro
(
NR_UE_MAC_INST_t
*
mac
)
{
{
...
@@ -1790,7 +1802,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
...
@@ -1790,7 +1802,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
// WIP: only one possible association period so the starting PRACH configuration period is automatically 0
// WIP: only one possible association period so the starting PRACH configuration period is automatically 0
// WIP: For the moment, only map each SSB idx once per association period if configuration is multiple SSBs per RO
// WIP: For the moment, only map each SSB idx once per association period if configuration is multiple SSBs per RO
// this is true if no PRACH occasions are conflicting with SSBs nor TDD_UL_DL_ConfigurationCommon schedule
// this is true if no PRACH occasions are conflicting with SSBs nor TDD_UL_DL_ConfigurationCommon schedule
int
ssb_
idx
=
0
;
int
idx
=
0
;
bool
done
=
false
;
bool
done
=
false
;
for
(
int
i
=
0
;
i
<
prach_period
->
nb_of_prach_conf_period
&&
!
done
;
i
++
,
prach_configuration_period_idx
++
)
{
for
(
int
i
=
0
;
i
<
prach_period
->
nb_of_prach_conf_period
&&
!
done
;
i
++
,
prach_configuration_period_idx
++
)
{
prach_period
->
prach_conf_period_list
[
i
]
=
&
prach_assoc_pattern
->
prach_conf_period_list
[
prach_configuration_period_idx
];
prach_period
->
prach_conf_period_list
[
i
]
=
&
prach_assoc_pattern
->
prach_conf_period_list
[
prach_configuration_period_idx
];
...
@@ -1807,9 +1819,10 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
...
@@ -1807,9 +1819,10 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
// Go through the list of transmitted SSBs and map the required amount of SSBs to this RO
// Go through the list of transmitted SSBs and map the required amount of SSBs to this RO
// WIP: For the moment, only map each SSB idx once per association period if configuration is multiple SSBs per RO
// WIP: For the moment, only map each SSB idx once per association period if configuration is multiple SSBs per RO
// this is true if no PRACH occasions are conflicting with SSBs nor TDD_UL_DL_ConfigurationCommon schedule
// this is true if no PRACH occasions are conflicting with SSBs nor TDD_UL_DL_ConfigurationCommon schedule
for
(;
ssb_idx
<
ssb_list
->
nb_tx_ssb
;
ssb_
idx
++
)
{
for
(;
idx
<
ssb_list
->
nb_tx_ssb
;
idx
++
)
{
ssb_info_t
*
tx_ssb
=
ssb_list
->
tx_ssb
+
ssb_
idx
;
ssb_info_t
*
tx_ssb
=
ssb_list
->
tx_ssb
+
idx
;
// Map only the transmitted ssb_idx
// Map only the transmitted ssb_idx
int
ssb_idx
=
get_ssb_idx_from_list
(
ssb_list
,
idx
);
ro_p
->
mapped_ssb_idx
[
ro_p
->
nb_mapped_ssb
]
=
ssb_idx
;
ro_p
->
mapped_ssb_idx
[
ro_p
->
nb_mapped_ssb
]
=
ssb_idx
;
ro_p
->
nb_mapped_ssb
++
;
ro_p
->
nb_mapped_ssb
++
;
AssertFatal
(
MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN
>
tx_ssb
->
nb_mapped_ro
+
1
,
AssertFatal
(
MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN
>
tx_ssb
->
nb_mapped_ro
+
1
,
...
@@ -1830,11 +1843,11 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
...
@@ -1830,11 +1843,11 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
tx_ssb
->
nb_mapped_ro
);
tx_ssb
->
nb_mapped_ro
);
// If all the required SSBs are mapped to this RO, exit the loop of SSBs
// If all the required SSBs are mapped to this RO, exit the loop of SSBs
if
(
ro_p
->
nb_mapped_ssb
==
ssb_rach_ratio
)
{
if
(
ro_p
->
nb_mapped_ssb
==
ssb_rach_ratio
)
{
ssb_
idx
++
;
idx
++
;
break
;
break
;
}
}
}
}
done
=
MAX_NB_SSB
==
ssb_
idx
;
done
=
MAX_NB_SSB
==
idx
;
}
}
}
}
}
}
...
@@ -1846,8 +1859,8 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
...
@@ -1846,8 +1859,8 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
for
(
prach_association_period_t
*
prach_period
=
prach_assoc_pattern
->
prach_association_period_list
;
prach_period
<
end
;
for
(
prach_association_period_t
*
prach_period
=
prach_assoc_pattern
->
prach_association_period_list
;
prach_period
<
end
;
prach_period
++
)
{
prach_period
++
)
{
// Go through the list of transmitted SSBs
// Go through the list of transmitted SSBs
for
(
int
ssb_idx
=
0
;
ssb_idx
<
ssb_list
->
nb_tx_ssb
;
ssb_
idx
++
)
{
for
(
int
idx
=
0
;
idx
<
ssb_list
->
nb_tx_ssb
;
idx
++
)
{
ssb_info_t
*
tx_ssb
=
ssb_list
->
tx_ssb
+
ssb_
idx
;
ssb_info_t
*
tx_ssb
=
ssb_list
->
tx_ssb
+
idx
;
uint8_t
nb_mapped_ro_in_association_period
=
0
;
// Reset the nb of mapped ROs for the new SSB index
uint8_t
nb_mapped_ro_in_association_period
=
0
;
// Reset the nb of mapped ROs for the new SSB index
bool
done
=
false
;
bool
done
=
false
;
// Map all the required ROs to this SSB
// Map all the required ROs to this SSB
...
@@ -1863,6 +1876,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
...
@@ -1863,6 +1876,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac)
for
(
int
ro_in_freq
=
0
;
ro_in_freq
<
slot_map
->
nb_of_prach_occasion_in_freq
&&
!
done
;
ro_in_freq
++
)
{
for
(
int
ro_in_freq
=
0
;
ro_in_freq
<
slot_map
->
nb_of_prach_occasion_in_freq
&&
!
done
;
ro_in_freq
++
)
{
prach_occasion_info_t
*
ro_p
=
prach_occasion_info_t
*
ro_p
=
slot_map
->
prach_occasion
+
ro_in_time
*
slot_map
->
nb_of_prach_occasion_in_freq
+
ro_in_freq
;
slot_map
->
prach_occasion
+
ro_in_time
*
slot_map
->
nb_of_prach_occasion_in_freq
+
ro_in_freq
;
int
ssb_idx
=
get_ssb_idx_from_list
(
ssb_list
,
idx
);
ro_p
->
mapped_ssb_idx
[
0
]
=
ssb_idx
;
ro_p
->
mapped_ssb_idx
[
0
]
=
ssb_idx
;
ro_p
->
nb_mapped_ssb
=
1
;
ro_p
->
nb_mapped_ssb
=
1
;
AssertFatal
(
MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN
>
tx_ssb
->
nb_mapped_ro
+
1
,
AssertFatal
(
MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN
>
tx_ssb
->
nb_mapped_ro
+
1
,
...
...
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