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
4819b146
Commit
4819b146
authored
Jun 07, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bitlen for typeI single panel
parent
c114c245
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
203 additions
and
2 deletions
+203
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+203
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
4819b146
...
...
@@ -268,6 +268,202 @@ void compute_li_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
}
void
get_n1n2_o1o2_singlepanel
(
int
*
n1
,
int
*
n2
,
int
*
o1
,
int
*
o2
,
struct
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo
*
morethantwo
)
{
// Table 5.2.2.2.1-2 in 38.214 for supported configurations
switch
(
morethantwo
->
n1_n2
.
present
){
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_one_TypeI_SinglePanel_Restriction
):
*
n1
=
2
;
*
n2
=
1
;
*
o1
=
4
;
*
o2
=
1
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_two_two_TypeI_SinglePanel_Restriction
):
*
n1
=
2
;
*
n2
=
2
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_one_TypeI_SinglePanel_Restriction
):
*
n1
=
4
;
*
n2
=
1
;
*
o1
=
4
;
*
o2
=
1
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_three_two_TypeI_SinglePanel_Restriction
):
*
n1
=
3
;
*
n2
=
2
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_one_TypeI_SinglePanel_Restriction
):
*
n1
=
6
;
*
n2
=
1
;
*
o1
=
4
;
*
o2
=
1
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_two_TypeI_SinglePanel_Restriction
):
*
n1
=
4
;
*
n2
=
2
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_eight_one_TypeI_SinglePanel_Restriction
):
*
n1
=
8
;
*
n2
=
1
;
*
o1
=
4
;
*
o2
=
1
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_three_TypeI_SinglePanel_Restriction
):
*
n1
=
4
;
*
n2
=
3
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_two_TypeI_SinglePanel_Restriction
):
*
n1
=
4
;
*
n2
=
2
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_twelve_one_TypeI_SinglePanel_Restriction
):
*
n1
=
12
;
*
n2
=
1
;
*
o1
=
4
;
*
o2
=
1
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_four_TypeI_SinglePanel_Restriction
):
*
n1
=
4
;
*
n2
=
4
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_eight_two_TypeI_SinglePanel_Restriction
):
*
n1
=
8
;
*
n2
=
2
;
*
o1
=
4
;
*
o2
=
4
;
break
;
case
(
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_sixteen_one_TypeI_SinglePanel_Restriction
):
*
n1
=
16
;
*
n2
=
1
;
*
o1
=
4
;
*
o2
=
1
;
break
;
default:
AssertFatal
(
1
==
0
,
"Not supported configuration for n1_n2 in codebook configuration"
);
}
}
void
get_x1x2_bitlen_singlepanel
(
int
n1
,
int
n2
,
int
o1
,
int
o2
,
int
*
x1
,
int
*
x2
,
int
rank
,
int
codebook_mode
)
{
// Table 6.3.1.1.2-1 in 38.212
switch
(
rank
){
case
1
:
if
(
n2
>
1
)
{
if
(
codebook_mode
==
1
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
2
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
))
+
ceil
(
log2
(
n2
*
o2
/
2
));
*
x2
=
4
;
}
}
else
{
if
(
codebook_mode
==
1
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
2
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
));
*
x2
=
4
;
}
}
break
;
case
2
:
if
(
n1
*
n2
==
2
)
{
if
(
codebook_mode
==
1
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
1
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
));
*
x2
=
3
;
}
*
x1
+=
1
;
}
else
{
if
(
n2
>
1
)
{
if
(
codebook_mode
==
1
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
3
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
))
+
ceil
(
log2
(
n2
*
o2
/
2
));
*
x2
=
3
;
}
}
else
{
if
(
codebook_mode
==
1
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
1
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
));
*
x2
=
3
;
}
}
*
x1
+=
2
;
}
break
;
case
3
:
case
4
:
if
(
n1
*
n2
==
2
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
1
;
}
else
{
if
(
n1
*
n2
>=
8
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
))
+
ceil
(
log2
(
n2
*
o2
))
+
2
;
*
x2
=
1
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
))
+
2
;
*
x2
=
1
;
}
}
break
;
case
5
:
case
6
:
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
1
;
break
;
case
7
:
case
8
:
if
(
n1
==
4
&&
n2
==
1
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
/
2
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
1
;
}
else
{
if
(
n1
>
2
&&
n2
==
2
)
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
/
2
));
*
x2
=
1
;
}
else
{
*
x1
=
ceil
(
log2
(
n1
*
o1
))
+
ceil
(
log2
(
n2
*
o2
));
*
x2
=
1
;
}
}
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid rank in x1 x2 bit length computation
\n
"
);
}
}
void
compute_pmi_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
uint8_t
ri_restriction
,
nr_csi_report_t
*
csi_report
){
...
...
@@ -288,8 +484,13 @@ void compute_pmi_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
if
(
i
==
1
)
csi_report
->
csi_meas_bitlen
.
pmi_x2_bitlen
[
i
]
=
1
;
}
else
AssertFatal
(
1
==
0
,
"More than 2 port not yet implemented
\n
"
);
else
{
// more than two
int
n1
,
n2
,
o1
,
o2
,
x1
,
x2
;
get_n1n2_o1o2_singlepanel
(
&
n1
,
&
n2
,
&
o1
,
&
o2
,
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
moreThanTwo
);
get_x1x2_bitlen_singlepanel
(
n1
,
n2
,
o1
,
o2
,
&
x1
,
&
x2
,
i
+
1
,
codebookConfig
->
codebookType
.
choice
.
type1
->
codebookMode
);
csi_report
->
csi_meas_bitlen
.
pmi_x1_bitlen
[
i
]
=
x1
;
csi_report
->
csi_meas_bitlen
.
pmi_x2_bitlen
[
i
]
=
x2
;
}
}
else
AssertFatal
(
1
==
0
,
"Type1 Multi-panel Codebook Config not yet implemented
\n
"
);
...
...
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