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
zzha zzha
OpenXG-RAN
Commits
23dab34e
Commit
23dab34e
authored
May 21, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CSI bitlen for rank = 2
parent
c67d3659
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
40 deletions
+38
-40
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+32
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-37
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
23dab34e
...
...
@@ -4698,4 +4698,36 @@ void compute_csi_bitlen(NR_CSI_MeasConfig_t *csi_MeasConfig, nr_csi_report_t *cs
AssertFatal
(
1
==
0
,
"Not yet supported CSI report quantity type"
);
}
}
}
uint16_t
nr_get_csi_bitlen
(
nr_csi_report_t
*
csi_report_template
,
uint8_t
csi_report_id
)
{
uint16_t
csi_bitlen
=
0
;
uint16_t
max_bitlen
=
0
;
L1_RSRP_bitlen_t
*
CSI_report_bitlen
=
NULL
;
CSI_Meas_bitlen_t
*
csi_meas_bitlen
=
NULL
;
if
(
csi_report_template
[
csi_report_id
].
reportQuantity_type
==
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
||
csi_report_template
[
csi_report_id
].
reportQuantity_type
==
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
)
{
CSI_report_bitlen
=
&
(
csi_report_template
[
csi_report_id
].
CSI_report_bitlen
);
// 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
)));
}
else
{
csi_meas_bitlen
=
&
(
csi_report_template
[
csi_report_id
].
csi_meas_bitlen
);
//This might need to be moodif for Aperiodic CSI-RS measurements
uint16_t
temp_bitlen
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
temp_bitlen
=
(
csi_meas_bitlen
->
cri_bitlen
+
csi_meas_bitlen
->
ri_bitlen
+
csi_meas_bitlen
->
li_bitlen
[
i
]
+
csi_meas_bitlen
->
cqi_bitlen
[
i
]
+
csi_meas_bitlen
->
pmi_x1_bitlen
[
i
]
+
csi_meas_bitlen
->
pmi_x2_bitlen
[
i
]);
if
(
temp_bitlen
>
max_bitlen
)
max_bitlen
=
temp_bitlen
;
}
csi_bitlen
+=
max_bitlen
;
}
return
csi_bitlen
;
}
\ No newline at end of file
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
23dab34e
...
...
@@ -245,4 +245,6 @@ void compute_cqi_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
void
compute_csi_bitlen
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
nr_csi_report_t
*
csi_report_template
);
uint16_t
nr_get_csi_bitlen
(
nr_csi_report_t
*
csi_report_template
,
uint8_t
csi_report_id
);
#endif
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
23dab34e
...
...
@@ -2650,17 +2650,17 @@ uint8_t get_csirs_RI_PMI_CQI_payload(NR_UE_MAC_INST_t *mac,
nr_csi_report_t
*
csi_report
=
&
mac
->
csi_report_template
[
csi_reportconfig
->
reportConfigId
];
compute_csi_bitlen
(
csi_MeasConfig
,
mac
->
csi_report_template
);
n_bits
=
nr_get_csi_bitlen
(
mac
->
csi_report_template
,
csi_reportconfig
->
reportConfigId
);
int
cri_bitlen
=
csi_report
->
csi_meas_bitlen
.
cri_bitlen
;
int
ri_bitlen
=
csi_report
->
csi_meas_bitlen
.
ri_bitlen
;
int
pmi_x1_bitlen
=
csi_report
->
csi_meas_bitlen
.
pmi_x1_bitlen
[
*
mac
->
csirs_measurements
.
rank_indicator
];
int
pmi_x2_bitlen
=
csi_report
->
csi_meas_bitlen
.
pmi_x2_bitlen
[
*
mac
->
csirs_measurements
.
rank_indicator
];
int
cqi_bitlen
=
csi_report
->
csi_meas_bitlen
.
cqi_bitlen
[
*
mac
->
csirs_measurements
.
rank_indicator
];
n_bits
=
cri_bitlen
+
ri_bitlen
+
pmi_x1_bitlen
+
pmi_x2_bitlen
+
cqi_bitlen
;
int
padding_bitlen
=
n_bits
-
(
cri_bitlen
+
ri_bitlen
+
pmi_x1_bitlen
+
pmi_x2_bitlen
+
cqi_bitlen
);
// TODO: Improvements will be needed to cri_bitlen>0 and pmi_x1_bitlen>0
temp_payload
=
(
*
mac
->
csirs_measurements
.
rank_indicator
<<
(
cri_bitlen
+
cqi_bitlen
+
pmi_x2_bitlen
+
pmi_x1_bitlen
))
|
temp_payload
=
(
*
mac
->
csirs_measurements
.
rank_indicator
<<
(
cri_bitlen
+
cqi_bitlen
+
pmi_x2_bitlen
+
p
adding_bitlen
+
p
mi_x1_bitlen
))
|
(
*
mac
->
csirs_measurements
.
i1
<<
(
cri_bitlen
+
cqi_bitlen
+
pmi_x2_bitlen
))
|
(
*
mac
->
csirs_measurements
.
i2
<<
(
cri_bitlen
+
cqi_bitlen
))
|
(
*
mac
->
csirs_measurements
.
cqi
<<
cri_bitlen
)
|
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
23dab34e
...
...
@@ -170,42 +170,6 @@ void nr_schedule_pucch(int Mod_idP,
}
}
uint16_t
nr_get_csi_bitlen
(
int
Mod_idP
,
int
UE_id
,
uint8_t
csi_report_id
)
{
uint16_t
csi_bitlen
=
0
;
uint16_t
max_bitlen
=
0
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
L1_RSRP_bitlen_t
*
CSI_report_bitlen
=
NULL
;
CSI_Meas_bitlen_t
*
csi_meas_bitlen
=
NULL
;
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
reportQuantity_type
||
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
==
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
reportQuantity_type
){
CSI_report_bitlen
=
&
(
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
CSI_report_bitlen
);
//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
)));
}
else
{
csi_meas_bitlen
=
&
(
UE_info
->
csi_report_template
[
UE_id
][
csi_report_id
].
csi_meas_bitlen
);
//This might need to be moodif for Aperiodic CSI-RS measurements
uint16_t
temp_bitlen
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
temp_bitlen
=
(
csi_meas_bitlen
->
cri_bitlen
+
csi_meas_bitlen
->
ri_bitlen
+
csi_meas_bitlen
->
li_bitlen
[
i
]
+
csi_meas_bitlen
->
cqi_bitlen
[
i
]
+
csi_meas_bitlen
->
pmi_x1_bitlen
[
i
]
+
csi_meas_bitlen
->
pmi_x2_bitlen
[
i
]);
if
(
temp_bitlen
>
max_bitlen
)
max_bitlen
=
temp_bitlen
;
}
csi_bitlen
+=
max_bitlen
;
}
return
csi_bitlen
;
}
void
nr_csi_meas_reporting
(
int
Mod_idP
,
frame_t
frame
,
sub_frame_t
slot
)
{
...
...
@@ -275,7 +239,7 @@ void nr_csi_meas_reporting(int Mod_idP,
curr_pucch
->
ul_slot
=
sched_slot
;
curr_pucch
->
resource_indicator
=
res_index
;
curr_pucch
->
csi_bits
+=
nr_get_csi_bitlen
(
Mod_idP
,
UE_id
,
csi_report_id
);
nr_get_csi_bitlen
(
UE_info
->
csi_report_template
[
UE_id
],
csi_report_id
);
const
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
...
...
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