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
dc9a2cf1
Commit
dc9a2cf1
authored
Sep 17, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple beam switching procedure based on strongest reported SSB
parent
19c667fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+12
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+10
-7
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
dc9a2cf1
...
...
@@ -3222,6 +3222,18 @@ void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_
}
}
void
beam_selection_procedures
(
gNB_MAC_INST
*
mac
,
NR_UE_info_t
*
UE
)
{
RSRP_report_t
*
rsrp_report
=
&
UE
->
UE_sched_ctrl
.
CSI_report
.
ssb_rsrp_report
;
// simple beam switching algorithm -> we select beam with highest RSRP from CSI report
int
new_bf_index
=
get_fapi_beamforming_index
(
mac
,
rsrp_report
->
resource_id
[
0
]);
if
(
UE
->
UE_beam_index
==
new_bf_index
)
return
;
// no beam change needed
LOG_I
(
NR_MAC
,
"Switching to beam with ID %d corresponding to SSB %d
\n
"
,
new_bf_index
,
rsrp_report
->
resource_id
[
0
]);
UE
->
UE_beam_index
=
new_bf_index
;
}
void
send_initial_ul_rrc_message
(
int
rnti
,
const
uint8_t
*
sdu
,
sdu_size_t
sdu_len
,
void
*
data
)
{
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
0
];
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
dc9a2cf1
...
...
@@ -423,7 +423,8 @@ static uint8_t pickandreverse_bits(uint8_t *payload, uint16_t bitlen, uint8_t st
return
rev_bits
;
}
static
void
evaluate_rsrp_report
(
NR_UE_info_t
*
UE
,
static
void
evaluate_rsrp_report
(
gNB_MAC_INST
*
nrmac
,
NR_UE_info_t
*
UE
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
uint8_t
csi_report_id
,
uint8_t
*
payload
,
...
...
@@ -463,6 +464,7 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE,
AssertFatal
(
false
,
"Invalid RSRP report type
\n
"
);
}
rsrp_report
->
nr_reports
=
csi_report
->
CSI_report_bitlen
.
nb_ssbri_cri
;
uint16_t
curr_payload
;
for
(
int
i
=
0
;
i
<
rsrp_report
->
nr_reports
;
i
++
)
{
int
bitlen
=
csi_report
->
CSI_report_bitlen
.
cri_ssbri_bitlen
;
...
...
@@ -613,7 +615,7 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
frame_t
frame
,
slot_t
slot
,
NR_UE_info_t
*
UE
,
NR_ServingCellConfigCommon_t
*
sc
c
)
gNB_MAC_INST
*
nrma
c
)
{
/** From Table 6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel */
uint8_t
*
payload
=
uci_pdu
->
csi_part1
.
csi_part1_payload
;
...
...
@@ -643,12 +645,13 @@ static void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
if
((
n_slots_frame
*
frame
+
slot
-
offset
)
%
period
==
0
)
{
reportQuantity_type
=
csi_report
->
reportQuantity_type
;
LOG_D
(
MAC
,
"SFN/SF:%d/%d reportQuantity type = %d
\n
"
,
frame
,
slot
,
reportQuantity_type
);
switch
(
reportQuantity_type
){
switch
(
reportQuantity_type
)
{
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
:
evaluate_rsrp_report
(
UE
,
sched_ctrl
,
csi_report_id
,
payload
,
&
cumul_bits
,
reportQuantity_type
);
evaluate_rsrp_report
(
nrmac
,
UE
,
sched_ctrl
,
csi_report_id
,
payload
,
&
cumul_bits
,
reportQuantity_type
);
break
;
case
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
:
evaluate_rsrp_report
(
UE
,
sched_ctrl
,
csi_report_id
,
payload
,
&
cumul_bits
,
reportQuantity_type
);
evaluate_rsrp_report
(
nrmac
,
UE
,
sched_ctrl
,
csi_report_id
,
payload
,
&
cumul_bits
,
reportQuantity_type
);
beam_selection_procedures
(
nrmac
,
UE
);
break
;
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI
:
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
print_report
=
true
;
...
...
@@ -818,7 +821,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
mod_id
];
NR_SCHED_LOCK
(
&
nrmac
->
sched_lock
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
nrmac
->
UE_info
,
uci_234
->
rnti
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
nrmac
->
UE_info
,
uci_234
->
rnti
);
if
(
!
UE
)
{
NR_SCHED_UNLOCK
(
&
nrmac
->
sched_lock
);
LOG_E
(
NR_MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
...
...
@@ -866,7 +869,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
LOG_D
(
NR_MAC
,
"CSI CRC %d
\n
"
,
uci_234
->
csi_part1
.
csi_part1_crc
);
if
(
uci_234
->
csi_part1
.
csi_part1_crc
!=
1
)
{
// API to parse the csi report and store it into sched_ctrl
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_234
,
frame
,
slot
,
UE
,
nrmac
->
common_channels
->
ServingCellConfigCommon
);
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_234
,
frame
,
slot
,
UE
,
nrmac
);
}
free
(
uci_234
->
csi_part1
.
csi_part1_payload
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
dc9a2cf1
...
...
@@ -447,7 +447,7 @@ void fapi_beam_index_allocation(NR_ServingCellConfigCommon_t *scc, gNB_MAC_INST
int
get_fapi_beamforming_index
(
gNB_MAC_INST
*
mac
,
int
ssb_idx
);
NR_beam_alloc_t
beam_allocation_procedure
(
NR_beam_info_t
*
beam_info
,
int
frame
,
int
slot
,
int
beam_index
,
int
slots_per_frame
);
void
reset_beam_status
(
NR_beam_info_t
*
beam_info
,
int
frame
,
int
slot
,
int
beam_index
,
int
slots_per_frame
,
bool
new_beam
);
void
beam_selection_procedures
(
gNB_MAC_INST
*
mac
,
NR_UE_info_t
*
UE
);
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
frameP
,
sub_frame_t
slotP
);
size_t
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
size_t
strlen
,
bool
reset_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