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
wangjie
OpenXG-RAN
Commits
549e3a91
Commit
549e3a91
authored
Jun 17, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove choice in CSI report structure
parent
0ec932b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
34 deletions
+30
-34
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+3
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+25
-25
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+2
-5
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
549e3a91
...
@@ -142,7 +142,7 @@ void set_dl_nrOfLayers(NR_sched_pdsch_t *sched_pdsch,
...
@@ -142,7 +142,7 @@ void set_dl_nrOfLayers(NR_sched_pdsch_t *sched_pdsch,
// for now this should be enough
// for now this should be enough
// if there is not csi report RI is 0 from initialization
// if there is not csi report RI is 0 from initialization
sched_pdsch
->
nrOfLayers
=
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
ri
+
1
;
sched_pdsch
->
nrOfLayers
=
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
ri
+
1
;
}
}
...
@@ -151,12 +151,11 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
...
@@ -151,12 +151,11 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
uint8_t
mcs_table_idx
)
{
uint8_t
mcs_table_idx
)
{
if
(
sched_ctrl
->
set_mcs
)
{
if
(
sched_ctrl
->
set_mcs
)
{
// TODO for wideband case and multiple TB
// TODO for wideband case and multiple TB
int
cqi_idx
=
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
wb_cqi_1tb
;
int
cqi_idx
=
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
wb_cqi_1tb
;
uint16_t
target_coderate
,
target_qm
;
uint16_t
target_coderate
,
target_qm
;
if
(
cqi_idx
>
0
)
{
if
(
cqi_idx
>
0
)
{
int
cqi_table
=
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
cqi_table
;
int
cqi_table
=
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
cqi_table
;
AssertFatal
(
cqi_table
==
mcs_table_idx
,
"Indices of MCS tables don't correspond
\n
"
);
AssertFatal
(
cqi_table
==
mcs_table_idx
,
"Indices of MCS tables don't correspond
\n
"
);
switch
(
cqi_table
)
{
switch
(
cqi_table
)
{
case
0
:
case
0
:
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
549e3a91
...
@@ -921,14 +921,14 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
...
@@ -921,14 +921,14 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
idx: resource set index
idx: resource set index
*/
*/
nr_ssbri_cri
=
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
nr_ssbri_cri
;
nr_ssbri_cri
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
nr_ssbri_cri
;
//extracting the ssb indexes
//extracting the ssb indexes
for
(
ssb_idx
=
0
;
ssb_idx
<
nr_ssbri_cri
;
ssb_idx
++
)
{
for
(
ssb_idx
=
0
;
ssb_idx
<
nr_ssbri_cri
;
ssb_idx
++
)
{
ssb_index
[
idx
*
nb_of_csi_ssb_report
+
ssb_idx
]
=
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
CRI_SSBRI
[
ssb_idx
];
ssb_index
[
idx
*
nb_of_csi_ssb_report
+
ssb_idx
]
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
ssb_idx
];
}
}
//if strongest measured RSRP is configured
//if strongest measured RSRP is configured
strongest_ssb_rsrp
=
get_measured_rsrp
(
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
RSRP
);
strongest_ssb_rsrp
=
get_measured_rsrp
(
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
);
// including ssb rsrp in mac stats
// including ssb rsrp in mac stats
stats
->
cumul_rsrp
+=
strongest_ssb_rsrp
;
stats
->
cumul_rsrp
+=
strongest_ssb_rsrp
;
stats
->
num_rsrp_meas
++
;
stats
->
num_rsrp_meas
++
;
...
@@ -942,7 +942,7 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
...
@@ -942,7 +942,7 @@ void tci_handling(module_id_t Mod_idP, int UE_id, frame_t frame, slot_t slot) {
}
}
for
(
diff_rsrp_idx
=
1
;
diff_rsrp_idx
<
nr_ssbri_cri
;
diff_rsrp_idx
++
)
{
for
(
diff_rsrp_idx
=
1
;
diff_rsrp_idx
<
nr_ssbri_cri
;
diff_rsrp_idx
++
)
{
ssb_rsrp
[
idx
*
nb_of_csi_ssb_report
+
diff_rsrp_idx
]
=
get_diff_rsrp
(
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
-
1
],
strongest_ssb_rsrp
);
ssb_rsrp
[
idx
*
nb_of_csi_ssb_report
+
diff_rsrp_idx
]
=
get_diff_rsrp
(
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
-
1
],
strongest_ssb_rsrp
);
//if current reported rsrp is greater than better rsrp
//if current reported rsrp is greater than better rsrp
if
(
ssb_rsrp
[
idx
*
nb_of_csi_ssb_report
+
diff_rsrp_idx
]
>
better_rsrp_reported
)
{
if
(
ssb_rsrp
[
idx
*
nb_of_csi_ssb_report
+
diff_rsrp_idx
]
>
better_rsrp_reported
)
{
...
@@ -1100,35 +1100,35 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
...
@@ -1100,35 +1100,35 @@ void evaluate_rsrp_report(NR_UE_info_t *UE_info,
multiple simultaneous spatial domain receive filter
multiple simultaneous spatial domain receive filter
*/
*/
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
nr_ssbri_cri
=
csi_report
->
CSI_report_bitlen
.
nb_ssbri_cri
;
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
nr_ssbri_cri
=
csi_report
->
CSI_report_bitlen
.
nb_ssbri_cri
;
for
(
int
csi_ssb_idx
=
0
;
csi_ssb_idx
<
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
nr_ssbri_cri
;
csi_ssb_idx
++
)
{
for
(
int
csi_ssb_idx
=
0
;
csi_ssb_idx
<
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
nr_ssbri_cri
;
csi_ssb_idx
++
)
{
curr_payload
=
pickandreverse_bits
(
payload
,
cri_ssbri_bitlen
,
*
cumul_bits
);
curr_payload
=
pickandreverse_bits
(
payload
,
cri_ssbri_bitlen
,
*
cumul_bits
);
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
*
(
csi_report
->
SSB_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
*
(
csi_report
->
SSB_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
else
else
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
*
(
csi_report
->
CSI_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
*
(
csi_report
->
CSI_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
*
cumul_bits
+=
cri_ssbri_bitlen
;
*
cumul_bits
+=
cri_ssbri_bitlen
;
LOG_D
(
MAC
,
"SSB_index = %d
\n
"
,
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
LOG_D
(
MAC
,
"SSB_index = %d
\n
"
,
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
}
}
curr_payload
=
pickandreverse_bits
(
payload
,
7
,
*
cumul_bits
);
curr_payload
=
pickandreverse_bits
(
payload
,
7
,
*
cumul_bits
);
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
RSRP
=
curr_payload
&
0x7f
;
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
=
curr_payload
&
0x7f
;
*
cumul_bits
+=
7
;
*
cumul_bits
+=
7
;
for
(
int
diff_rsrp_idx
=
0
;
diff_rsrp_idx
<
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
nr_ssbri_cri
-
1
;
diff_rsrp_idx
++
)
{
for
(
int
diff_rsrp_idx
=
0
;
diff_rsrp_idx
<
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
nr_ssbri_cri
-
1
;
diff_rsrp_idx
++
)
{
curr_payload
=
pickandreverse_bits
(
payload
,
4
,
*
cumul_bits
);
curr_payload
=
pickandreverse_bits
(
payload
,
4
,
*
cumul_bits
);
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
]
=
curr_payload
&
0x0f
;
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
]
=
curr_payload
&
0x0f
;
*
cumul_bits
+=
4
;
*
cumul_bits
+=
4
;
}
}
csi_report
->
nb_of_csi_ssb_report
++
;
csi_report
->
nb_of_csi_ssb_report
++
;
LOG_D
(
MAC
,
"rsrp_id = %d rsrp = %d
\n
"
,
LOG_D
(
MAC
,
"rsrp_id = %d rsrp = %d
\n
"
,
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
RSRP
,
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
,
get_measured_rsrp
(
sched_ctrl
->
CSI_report
.
choice
.
ssb_cri_report
.
RSRP
));
get_measured_rsrp
(
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
RSRP
));
}
}
...
@@ -1138,7 +1138,7 @@ void evaluate_cri_report(uint8_t *payload,
...
@@ -1138,7 +1138,7 @@ void evaluate_cri_report(uint8_t *payload,
NR_UE_sched_ctrl_t
*
sched_ctrl
){
NR_UE_sched_ctrl_t
*
sched_ctrl
){
uint8_t
temp_cri
=
pickandreverse_bits
(
payload
,
cri_bitlen
,
cumul_bits
);
uint8_t
temp_cri
=
pickandreverse_bits
(
payload
,
cri_bitlen
,
cumul_bits
);
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
cri
=
temp_cri
;
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
cri
=
temp_cri
;
}
}
int
evaluate_ri_report
(
uint8_t
*
payload
,
int
evaluate_ri_report
(
uint8_t
*
payload
,
...
@@ -1152,7 +1152,7 @@ int evaluate_ri_report(uint8_t *payload,
...
@@ -1152,7 +1152,7 @@ int evaluate_ri_report(uint8_t *payload,
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
((
ri_restriction
>>
i
)
&
0x01
)
{
if
((
ri_restriction
>>
i
)
&
0x01
)
{
if
(
count
==
ri_index
)
{
if
(
count
==
ri_index
)
{
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
ri
=
i
;
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
ri
=
i
;
LOG_I
(
MAC
,
"CSI Reported Rank %d
\n
"
,
i
+
1
);
LOG_I
(
MAC
,
"CSI Reported Rank %d
\n
"
,
i
+
1
);
return
i
;
return
i
;
}
}
...
@@ -1179,14 +1179,14 @@ void evaluate_cqi_report(uint8_t *payload,
...
@@ -1179,14 +1179,14 @@ void evaluate_cqi_report(uint8_t *payload,
// NR_CSI_ReportConfig__cqi_Table_table2 = 1
// NR_CSI_ReportConfig__cqi_Table_table2 = 1
// NR_CSI_ReportConfig__cqi_Table_table3 = 2
// NR_CSI_ReportConfig__cqi_Table_table3 = 2
if
(
cqi_Table
)
if
(
cqi_Table
)
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
cqi_table
=
*
cqi_Table
;
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
cqi_table
=
*
cqi_Table
;
else
else
AssertFatal
(
1
==
0
,
"CQI Table not present in RRC configuration
\n
"
);
AssertFatal
(
1
==
0
,
"CQI Table not present in RRC configuration
\n
"
);
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
wb_cqi_1tb
=
temp_cqi
;
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
wb_cqi_1tb
=
temp_cqi
;
LOG_I
(
MAC
,
"Wide-band CQI for the first TB %d
\n
"
,
temp_cqi
);
LOG_I
(
MAC
,
"Wide-band CQI for the first TB %d
%p
\n
"
,
temp_cqi
,
&
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
wb_cqi_1tb
);
if
(
cqi_bitlen
>
4
)
{
if
(
cqi_bitlen
>
4
)
{
temp_cqi
=
pickandreverse_bits
(
payload
,
4
,
cumul_bits
);
temp_cqi
=
pickandreverse_bits
(
payload
,
4
,
cumul_bits
);
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
wb_cqi_2tb
=
temp_cqi
;
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
wb_cqi_2tb
=
temp_cqi
;
LOG_D
(
MAC
,
"Wide-band CQI for the second TB %d
\n
"
,
temp_cqi
);
LOG_D
(
MAC
,
"Wide-band CQI for the second TB %d
\n
"
,
temp_cqi
);
}
}
sched_ctrl
->
set_mcs
=
TRUE
;
sched_ctrl
->
set_mcs
=
TRUE
;
...
@@ -1206,11 +1206,11 @@ uint8_t evaluate_pmi_report(uint8_t *payload,
...
@@ -1206,11 +1206,11 @@ uint8_t evaluate_pmi_report(uint8_t *payload,
//in case of 2 port CSI configuration x1 is empty and the information bits are in x2
//in case of 2 port CSI configuration x1 is empty and the information bits are in x2
int
temp_pmi
=
pickandreverse_bits
(
payload
,
tot_bitlen
,
cumul_bits
);
int
temp_pmi
=
pickandreverse_bits
(
payload
,
tot_bitlen
,
cumul_bits
);
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
pmi_x1
=
temp_pmi
&
((
1
<<
x1_bitlen
)
-
1
);
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x1
=
temp_pmi
&
((
1
<<
x1_bitlen
)
-
1
);
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
pmi_x2
=
(
temp_pmi
>>
x1_bitlen
)
&
((
1
<<
x2_bitlen
)
-
1
);
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x2
=
(
temp_pmi
>>
x1_bitlen
)
&
((
1
<<
x2_bitlen
)
-
1
);
LOG_I
(
MAC
,
"PMI Report: X1 %d X2 %d
\n
"
,
LOG_I
(
MAC
,
"PMI Report: X1 %d X2 %d
\n
"
,
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
pmi_x1
,
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x1
,
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
pmi_x2
);
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x2
);
return
tot_bitlen
;
return
tot_bitlen
;
...
@@ -1228,7 +1228,7 @@ int evaluate_li_report(uint8_t *payload,
...
@@ -1228,7 +1228,7 @@ int evaluate_li_report(uint8_t *payload,
if
(
li_bitlen
>
0
)
{
if
(
li_bitlen
>
0
)
{
int
temp_li
=
pickandreverse_bits
(
payload
,
li_bitlen
,
cumul_bits
);
int
temp_li
=
pickandreverse_bits
(
payload
,
li_bitlen
,
cumul_bits
);
LOG_I
(
MAC
,
"LI %d
\n
"
,
temp_li
);
LOG_I
(
MAC
,
"LI %d
\n
"
,
temp_li
);
sched_ctrl
->
CSI_report
.
c
hoice
.
c
ri_ri_li_pmi_cqi_report
.
li
=
temp_li
;
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
li
=
temp_li
;
}
}
return
li_bitlen
;
return
li_bitlen
;
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
549e3a91
...
@@ -453,11 +453,8 @@ typedef struct CRI_SSB_RSRP {
...
@@ -453,11 +453,8 @@ typedef struct CRI_SSB_RSRP {
}
CRI_SSB_RSRP_t
;
}
CRI_SSB_RSRP_t
;
struct
CSI_Report
{
struct
CSI_Report
{
NR_CSI_Report_Config_PR
present
;
struct
CRI_RI_LI_PMI_CQI
cri_ri_li_pmi_cqi_report
;
union
Config_CSI_Report
{
struct
CRI_SSB_RSRP
ssb_cri_report
;
struct
CRI_RI_LI_PMI_CQI
cri_ri_li_pmi_cqi_report
;
struct
CRI_SSB_RSRP
ssb_cri_report
;
}
choice
;
};
};
#define MAX_SR_BITLEN 8
#define MAX_SR_BITLEN 8
...
...
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