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
zzha zzha
OpenXG-RAN
Commits
29156240
Commit
29156240
authored
Jan 30, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RSRP measurement: check if index is valid
parent
044d8bc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+21
-7
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
29156240
...
...
@@ -456,13 +456,16 @@ static int checkTargetSSBInTCIStates_pdcchConfig(int ssb_index_t, NR_UE_info_t *
}
//returns the measured RSRP value (upper limit)
static
int
get_measured_rsrp
(
uint8_t
index
)
static
bool
get_measured_rsrp
(
uint8_t
index
,
int
*
rsrp
)
{
//if index is invalid returning minimum rsrp -140
if
(
index
<=
15
||
index
>=
114
)
return
MIN_RSRP_VALUE
;
if
(
index
<=
15
)
return
false
;
if
(
index
>=
114
)
return
false
;
return
L1_SSB_CSI_RSRP_measReport_mapping_38133_10_1_6_1_1
[
index
];
*
rsrp
=
L1_SSB_CSI_RSRP_measReport_mapping_38133_10_1_6_1_1
[
index
];
return
true
;
}
//returns the differential RSRP value (upper limit)
...
...
@@ -478,7 +481,6 @@ static int get_diff_rsrp(uint8_t index, int strongest_rsrp) {
//handles triggering of PDCCH and PDSCH MAC CEs
static
void
tci_handling
(
NR_UE_info_t
*
UE
,
frame_t
frame
,
slot_t
slot
)
{
int
strongest_ssb_rsrp
=
0
;
int
cqi_idx
=
0
;
int
curr_ssb_beam_index
=
0
;
//ToDo: yet to know how to identify the serving ssb beam index
uint8_t
target_ssb_beam_index
=
curr_ssb_beam_index
;
...
...
@@ -521,7 +523,13 @@ static void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot)
}
//if strongest measured RSRP is configured
strongest_ssb_rsrp
=
get_measured_rsrp
(
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
);
int
strongest_ssb_rsrp
;
int
rsrp_index
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
;
bool
valid
=
get_measured_rsrp
(
rsrp_index
,
&
strongest_ssb_rsrp
);
if
(
!
valid
)
{
LOG_E
(
NR_MAC
,
"UE %04x: reported RSRP index %d invalid
\n
"
,
UE
->
rnti
,
rsrp_index
);
return
;
}
ssb_rsrp
[
idx
*
nb_of_csi_ssb_report
]
=
strongest_ssb_rsrp
;
LOG_D
(
NR_MAC
,
"ssb_rsrp = %d
\n
"
,
strongest_ssb_rsrp
);
...
...
@@ -718,7 +726,13 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE,
*
cumul_bits
+=
4
;
}
csi_report
->
nb_of_csi_ssb_report
++
;
int
strongest_ssb_rsrp
=
get_measured_rsrp
(
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
);
int
strongest_ssb_rsrp
;
int
rsrp_index
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
;
bool
valid
=
get_measured_rsrp
(
rsrp_index
,
&
strongest_ssb_rsrp
);
if
(
!
valid
)
{
LOG_E
(
NR_MAC
,
"UE %04x: reported RSRP index %d invalid
\n
"
,
UE
->
rnti
,
rsrp_index
);
return
;
}
NR_mac_stats_t
*
stats
=
&
UE
->
mac_stats
;
// including ssb rsrp in mac stats
stats
->
cumul_rsrp
+=
strongest_ssb_rsrp
;
...
...
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