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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
7bda635e
Commit
7bda635e
authored
Mar 01, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handling 2-port CSI report at MAC gNB
parent
4c8c11d9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
7 deletions
+55
-7
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+4
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+12
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+22
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+7
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+5
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+5
-0
No files found.
openair1/PHY/INIT/nr_init.c
View file @
7bda635e
...
...
@@ -136,7 +136,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
}
}
int
max_mimo_layers
=
(
CSI_RS_antenna_ports
<
NR_MAX_NB_LAYERS
)
?
CSI_RS_antenna_ports
:
NR_MAX_NB_LAYERS
;
int
max_mimo_layers
=
(
CSI_RS_antenna_ports
<
NR_MAX_NB_LAYERS
)
?
CSI_RS_antenna_ports
:
NR_MAX_NB_LAYERS
;
gNB
->
nr_mimo_precoding_matrix
=
(
int32_t
***
)
malloc16
(
max_mimo_layers
*
sizeof
(
int32_t
**
));
int32_t
***
mat
=
gNB
->
nr_mimo_precoding_matrix
;
...
...
@@ -236,7 +236,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
if
((
llb
!=
ll
)
||
(
mmb
!=
mm
)
||
((
N1
==
1
)
&&
(
N2
==
1
))){
pmiq
+=
1
;
mat
[
1
][
pmiq
]
=
(
int32_t
*
)
malloc16
((
2
*
N1
*
N2
)
*
(
2
)
*
sizeof
(
int32_t
));
LOG_
I
(
PHY
,
"layer 2 Codebook pmiq = %d
\n
"
,
pmiq
);
LOG_
D
(
PHY
,
"layer 2 Codebook pmiq = %d
\n
"
,
pmiq
);
for
(
int
j_col
=
0
;
j_col
<
2
;
j_col
++
)
{
if
(
j_col
==
0
)
{
llc
=
llb
;
...
...
@@ -320,7 +320,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
if
((
llb
!=
ll
)
||
(
mmb
!=
mm
)){
pmiq
+=
1
;
mat
[
2
][
pmiq
]
=
(
int32_t
*
)
malloc16
((
2
*
N1
*
N2
)
*
(
3
)
*
sizeof
(
int32_t
));
LOG_
I
(
PHY
,
"layer 3 Codebook pmiq = %d
\n
"
,
pmiq
);
LOG_
D
(
PHY
,
"layer 3 Codebook pmiq = %d
\n
"
,
pmiq
);
for
(
int
j_col
=
0
;
j_col
<
3
;
j_col
++
)
{
if
(
j_col
==
0
)
{
llc
=
llb
;
...
...
@@ -411,7 +411,7 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
if
((
llb
!=
ll
)
||
(
mmb
!=
mm
)){
pmiq
+=
1
;
mat
[
3
][
pmiq
]
=
(
int32_t
*
)
malloc16
((
2
*
N1
*
N2
)
*
4
*
sizeof
(
int32_t
));
LOG_
I
(
PHY
,
"layer 4 pmiq = %d
\n
"
,
pmiq
);
LOG_
D
(
PHY
,
"layer 4 pmiq = %d
\n
"
,
pmiq
);
for
(
int
j_col
=
0
;
j_col
<
4
;
j_col
++
)
{
if
(
j_col
==
0
)
{
llc
=
llb
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
7bda635e
...
...
@@ -1174,6 +1174,18 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdsch_pdu
->
StartSymbolIndex
=
ps
->
startSymbolIndex
;
pdsch_pdu
->
NrOfSymbols
=
ps
->
nrOfSymbols
;
// Precoding
if
(
sched_ctrl
->
set_pmi
)
{
int
report_id
=
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
csi_report_id
;
nr_csi_report_t
*
csi_report
=
&
UE_info
->
csi_report_template
[
UE_id
][
report_id
];
pdsch_pdu
->
precodingAndBeamforming
.
prg_size
=
pdsch_pdu
->
rbSize
;
pdsch_pdu
->
precodingAndBeamforming
.
prgs_list
[
0
].
pm_idx
=
set_pm_index
(
sched_ctrl
,
nrOfLayers
,
csi_report
->
N1
,
csi_report
->
N2
,
csi_report
->
codebook_mode
);
}
NR_PDSCH_Config_t
*
pdsch_Config
=
NULL
;
if
(
bwp
&&
bwp
->
bwp_Dedicated
&&
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
7bda635e
...
...
@@ -145,6 +145,25 @@ uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl) {
}
uint16_t
set_pm_index
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
layers
,
int
N1
,
int
N2
,
int
codebook_mode
)
{
int
x1
=
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x1
;
int
x2
=
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x2
;
int
antenna_ports
=
(
N1
*
N2
)
<<
1
;
sched_ctrl
->
set_pmi
=
false
;
if
(
antenna_ports
==
2
)
return
x2
;
else
AssertFatal
(
1
==
0
,
"More than 2 antenna ports not yet supported
\n
"
);
}
void
set_dl_mcs
(
NR_sched_pdsch_t
*
sched_pdsch
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
uint8_t
*
target_mcs
,
...
...
@@ -186,7 +205,7 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
}
}
}
sched_ctrl
->
set_mcs
=
FALSE
;
sched_ctrl
->
set_mcs
=
false
;
}
}
...
...
@@ -2147,7 +2166,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
,
UE_id
,
mod_idP
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
memset
(
sched_ctrl
,
0
,
sizeof
(
*
sched_ctrl
));
sched_ctrl
->
set_mcs
=
TRUE
;
sched_ctrl
->
set_mcs
=
true
;
sched_ctrl
->
set_pmi
=
false
;
sched_ctrl
->
lcid_mask
=
0
;
if
(
!
get_softmodem_params
()
->
phy_test
&&
!
get_softmodem_params
()
->
do_ra
&&
!
get_softmodem_params
()
->
sa
)
{
sched_ctrl
->
lcid_mask
=
1
<<
DL_SCH_LCID_DTCH
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
7bda635e
...
...
@@ -501,6 +501,9 @@ void compute_pmi_bitlen(struct NR_CSI_ReportConfig *csi_reportconfig,
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
->
N1
=
n1
;
csi_report
->
N2
=
n2
;
csi_report
->
codebook_mode
=
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
;
}
...
...
@@ -1210,7 +1213,7 @@ void evaluate_cqi_report(uint8_t *payload,
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
);
}
sched_ctrl
->
set_mcs
=
TRUE
;
sched_ctrl
->
set_mcs
=
true
;
}
...
...
@@ -1233,6 +1236,7 @@ uint8_t evaluate_pmi_report(uint8_t *payload,
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x1
,
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
pmi_x2
);
sched_ctrl
->
set_pmi
=
true
;
return
tot_bitlen
;
}
...
...
@@ -1338,6 +1342,7 @@ void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
if
(
r_index
!=
-
1
)
skip_zero_padding
(
&
cumul_bits
,
csi_report
,
r_index
,
bitlen
);
pmi_bitlen
=
evaluate_pmi_report
(
payload
,
csi_report
,
cumul_bits
,
r_index
,
sched_ctrl
);
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
csi_report_id
=
csi_report_id
;
cumul_bits
+=
pmi_bitlen
;
evaluate_cqi_report
(
payload
,
csi_report
,
cumul_bits
,
r_index
,
sched_ctrl
,
csirep
->
cqi_Table
);
break
;
...
...
@@ -1355,6 +1360,7 @@ void extract_pucch_csi_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
if
(
r_index
!=
-
1
)
skip_zero_padding
(
&
cumul_bits
,
csi_report
,
r_index
,
bitlen
);
pmi_bitlen
=
evaluate_pmi_report
(
payload
,
csi_report
,
cumul_bits
,
r_index
,
sched_ctrl
);
sched_ctrl
->
CSI_report
.
cri_ri_li_pmi_cqi_report
.
csi_report_id
=
csi_report_id
;
cumul_bits
+=
pmi_bitlen
;
evaluate_cqi_report
(
payload
,
csi_report
,
cumul_bits
,
r_index
,
sched_ctrl
,
csirep
->
cqi_Table
);
break
;
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
7bda635e
...
...
@@ -455,6 +455,11 @@ void find_SSB_and_RO_available(module_id_t module_idP);
void
set_dl_dmrs_ports
(
NR_pdsch_semi_static_t
*
ps
);
uint16_t
set_pm_index
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
layers
,
int
N1
,
int
N2
,
int
codebook_mode
);
void
set_dl_mcs
(
NR_sched_pdsch_t
*
sched_pdsch
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
uint8_t
*
target_mcs
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
7bda635e
...
...
@@ -479,6 +479,7 @@ struct CRI_RI_LI_PMI_CQI {
uint8_t
wb_cqi_1tb
;
uint8_t
wb_cqi_2tb
;
uint8_t
cqi_table
;
uint8_t
csi_report_id
;
};
typedef
struct
CRI_SSB_RSRP
{
...
...
@@ -522,6 +523,9 @@ typedef struct nr_csi_report {
uint8_t
nb_of_csi_ssb_report
;
L1_RSRP_bitlen_t
CSI_report_bitlen
;
CSI_Meas_bitlen_t
csi_meas_bitlen
;
int
codebook_mode
;
int
N1
;
int
N2
;
}
nr_csi_report_t
;
/*! As per the spec 38.212 and table: 6.3.1.1.2-12 in a single UCI sequence we can have multiple CSI_report
...
...
@@ -621,6 +625,7 @@ typedef struct {
struct
CSI_Report
CSI_report
;
bool
SR
;
bool
set_mcs
;
bool
set_pmi
;
/// information about every HARQ process
NR_UE_harq_t
harq_processes
[
NR_MAX_NB_HARQ_PROCESSES
];
/// HARQ processes that are free
...
...
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