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
dc7fc1fd
Commit
dc7fc1fd
authored
Apr 06, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
brute force beam allocation for periodic channels
parent
f3fb01d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+6
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+13
-8
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
dc7fc1fd
...
@@ -2747,19 +2747,19 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo
...
@@ -2747,19 +2747,19 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo
nfapi_nr_dl_tti_request_body_t
*
dl_req
=
&
DL_req
->
dl_tti_request_body
;
nfapi_nr_dl_tti_request_body_t
*
dl_req
=
&
DL_req
->
dl_tti_request_body
;
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
)
{
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
// transmitting CSI-RS only for current BWP
// transmitting CSI-RS only for current BWP
if
(
nzpcsi
->
nzp_CSI_RS_ResourceId
!=
*
nzp
)
if
(
nzpcsi
->
nzp_CSI_RS_ResourceId
!=
*
nzp
)
continue
;
continue
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
csi_period_offset
(
NULL
,
nzpcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
csi_period_offset
(
NULL
,
nzpcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
if
((
frame
*
n_slots_frame
+
slot
-
offset
)
%
period
==
0
)
{
if
((
frame
*
n_slots_frame
+
slot
-
offset
)
%
period
==
0
)
{
bool
ret
=
beam_allocation_procedure
(
&
gNB_mac
->
beam_info
,
frame
,
slot
,
UE
->
UE_beam_index
,
n_slots_frame
);
LOG_D
(
NR_MAC
,
"Scheduling CSI-RS in frame %d slot %d Resource ID %ld
\n
"
,
AssertFatal
(
ret
,
"Couldn't allocate periodic CSI-RS in a beam
\n
"
);
frame
,
slot
,
nzpcsi
->
nzp_CSI_RS_ResourceId
);
LOG_D
(
NR_MAC
,
"Scheduling CSI-RS in frame %d slot %d Resource ID %ld
\n
"
,
frame
,
slot
,
nzpcsi
->
nzp_CSI_RS_ResourceId
);
UE_info
->
sched_csirs
|=
(
1
<<
dl_bwp
->
bwp_id
);
UE_info
->
sched_csirs
|=
(
1
<<
dl_bwp
->
bwp_id
);
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_csirs_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_csirs_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
View file @
dc7fc1fd
...
@@ -585,6 +585,8 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot)
...
@@ -585,6 +585,8 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot)
// Check if UE will transmit the SRS in this frame
// Check if UE will transmit the SRS in this frame
if
((
sched_frame
*
n_slots_frame
+
sched_slot
-
offset
)
%
period
==
0
)
{
if
((
sched_frame
*
n_slots_frame
+
sched_slot
-
offset
)
%
period
==
0
)
{
bool
ret
=
beam_allocation_procedure
(
&
nrmac
->
beam_info
,
sched_frame
,
sched_slot
,
UE
->
UE_beam_index
,
n_slots_frame
);
AssertFatal
(
ret
,
"Couldn't allocate periodic SRS in a beam
\n
"
);
LOG_D
(
NR_MAC
,
" %d.%d Scheduling SRS reception for %d.%d
\n
"
,
frame
,
slot
,
sched_frame
,
sched_slot
);
LOG_D
(
NR_MAC
,
" %d.%d Scheduling SRS reception for %d.%d
\n
"
,
frame
,
slot
,
sched_frame
,
sched_slot
);
nr_fill_nfapi_srs
(
module_id
,
CC_id
,
UE
,
sched_frame
,
sched_slot
,
srs_resource_set
,
srs_resource
);
nr_fill_nfapi_srs
(
module_id
,
CC_id
,
UE
,
sched_frame
,
sched_slot
,
srs_resource_set
,
srs_resource
);
sched_ctrl
->
sched_srs
.
frame
=
sched_frame
;
sched_ctrl
->
sched_srs
.
frame
=
sched_frame
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
dc7fc1fd
...
@@ -207,15 +207,13 @@ void nr_schedule_pucch(gNB_MAC_INST *nrmac,
...
@@ -207,15 +207,13 @@ void nr_schedule_pucch(gNB_MAC_INST *nrmac,
}
}
}
}
void
nr_csi_meas_reporting
(
int
Mod_idP
,
void
nr_csi_meas_reporting
(
int
Mod_idP
,
frame_t
frame
,
sub_frame_t
slot
)
frame_t
frame
,
sub_frame_t
slot
)
{
{
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
Mod_idP
];
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
Mod_idP
];
NR_SCHED_ENSURE_LOCKED
(
&
nrmac
->
sched_lock
);
NR_SCHED_ENSURE_LOCKED
(
&
nrmac
->
sched_lock
);
UE_iterator
(
nrmac
->
UE_info
.
list
,
UE
)
{
UE_iterator
(
nrmac
->
UE_info
.
list
,
UE
)
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_UL_BWP_t
*
ul_bwp
=
&
UE
->
current_UL_BWP
;
NR_UE_UL_BWP_t
*
ul_bwp
=
&
UE
->
current_UL_BWP
;
const
int
n_slots_frame
=
nr_slots_per_frame
[
ul_bwp
->
scs
];
const
int
n_slots_frame
=
nr_slots_per_frame
[
ul_bwp
->
scs
];
...
@@ -229,11 +227,10 @@ void nr_csi_meas_reporting(int Mod_idP,
...
@@ -229,11 +227,10 @@ void nr_csi_meas_reporting(int Mod_idP,
"NO CSI report configuration available"
);
"NO CSI report configuration available"
);
NR_PUCCH_Config_t
*
pucch_Config
=
ul_bwp
->
pucch_Config
;
NR_PUCCH_Config_t
*
pucch_Config
=
ul_bwp
->
pucch_Config
;
for
(
int
csi_report_id
=
0
;
csi_report_id
<
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
){
for
(
int
csi_report_id
=
0
;
csi_report_id
<
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
)
{
NR_CSI_ReportConfig_t
*
csirep
=
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
];
NR_CSI_ReportConfig_t
*
csirep
=
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
];
AssertFatal
(
csirep
->
reportConfigType
.
choice
.
periodic
,
AssertFatal
(
csirep
->
reportConfigType
.
choice
.
periodic
,
"Only periodic CSI reporting is implemented currently
\n
"
);
"Only periodic CSI reporting is implemented currently
\n
"
);
const
NR_PUCCH_CSI_Resource_t
*
pucchcsires
=
csirep
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
.
array
[
0
];
const
NR_PUCCH_CSI_Resource_t
*
pucchcsires
=
csirep
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
.
array
[
0
];
if
(
pucchcsires
->
uplinkBandwidthPartId
!=
ul_bwp
->
bwp_id
)
if
(
pucchcsires
->
uplinkBandwidthPartId
!=
ul_bwp
->
bwp_id
)
...
@@ -247,7 +244,8 @@ void nr_csi_meas_reporting(int Mod_idP,
...
@@ -247,7 +244,8 @@ void nr_csi_meas_reporting(int Mod_idP,
// prepare to schedule csi measurement reception according to 5.2.1.4 in 38.214
// prepare to schedule csi measurement reception according to 5.2.1.4 in 38.214
if
((
sched_frame
*
n_slots_frame
+
sched_slot
-
offset
)
%
period
!=
0
)
if
((
sched_frame
*
n_slots_frame
+
sched_slot
-
offset
)
%
period
!=
0
)
continue
;
continue
;
bool
ret
=
beam_allocation_procedure
(
&
nrmac
->
beam_info
,
sched_frame
,
sched_slot
,
UE
->
UE_beam_index
,
n_slots_frame
);
AssertFatal
(
ret
,
"Couldn't allocate periodic CSI reporting in a beam
\n
"
);
AssertFatal
(
is_xlsch_in_slot
(
nrmac
->
ulsch_slot_bitmap
[
sched_slot
/
64
],
sched_slot
),
"CSI reporting slot %d is not set for an uplink slot
\n
"
,
sched_slot
);
AssertFatal
(
is_xlsch_in_slot
(
nrmac
->
ulsch_slot_bitmap
[
sched_slot
/
64
],
sched_slot
),
"CSI reporting slot %d is not set for an uplink slot
\n
"
,
sched_slot
);
LOG_D
(
NR_MAC
,
"CSI reporting in frame %d slot %d CSI report ID %ld
\n
"
,
sched_frame
,
sched_slot
,
csirep
->
reportConfigId
);
LOG_D
(
NR_MAC
,
"CSI reporting in frame %d slot %d CSI report ID %ld
\n
"
,
sched_frame
,
sched_slot
,
csirep
->
reportConfigId
);
...
@@ -1439,6 +1437,13 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
...
@@ -1439,6 +1437,13 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
LOG_E
(
NR_MAC
,
"Cannot schedule SR. PRBs not available
\n
"
);
LOG_E
(
NR_MAC
,
"Cannot schedule SR. PRBs not available
\n
"
);
continue
;
continue
;
}
}
ret
=
beam_allocation_procedure
(
&
nrmac
->
beam_info
,
SFN
,
slot
,
UE
->
UE_beam_index
,
n_slots_frame
);
// for analog beamforming
// if there is no beam allocation available for SR we need to schedule anyway
// it is unlikely to receive the SR if not on the right beam
// but we can afford to lose few SR occasions without breaking the connection
if
(
!
ret
)
LOG_D
(
NR_MAC
,
"Couldn't allocate a beam for SR
\n
"
);
curr_pucch
->
frame
=
SFN
;
curr_pucch
->
frame
=
SFN
;
curr_pucch
->
ul_slot
=
slot
;
curr_pucch
->
ul_slot
=
slot
;
curr_pucch
->
sr_flag
=
true
;
curr_pucch
->
sr_flag
=
true
;
...
...
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