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
lizhongxiao
OpenXG-RAN
Commits
ae0c02b2
Commit
ae0c02b2
authored
Sep 10, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some rearrangements in function to schedule csi reporting
parent
0113d992
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
103 deletions
+111
-103
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+111
-103
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
ae0c02b2
...
@@ -1561,93 +1561,100 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
...
@@ -1561,93 +1561,100 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
uint16_t
get_csi_bitlen
(
int
Mod_idP
,
uint16_t
get_csi_bitlen
(
int
Mod_idP
,
int
UE_id
)
{
int
UE_id
,
uint8_t
csi_report_id
)
{
uint8_t
csi_report_id
=
0
;
uint16_t
csi_bitlen
=
0
;
uint16_t
csi_bitlen
=
0
;
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
CRI_SSBRI_RSRP_bitlen_t
*
CSI_report_bitlen
=
NULL
;
//This might need to be modified for Aperiodic CSI-RS measurements
CRI_SSBRI_RSRP_bitlen_t
*
CSI_report_bitlen
=
NULL
;
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
UE_list
->
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
CSI_report_bitlen
=
&
(
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
CSI_report_bitlen
[
0
]);
for
(
csi_report_id
=
0
;
csi_report_id
<
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
){
csi_bitlen
=
((
CSI_report_bitlen
->
cri_ssbri_bitlen
*
CSI_report_bitlen
->
nb_ssbri_cri
)
+
CSI_report_bitlen
=
&
(
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
CSI_report_bitlen
[
0
]);
//This might need to be moodif for Aperiodic CSI-RS measurements
csi_bitlen
+=
((
CSI_report_bitlen
->
cri_ssbri_bitlen
*
CSI_report_bitlen
->
nb_ssbri_cri
)
+
CSI_report_bitlen
->
rsrp_bitlen
+
(
CSI_report_bitlen
->
diff_rsrp_bitlen
*
CSI_report_bitlen
->
rsrp_bitlen
+
(
CSI_report_bitlen
->
diff_rsrp_bitlen
*
(
CSI_report_bitlen
->
nb_ssbri_cri
-
1
))
*
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
nb_of_csi_ssb_report
);
(
CSI_report_bitlen
->
nb_ssbri_cri
-
1
))
*
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
nb_of_csi_ssb_report
);
}
return
csi_bitlen
;
return
csi_bitlen
;
}
}
void
nr_csi_meas_reporting
(
int
Mod_idP
,
void
csi_period_offset
(
NR_CSI_ReportConfig_t
*
csirep
,
int
UE_id
,
int
*
period
,
int
*
offset
)
{
frame_t
frame
,
sub_frame_t
slot
,
int
slots_per_tdd
,
int
ul_slots
,
int
n_slots_frame
)
{
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
NR_sched_pucch
*
curr_pucch
;
NR_PUCCH_ResourceSet_t
*
pucchresset
;
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_list
->
secondaryCellGroup
[
UE_id
];
NR_CSI_MeasConfig_t
*
csi_measconfig
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
NR_BWP_Uplink_t
*
ubwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
];
NR_PUCCH_Config_t
*
pucch_Config
=
ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
AssertFatal
(
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
>
0
,
"NO CSI report configuration available"
);
// TODO for now we assume only one csi report config available
NR_CSI_ReportConfig_t
*
csirep
=
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
0
];
AssertFatal
(
csirep
->
reportConfigType
.
choice
.
periodic
!=
NULL
,
"Only periodic CSI reporting is implemented currently"
);
int
period
,
offset
;
NR_CSI_ReportPeriodicityAndOffset_PR
p_and_o
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
;
NR_CSI_ReportPeriodicityAndOffset_PR
p_and_o
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
;
switch
(
p_and_o
){
switch
(
p_and_o
){
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots4
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots4
:
period
=
4
;
*
period
=
4
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots4
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots4
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots5
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots5
:
period
=
5
;
*
period
=
5
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots5
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots5
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots8
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots8
:
period
=
8
;
*
period
=
8
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots8
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots8
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots10
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots10
:
period
=
10
;
*
period
=
10
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots10
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots10
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots16
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots16
:
period
=
16
;
*
period
=
16
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots16
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots16
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots20
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots20
:
period
=
20
;
*
period
=
20
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots20
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots20
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots40
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots40
:
period
=
40
;
*
period
=
40
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots40
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots40
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots80
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots80
:
period
=
80
;
*
period
=
80
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots80
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots80
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots160
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots160
:
period
=
160
;
*
period
=
160
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots160
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots160
;
break
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
:
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
:
period
=
320
;
*
period
=
320
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
;
break
;
break
;
default:
default:
AssertFatal
(
1
==
0
,
"No periodicity and offset resource found in CSI report"
);
AssertFatal
(
1
==
0
,
"No periodicity and offset resource found in CSI report"
);
}
}
}
void
nr_csi_meas_reporting
(
int
Mod_idP
,
int
UE_id
,
frame_t
frame
,
sub_frame_t
slot
,
int
slots_per_tdd
,
int
ul_slots
,
int
n_slots_frame
)
{
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
NR_sched_pucch
*
curr_pucch
;
NR_PUCCH_ResourceSet_t
*
pucchresset
;
NR_CSI_ReportConfig_t
*
csirep
;
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_list
->
secondaryCellGroup
[
UE_id
];
NR_CSI_MeasConfig_t
*
csi_measconfig
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
NR_BWP_Uplink_t
*
ubwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
];
NR_PUCCH_Config_t
*
pucch_Config
=
ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
AssertFatal
(
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
>
0
,
"NO CSI report configuration available"
);
for
(
int
csi_report_id
=
0
;
csi_report_id
<
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
){
csirep
=
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
];
AssertFatal
(
csirep
->
reportConfigType
.
choice
.
periodic
!=
NULL
,
"Only periodic CSI reporting is implemented currently"
);
int
period
,
offset
;
csi_period_offset
(
csirep
,
&
period
,
&
offset
);
// schedule csi measurement reception according to 5.2.1.4 in 38.214
// schedule csi measurement reception according to 5.2.1.4 in 38.214
if
(
((
n_slots_frame
*
frame
+
slot
-
offset
)
%
period
)
==
0
)
{
if
(
((
n_slots_frame
*
frame
+
slot
-
offset
)
%
period
)
==
0
)
{
...
@@ -1696,10 +1703,11 @@ void nr_csi_meas_reporting(int Mod_idP,
...
@@ -1696,10 +1703,11 @@ void nr_csi_meas_reporting(int Mod_idP,
}
}
}
}
}
}
curr_pucch
->
csi_bits
=
get_csi_bitlen
(
Mod_idP
,
UE
_id
);
// TODO function to compute CSI meas report bit size
curr_pucch
->
csi_bits
+=
get_csi_bitlen
(
Mod_idP
,
UE_id
,
csi_report
_id
);
// TODO function to compute CSI meas report bit size
curr_pucch
->
frame
=
frame
;
curr_pucch
->
frame
=
frame
;
curr_pucch
->
ul_slot
=
slot
;
curr_pucch
->
ul_slot
=
slot
;
}
}
}
}
}
...
...
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