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
Michael Black
OpenXG-RAN
Commits
ae0c02b2
Commit
ae0c02b2
authored
5 years ago
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some rearrangements in function to schedule csi reporting
parent
0113d992
Branches unavailable
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
setparam
flexran-eol
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
Changes
1
Hide 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,24 +1561,73 @@ void get_pdsch_to_harq_feedback(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
;
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
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
UE_list
->
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
for
(
csi_report_id
=
0
;
csi_report_id
<
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
){
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
->
nb_ssbri_cri
-
1
))
*
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
nb_of_csi_ssb_report
);
}
CRI_SSBRI_RSRP_bitlen_t
*
CSI_report_bitlen
=
NULL
;
CSI_report_bitlen
=
&
(
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
CSI_report_bitlen
[
0
]);
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
->
nb_ssbri_cri
-
1
))
*
UE_list
->
csi_report_template
[
UE_id
][
csi_report_id
].
nb_of_csi_ssb_report
);
return
csi_bitlen
;
}
void
csi_period_offset
(
NR_CSI_ReportConfig_t
*
csirep
,
int
*
period
,
int
*
offset
)
{
NR_CSI_ReportPeriodicityAndOffset_PR
p_and_o
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
;
switch
(
p_and_o
){
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots4
:
*
period
=
4
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots4
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots5
:
*
period
=
5
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots5
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots8
:
*
period
=
8
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots8
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots10
:
*
period
=
10
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots10
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots16
:
*
period
=
16
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots16
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots20
:
*
period
=
20
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots20
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots40
:
*
period
=
40
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots40
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots80
:
*
period
=
80
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots80
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots160
:
*
period
=
160
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots160
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
:
*
period
=
320
;
*
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
;
break
;
default:
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
,
...
...
@@ -1587,118 +1636,77 @@ void nr_csi_meas_reporting(int Mod_idP,
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"
);
// 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
;
for
(
int
csi_report_id
=
0
;
csi_report_id
<
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
){
switch
(
p_and_o
){
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots4
:
period
=
4
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots4
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots5
:
period
=
5
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots5
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots8
:
period
=
8
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots8
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots10
:
period
=
10
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots10
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots16
:
period
=
16
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots16
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots20
:
period
=
20
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots20
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots40
:
period
=
40
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots40
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots80
:
period
=
80
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots80
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots160
:
period
=
160
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots160
;
break
;
case
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
:
period
=
320
;
offset
=
csirep
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
;
break
;
default:
AssertFatal
(
1
==
0
,
"No periodicity and offset resource found in CSI report"
);
}
// schedule csi measurement reception according to 5.2.1.4 in 38.214
if
(
((
n_slots_frame
*
frame
+
slot
-
offset
)
%
period
)
==
0
)
{
csirep
=
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
];
curr_pucch
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
slot
-
slots_per_tdd
+
ul_slots
];
AssertFatal
(
csirep
->
reportConfigType
.
choice
.
periodic
!=
NULL
,
"Only periodic CSI reporting is implemented currently"
);
int
period
,
offset
;
csi_period_offset
(
csirep
,
&
period
,
&
offset
);
NR_PUCCH_CSI_Resource_t
*
pucchcsires
=
csirep
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
.
array
[
0
];
// schedule csi measurement reception according to 5.2.1.4 in 38.214
if
(
((
n_slots_frame
*
frame
+
slot
-
offset
)
%
period
)
==
0
)
{
int
found
=
-
1
;
pucchresset
=
pucch_Config
->
resourceSetToAddModList
->
list
.
array
[
1
];
// set with formats >1
int
n_list
=
pucchresset
->
resourceList
.
list
.
count
;
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
if
(
*
pucchresset
->
resourceList
.
list
.
array
[
i
]
==
pucchcsires
->
pucch_Resource
)
found
=
i
;
}
AssertFatal
(
found
>-
1
,
"CSI resource not found among PUCCH resources"
);
curr_pucch
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
slot
-
slots_per_tdd
+
ul_slots
];
curr_pucch
->
resource_indicator
=
found
;
NR_PUCCH_CSI_Resource_t
*
pucchcsires
=
csirep
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
.
array
[
0
]
;
n_list
=
pucch_Config
->
resourceToAddModList
->
list
.
count
;
int
found
=
-
1
;
pucchresset
=
pucch_Config
->
resourceSetToAddModList
->
list
.
array
[
1
];
// set with formats >1
int
n_list
=
pucchresset
->
resourceList
.
list
.
count
;
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
if
(
*
pucchresset
->
resourceList
.
list
.
array
[
i
]
==
pucchcsires
->
pucch_Resource
)
found
=
i
;
}
AssertFatal
(
found
>-
1
,
"CSI resource not found among PUCCH resources"
);
// going through the list of PUCCH resources to find the one indexed by resource_id
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
NR_PUCCH_Resource_t
*
pucchres
=
pucch_Config
->
resourceToAddModList
->
list
.
array
[
i
];
if
(
pucchres
->
pucch_ResourceId
==
*
pucchresset
->
resourceList
.
list
.
array
[
found
])
{
switch
(
pucchres
->
format
.
present
){
case
NR_PUCCH_Resource__format_PR_format2
:
if
(
pucch_Config
->
format2
->
choice
.
setup
->
simultaneousHARQ_ACK_CSI
==
NULL
)
curr_pucch
->
simultaneous_harqcsi
=
false
;
else
curr_pucch
->
simultaneous_harqcsi
=
true
;
break
;
case
NR_PUCCH_Resource__format_PR_format3
:
if
(
pucch_Config
->
format3
->
choice
.
setup
->
simultaneousHARQ_ACK_CSI
==
NULL
)
curr_pucch
->
simultaneous_harqcsi
=
false
;
else
curr_pucch
->
simultaneous_harqcsi
=
true
;
break
;
case
NR_PUCCH_Resource__format_PR_format4
:
if
(
pucch_Config
->
format4
->
choice
.
setup
->
simultaneousHARQ_ACK_CSI
==
NULL
)
curr_pucch
->
simultaneous_harqcsi
=
false
;
else
curr_pucch
->
simultaneous_harqcsi
=
true
;
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid PUCCH format type"
);
curr_pucch
->
resource_indicator
=
found
;
n_list
=
pucch_Config
->
resourceToAddModList
->
list
.
count
;
// going through the list of PUCCH resources to find the one indexed by resource_id
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
NR_PUCCH_Resource_t
*
pucchres
=
pucch_Config
->
resourceToAddModList
->
list
.
array
[
i
];
if
(
pucchres
->
pucch_ResourceId
==
*
pucchresset
->
resourceList
.
list
.
array
[
found
])
{
switch
(
pucchres
->
format
.
present
){
case
NR_PUCCH_Resource__format_PR_format2
:
if
(
pucch_Config
->
format2
->
choice
.
setup
->
simultaneousHARQ_ACK_CSI
==
NULL
)
curr_pucch
->
simultaneous_harqcsi
=
false
;
else
curr_pucch
->
simultaneous_harqcsi
=
true
;
break
;
case
NR_PUCCH_Resource__format_PR_format3
:
if
(
pucch_Config
->
format3
->
choice
.
setup
->
simultaneousHARQ_ACK_CSI
==
NULL
)
curr_pucch
->
simultaneous_harqcsi
=
false
;
else
curr_pucch
->
simultaneous_harqcsi
=
true
;
break
;
case
NR_PUCCH_Resource__format_PR_format4
:
if
(
pucch_Config
->
format4
->
choice
.
setup
->
simultaneousHARQ_ACK_CSI
==
NULL
)
curr_pucch
->
simultaneous_harqcsi
=
false
;
else
curr_pucch
->
simultaneous_harqcsi
=
true
;
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid PUCCH format type"
);
}
}
}
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
->
ul_slot
=
slot
;
}
curr_pucch
->
csi_bits
=
get_csi_bitlen
(
Mod_idP
,
UE_id
);
// TODO function to compute CSI meas report bit size
curr_pucch
->
frame
=
frame
;
curr_pucch
->
ul_slot
=
slot
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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