Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
a2bb187a
Commit
a2bb187a
authored
Nov 24, 2021
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_rsrp_meas_report_fix' into integration_2021_wk47_b
parents
1fdefe4f
7b4940a3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
23 deletions
+29
-23
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+19
-15
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+6
-5
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
a2bb187a
...
...
@@ -2106,7 +2106,8 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in
}
// CSI
if
(
mac
->
ra
.
ra_state
==
RA_SUCCEEDED
)
if
(
mac
->
ra
.
ra_state
==
RA_SUCCEEDED
||
get_softmodem_params
()
->
phy_test
==
1
)
O_CSI
=
nr_get_csi_measurements
(
mac
,
frameP
,
slotP
,
pucch
);
// ACKNACK
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
a2bb187a
...
...
@@ -347,7 +347,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
((
slot
==
0
)
&&
(
frame
&
127
)
==
0
)
{
stats_output
[
0
]
=
'\0'
;
dump_mac_stats
(
RC
.
nrmac
[
module_idP
],
stats_output
,
16384
);
dump_mac_stats
(
RC
.
nrmac
[
module_idP
],
stats_output
,
16384
,
true
);
LOG_I
(
NR_MAC
,
"Frame.Slot %d.%d
\n
%s
\n
"
,
frame
,
slot
,
stats_output
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
a2bb187a
...
...
@@ -702,7 +702,6 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
uint8_t
diff_rsrp_idx
=
0
;
uint8_t
i
,
j
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_mac_stats_t
*
stats
=
&
UE_info
->
mac_stats
[
UE_id
];
if
(
n_dl_bwp
<
4
)
pdsch_bwp_id
=
bwp_id
;
...
...
@@ -728,9 +727,6 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
//if strongest measured RSRP is configured
strongest_ssb_rsrp
=
get_measured_rsrp
(
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
RSRP
);
// including ssb rsrp in mac stats
stats
->
cumul_rsrp
+=
strongest_ssb_rsrp
;
stats
->
num_rsrp_meas
++
;
ssb_rsrp
[
idx
*
nb_of_csi_ssb_report
]
=
strongest_ssb_rsrp
;
LOG_D
(
NR_MAC
,
"ssb_rsrp = %d
\n
"
,
strongest_ssb_rsrp
);
...
...
@@ -872,12 +868,12 @@ uint8_t pickandreverse_bits(uint8_t *payload, uint16_t bitlen, uint8_t start_bit
void
evaluate_rsrp_report
(
NR_UE_info_t
*
UE_info
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
UE_id
,
uint8_t
csi_report_id
,
uint8_t
*
payload
,
int
*
cumul_bits
,
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
){
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
UE_id
,
uint8_t
csi_report_id
,
uint8_t
*
payload
,
int
*
cumul_bits
,
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
){
uint8_t
cri_ssbri_bitlen
=
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
CSI_report_bitlen
.
cri_ssbri_bitlen
;
uint16_t
curr_payload
;
...
...
@@ -907,14 +903,17 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
curr_payload
=
pickandreverse_bits
(
payload
,
cri_ssbri_bitlen
,
*
cumul_bits
);
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
*
(
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
SSB_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
else
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
*
(
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
CSI_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
*
cumul_bits
+=
cri_ssbri_bitlen
;
LOG_D
(
MAC
,
"SSB_index = %d
\n
"
,
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
if
(
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
reportQuantity_type
==
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
)
LOG_D
(
MAC
,
"CSI-RS Resource Indicator = %d
\n
"
,
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
else
LOG_D
(
MAC
,
"SSB Resource Indicator = %d
\n
"
,
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
}
curr_payload
=
pickandreverse_bits
(
payload
,
7
,
*
cumul_bits
);
...
...
@@ -927,9 +926,14 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
*
cumul_bits
+=
4
;
}
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
nb_of_csi_ssb_report
++
;
int
strongest_ssb_rsrp
=
get_measured_rsrp
(
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
RSRP
);
NR_mac_stats_t
*
stats
=
&
UE_info
->
mac_stats
[
UE_id
];
// including ssb rsrp in mac stats
stats
->
cumul_rsrp
+=
strongest_ssb_rsrp
;
stats
->
num_rsrp_meas
++
;
LOG_D
(
MAC
,
"rsrp_id = %d rsrp = %d
\n
"
,
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
RSRP
,
get_measured_rsrp
(
sched_ctrl
->
CSI_report
[
idx
].
choice
.
ssb_cri_report
.
RSRP
)
);
strongest_ssb_rsrp
);
}
...
...
@@ -1156,7 +1160,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
}
if
((
uci_234
->
pduBitmap
>>
2
)
&
0x01
)
{
//API to parse the csi report and store it into sched_ctrl
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_234
,
frame
,
slot
,
UE_id
,
mod_id
);
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_234
,
frame
,
slot
,
UE_id
,
mod_id
);
//TCI handling function
tci_handling
(
mod_id
,
UE_id
,
frame
,
slot
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
a2bb187a
...
...
@@ -442,5 +442,5 @@ bool nr_find_nb_rb(uint16_t Qm,
void
nr_sr_reporting
(
int
Mod_idP
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
);
void
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
,
bool
reset_rsrp
);
#endif
/*__LAYER2_NR_MAC_PROTO_H__*/
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
a2bb187a
...
...
@@ -57,7 +57,7 @@ void *nrmac_stats_thread(void *arg) {
AssertFatal
(
fd
!=
NULL
,
"Cannot open nrMAC_stats.log, error %s
\n
"
,
strerror
(
errno
));
while
(
oai_exit
==
0
)
{
dump_mac_stats
(
gNB
,
output
,
MACSTATSSTRLEN
);
dump_mac_stats
(
gNB
,
output
,
MACSTATSSTRLEN
,
false
);
fprintf
(
fd
,
"%s
\n
"
,
output
);
fflush
(
fd
);
usleep
(
200000
);
...
...
@@ -71,7 +71,7 @@ void clear_mac_stats(gNB_MAC_INST *gNB) {
memset
((
void
*
)
gNB
->
UE_info
.
mac_stats
,
0
,
MAX_MOBILES_PER_GNB
*
sizeof
(
NR_mac_stats_t
));
}
void
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
)
void
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
,
bool
reset_rsrp
)
{
NR_UE_info_t
*
UE_info
=
&
gNB
->
UE_info
;
int
num
=
1
;
...
...
@@ -102,9 +102,10 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
stats
->
pucch0_DTX
,
sched_ctrl
->
dl_bler_stats
.
bler
,
sched_ctrl
->
dl_bler_stats
.
mcs
);
stats
->
num_rsrp_meas
=
0
;
stats
->
cumul_rsrp
=
0
;
if
(
reset_rsrp
)
{
stats
->
num_rsrp_meas
=
0
;
stats
->
cumul_rsrp
=
0
;
}
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: dlsch_total_bytes %"
PRIu64
"
\n
"
,
UE_id
,
stats
->
dlsch_total_bytes
);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: ulsch_rounds %"
PRIu64
"/%"
PRIu64
"/%"
PRIu64
"/%"
PRIu64
", ulsch_DTX %d, ulsch_errors %"
PRIu64
"
\n
"
,
UE_id
,
...
...
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