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
71a9ee0c
Commit
71a9ee0c
authored
Jun 15, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flexible csi configuration including do_csirs config parameter
parent
0f5071c1
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
441 additions
and
344 deletions
+441
-344
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-1
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+1
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+2
-0
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+5
-2
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+157
-156
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+1
-0
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+6
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+1
-0
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+2
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+263
-181
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
71a9ee0c
...
...
@@ -750,7 +750,7 @@ int main(int argc, char **argv)
prepare_scd
(
scd
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
,
0
);
/* RRC parameter validation for secondaryCellGroup */
fix_scd
(
scd
);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
71a9ee0c
...
...
@@ -693,7 +693,7 @@ int main(int argc, char **argv)
prepare_scd
(
scd
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
,
0
);
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
...
...
openair2/COMMON/rrc_messages_types.h
View file @
71a9ee0c
...
...
@@ -411,6 +411,7 @@ typedef struct NRRrcConfigurationReq_s {
int
ssb_SubcarrierOffset
;
int
pdsch_AntennaPorts
;
int
pusch_AntennaPorts
;
int
do_CSIRS
;
int
pusch_TargetSNRx10
;
int
pucch_TargetSNRx10
;
}
gNB_RrcConfigurationReq
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
71a9ee0c
...
...
@@ -1045,6 +1045,8 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
NRRRC_CONFIGURATION_REQ
(
msg_p
).
pdsch_AntennaPorts
=
*
GNBParamList
.
paramarray
[
i
][
GNB_PDSCH_ANTENNAPORTS_IDX
].
iptr
;
printf
(
"pusch_AntennaPorts %d
\n
"
,
*
GNBParamList
.
paramarray
[
i
][
GNB_PUSCH_ANTENNAPORTS_IDX
].
iptr
);
NRRRC_CONFIGURATION_REQ
(
msg_p
).
pusch_AntennaPorts
=
*
GNBParamList
.
paramarray
[
i
][
GNB_PUSCH_ANTENNAPORTS_IDX
].
iptr
;
printf
(
"Do CSI-RS %d
\n
"
,
*
GNBParamList
.
paramarray
[
i
][
GNB_DO_CSIRS_IDX
].
iptr
);
NRRRC_CONFIGURATION_REQ
(
msg_p
).
do_CSIRS
=
*
GNBParamList
.
paramarray
[
i
][
GNB_DO_CSIRS_IDX
].
iptr
;
NRRRC_CONFIGURATION_REQ
(
msg_p
).
scc
=
scc
;
NRRRC_CONFIGURATION_REQ
(
msg_p
).
scd
=
scd
;
...
...
openair2/GNB_APP/gnb_paramdef.h
View file @
71a9ee0c
...
...
@@ -116,6 +116,7 @@ typedef enum {
#define GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET "ssb_SubcarrierOffset"
#define GNB_CONFIG_STRING_PDSCHANTENNAPORTS "pdsch_AntennaPorts"
#define GNB_CONFIG_STRING_PUSCHANTENNAPORTS "pusch_AntennaPorts"
#define GNB_CONFIG_STRING_DOCSIRS "do_CSIRS"
#define GNB_CONFIG_STRING_NRCELLID "nr_cellid"
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
...
...
@@ -140,7 +141,8 @@ typedef enum {
{GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET, NULL, 0, iptr:NULL, defintval:31, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_PDSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_PUSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_NRCELLID , NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_DOCSIRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_NRCELLID , NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \
}
#define GNB_GNB_ID_IDX 0
...
...
@@ -160,7 +162,8 @@ typedef enum {
#define GNB_SSB_SUBCARRIEROFFSET_IDX 14
#define GNB_PDSCH_ANTENNAPORTS_IDX 15
#define GNB_PUSCH_ANTENNAPORTS_IDX 16
#define GNB_NRCELLID_IDX 17
#define GNB_DO_CSIRS_IDX 17
#define GNB_NRCELLID_IDX 18
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define GNBPARAMS_CHECK { \
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
71a9ee0c
...
...
@@ -376,7 +376,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
ssb_SubcarrierOffset
,
pdsch_AntennaPorts
,
pusch_AntennaPorts
,
scc
);
scc
);
LOG_D
(
NR_MAC
,
"%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p
\n
"
,
__FUNCTION__
,
__FILE__
,
__LINE__
,
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
NR_PHY_config_req
);
// if in nFAPI mode
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
71a9ee0c
...
...
@@ -2056,185 +2056,186 @@ void nr_csirs_scheduling(int Mod_idP,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_CellGroupConfig_t
*
CellGroup
=
UE_info
->
CellGroup
[
UE_id
];
NR_CSI_MeasConfig_t
*
csi_measconfig
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
NR_NZP_CSI_RS_Resource_t
*
nzpcsi
;
int
period
,
offset
;
nfapi_nr_dl_tti_request_body_t
*
dl_req
=
&
gNB_mac
->
DL_req
[
CC_id
].
dl_tti_request_body
;
NR_BWP_Downlink_t
*
bwp
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
sched_ctrl
->
active_bwp
->
bwp_Id
-
1
];
AssertFatal
(
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
>
0
,
"NO CSI report configuration available"
);
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
csi_period_offset
(
NULL
,
nzpcsi
,
&
period
,
&
offset
);
if
((
frame
*
n_slots_frame
+
slot
-
offset
)
%
period
==
0
)
{
LOG_I
(
MAC
,
"Scheduling CSI-RS in frame %d slot %d
\n
"
,
frame
,
slot
);
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_csirs_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
memset
((
void
*
)
dl_tti_csirs_pdu
,
0
,
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
dl_tti_csirs_pdu
->
PDUType
=
NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE
;
dl_tti_csirs_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_csi_rs_pdu
));
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csirs_pdu_rel15
=
&
dl_tti_csirs_pdu
->
csi_rs_pdu
.
csi_rs_pdu_rel15
;
csirs_pdu_rel15
->
bwp_size
=
NRRIV2BW
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
csirs_pdu_rel15
->
bwp_start
=
NRRIV2PRBOFFSET
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
csirs_pdu_rel15
->
subcarrier_spacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
if
(
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
)
csirs_pdu_rel15
->
cyclic_prefix
=
*
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
;
else
csirs_pdu_rel15
->
cyclic_prefix
=
0
;
csirs_pdu_rel15
->
start_rb
=
resourceMapping
.
freqBand
.
startingRB
;
csirs_pdu_rel15
->
nr_of_rbs
=
resourceMapping
.
freqBand
.
nrofRBs
;
csirs_pdu_rel15
->
csi_type
=
1
;
// NZP-CSI-RS
csirs_pdu_rel15
->
symb_l0
=
resourceMapping
.
firstOFDMSymbolInTimeDomain
;
if
(
resourceMapping
.
firstOFDMSymbolInTimeDomain2
)
csirs_pdu_rel15
->
symb_l1
=
*
resourceMapping
.
firstOFDMSymbolInTimeDomain2
;
csirs_pdu_rel15
->
cdm_type
=
resourceMapping
.
cdm_Type
;
csirs_pdu_rel15
->
freq_density
=
resourceMapping
.
density
.
present
;
if
((
resourceMapping
.
density
.
present
==
NR_CSI_RS_ResourceMapping__density_PR_dot5
)
&&
(
resourceMapping
.
density
.
choice
.
dot5
==
NR_CSI_RS_ResourceMapping__density__dot5_evenPRBs
))
csirs_pdu_rel15
->
freq_density
--
;
csirs_pdu_rel15
->
scramb_id
=
nzpcsi
->
scramblingID
;
csirs_pdu_rel15
->
power_control_offset
=
nzpcsi
->
powerControlOffset
+
8
;
if
(
nzpcsi
->
powerControlOffsetSS
)
csirs_pdu_rel15
->
power_control_offset_ss
=
*
nzpcsi
->
powerControlOffsetSS
;
else
csirs_pdu_rel15
->
power_control_offset_ss
=
1
;
// 0 dB
switch
(
resourceMapping
.
frequencyDomainAllocation
.
present
){
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row1
:
csirs_pdu_rel15
->
row
=
1
;
csirs_pdu_rel15
->
freq_domain
=
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row1
.
buf
[
0
])
>>
4
)
&
0x0f
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row2
:
csirs_pdu_rel15
->
row
=
2
;
csirs_pdu_rel15
->
freq_domain
=
(((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
1
]
>>
4
)
&
0x0f
)
|
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
0
]
<<
8
)
&
0xff0
));
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row4
:
csirs_pdu_rel15
->
row
=
4
;
csirs_pdu_rel15
->
freq_domain
=
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row4
.
buf
[
0
])
>>
5
)
&
0x07
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_other
:
csirs_pdu_rel15
->
freq_domain
=
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
other
.
buf
[
0
])
>>
2
)
&
0x3f
;
// determining the row of table 7.4.1.5.3-1 in 38.211
switch
(
resourceMapping
.
nrofPorts
){
case
NR_CSI_RS_ResourceMapping__nrofPorts_p1
:
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p2
:
csirs_pdu_rel15
->
row
=
3
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p4
:
csirs_pdu_rel15
->
row
=
5
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p8
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
8
;
if
(
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
!=
NULL
)
{
NR_NZP_CSI_RS_Resource_t
*
nzpcsi
;
int
period
,
offset
;
nfapi_nr_dl_tti_request_body_t
*
dl_req
=
&
gNB_mac
->
DL_req
[
CC_id
].
dl_tti_request_body
;
NR_BWP_Downlink_t
*
bwp
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
sched_ctrl
->
active_bwp
->
bwp_Id
-
1
];
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
csi_period_offset
(
NULL
,
nzpcsi
,
&
period
,
&
offset
);
if
((
frame
*
n_slots_frame
+
slot
-
offset
)
%
period
==
0
)
{
LOG_I
(
MAC
,
"Scheduling CSI-RS in frame %d slot %d
\n
"
,
frame
,
slot
);
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_csirs_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
memset
((
void
*
)
dl_tti_csirs_pdu
,
0
,
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
dl_tti_csirs_pdu
->
PDUType
=
NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE
;
dl_tti_csirs_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_csi_rs_pdu
));
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csirs_pdu_rel15
=
&
dl_tti_csirs_pdu
->
csi_rs_pdu
.
csi_rs_pdu_rel15
;
csirs_pdu_rel15
->
bwp_size
=
NRRIV2BW
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
csirs_pdu_rel15
->
bwp_start
=
NRRIV2PRBOFFSET
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
csirs_pdu_rel15
->
subcarrier_spacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
if
(
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
)
csirs_pdu_rel15
->
cyclic_prefix
=
*
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
;
else
csirs_pdu_rel15
->
cyclic_prefix
=
0
;
csirs_pdu_rel15
->
start_rb
=
resourceMapping
.
freqBand
.
startingRB
;
csirs_pdu_rel15
->
nr_of_rbs
=
resourceMapping
.
freqBand
.
nrofRBs
;
csirs_pdu_rel15
->
csi_type
=
1
;
// NZP-CSI-RS
csirs_pdu_rel15
->
symb_l0
=
resourceMapping
.
firstOFDMSymbolInTimeDomain
;
if
(
resourceMapping
.
firstOFDMSymbolInTimeDomain2
)
csirs_pdu_rel15
->
symb_l1
=
*
resourceMapping
.
firstOFDMSymbolInTimeDomain2
;
csirs_pdu_rel15
->
cdm_type
=
resourceMapping
.
cdm_Type
;
csirs_pdu_rel15
->
freq_density
=
resourceMapping
.
density
.
present
;
if
((
resourceMapping
.
density
.
present
==
NR_CSI_RS_ResourceMapping__density_PR_dot5
)
&&
(
resourceMapping
.
density
.
choice
.
dot5
==
NR_CSI_RS_ResourceMapping__density__dot5_evenPRBs
))
csirs_pdu_rel15
->
freq_density
--
;
csirs_pdu_rel15
->
scramb_id
=
nzpcsi
->
scramblingID
;
csirs_pdu_rel15
->
power_control_offset
=
nzpcsi
->
powerControlOffset
+
8
;
if
(
nzpcsi
->
powerControlOffsetSS
)
csirs_pdu_rel15
->
power_control_offset_ss
=
*
nzpcsi
->
powerControlOffsetSS
;
else
csirs_pdu_rel15
->
power_control_offset_ss
=
1
;
// 0 dB
switch
(
resourceMapping
.
frequencyDomainAllocation
.
present
){
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row1
:
csirs_pdu_rel15
->
row
=
1
;
csirs_pdu_rel15
->
freq_domain
=
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row1
.
buf
[
0
])
>>
4
)
&
0x0f
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row2
:
csirs_pdu_rel15
->
row
=
2
;
csirs_pdu_rel15
->
freq_domain
=
(((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
1
]
>>
4
)
&
0x0f
)
|
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
0
]
<<
8
)
&
0xff0
));
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row4
:
csirs_pdu_rel15
->
row
=
4
;
csirs_pdu_rel15
->
freq_domain
=
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row4
.
buf
[
0
])
>>
5
)
&
0x07
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_other
:
csirs_pdu_rel15
->
freq_domain
=
((
resourceMapping
.
frequencyDomainAllocation
.
choice
.
other
.
buf
[
0
])
>>
2
)
&
0x3f
;
// determining the row of table 7.4.1.5.3-1 in 38.211
switch
(
resourceMapping
.
nrofPorts
){
case
NR_CSI_RS_ResourceMapping__nrofPorts_p1
:
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p2
:
csirs_pdu_rel15
->
row
=
3
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p4
:
csirs_pdu_rel15
->
row
=
5
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
}
else
{
int
num_k
=
0
;
for
(
int
k
=
0
;
k
<
6
;
k
++
)
num_k
+=
(((
csirs_pdu_rel15
->
freq_domain
)
>>
k
)
&
0x01
);
if
(
num_k
==
4
)
{
csirs_pdu_rel15
->
row
=
6
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
}
else
{
csirs_pdu_rel15
->
row
=
7
;
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p8
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
8
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
}
}
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p12
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
10
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
}
else
{
csirs_pdu_rel15
->
row
=
9
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
}
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p16
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
csirs_pdu_rel15
->
row
=
12
;
else
csirs_pdu_rel15
->
row
=
11
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p24
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
14
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
));
}
else
{
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm8_FD2_TD4
)
{
csirs_pdu_rel15
->
row
=
15
;
else
{
int
num_k
=
0
;
for
(
int
k
=
0
;
k
<
6
;
k
++
)
num_k
+=
(((
csirs_pdu_rel15
->
freq_domain
)
>>
k
)
&
0x01
);
if
(
num_k
==
4
)
{
csirs_pdu_rel15
->
row
=
6
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
}
else
{
csirs_pdu_rel15
->
row
=
7
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
}
}
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p12
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
10
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
7
<<
csirs_pdu_rel15
->
symb_l0
);
vrb_map
[
rb
]
|=
(
(
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
)
);
}
else
{
csirs_pdu_rel15
->
row
=
13
;
csirs_pdu_rel15
->
row
=
9
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
(
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
)
);
vrb_map
[
rb
]
|=
(
1
<<
csirs_pdu_rel15
->
symb_l0
);
}
}
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p32
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
17
;
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p16
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
csirs_pdu_rel15
->
row
=
12
;
else
csirs_pdu_rel15
->
row
=
11
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
));
}
else
{
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm
8_FD2_TD4
)
{
csirs_pdu_rel15
->
row
=
1
8
;
vrb_map
[
rb
]
|=
((
1
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
2
<<
csirs_pdu_rel15
->
symb_l0
));
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p24
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm
4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
1
4
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
7
<<
csirs_pdu_rel15
->
symb_l0
);
vrb_map
[
rb
]
|=
(
(
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
)
);
}
else
{
csirs_pdu_rel15
->
row
=
16
;
else
{
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm8_FD2_TD4
)
{
csirs_pdu_rel15
->
row
=
15
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
7
<<
csirs_pdu_rel15
->
symb_l0
);
}
else
{
csirs_pdu_rel15
->
row
=
13
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
));
}
}
break
;
case
NR_CSI_RS_ResourceMapping__nrofPorts_p32
:
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm4_FD2_TD2
)
{
csirs_pdu_rel15
->
row
=
17
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
));
}
}
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid number of ports in CSI-RS resource
\n
"
);
}
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid freqency domain allocation in CSI-RS resource
\n
"
);
else
{
if
(
resourceMapping
.
cdm_Type
==
NR_CSI_RS_ResourceMapping__cdm_Type_cdm8_FD2_TD4
)
{
csirs_pdu_rel15
->
row
=
18
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
(
7
<<
csirs_pdu_rel15
->
symb_l0
);
}
else
{
csirs_pdu_rel15
->
row
=
16
;
for
(
int
rb
=
csirs_pdu_rel15
->
start_rb
;
rb
<
(
csirs_pdu_rel15
->
start_rb
+
csirs_pdu_rel15
->
nr_of_rbs
);
rb
++
)
vrb_map
[
rb
]
|=
((
3
<<
csirs_pdu_rel15
->
symb_l0
)
|
(
3
<<
csirs_pdu_rel15
->
symb_l1
));
}
}
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid number of ports in CSI-RS resource
\n
"
);
}
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid freqency domain allocation in CSI-RS resource
\n
"
);
}
dl_req
->
nPDUs
++
;
}
dl_req
->
nPDUs
++
;
}
}
}
}
bool
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
int
UE_id
){
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
71a9ee0c
...
...
@@ -447,6 +447,7 @@ typedef struct {
int
pusch_AntennaPorts
;
int
pusch_TargetSNRx10
;
int
pucch_TargetSNRx10
;
int
do_CSIRS
;
NR_BCCH_DL_SCH_Message_t
*
siblock1
;
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
;
NR_PDCCH_ConfigSIB1_t
*
pdcch_ConfigSIB1
;
...
...
openair2/RRC/NR/nr_rrc_proto.h
View file @
71a9ee0c
...
...
@@ -84,15 +84,19 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CellGroupConfig_t
*
secondaryCellGroup
,
int
scg_id
,
int
servCellIndex
,
int
n_physical_antenna_ports
,
int
dl_antenna_ports
,
int
do_csirs
,
int
initial_csi_index
,
int
uid
);
void
config_csirs
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
int
dl_antenna_ports
,
int
do_csirs
);
void
fill_default_reconfig
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
int
n_physical_antenna_ports
,
int
dl_antenna_ports
,
int
do_csirs
,
int
initial_csi_index
,
int
uid
);
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
71a9ee0c
...
...
@@ -330,6 +330,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
rrc
->
carrier
.
ssb_SubcarrierOffset
=
configuration
->
ssb_SubcarrierOffset
;
rrc
->
carrier
.
pdsch_AntennaPorts
=
configuration
->
pdsch_AntennaPorts
;
rrc
->
carrier
.
pusch_AntennaPorts
=
configuration
->
pusch_AntennaPorts
;
rrc
->
carrier
.
do_CSIRS
=
configuration
->
do_CSIRS
;
/// System Information INIT
pthread_mutex_init
(
&
rrc
->
cell_info_mutex
,
NULL
);
rrc
->
cell_info_configured
=
0
;
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
71a9ee0c
...
...
@@ -245,6 +245,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
reconfig_ies
,
ue_context_p
->
ue_context
.
secondaryCellGroup
,
carrier
->
pdsch_AntennaPorts
,
carrier
->
do_CSIRS
,
carrier
->
initial_csi_index
[
ue_context_p
->
local_uid
+
1
],
ue_context_p
->
local_uid
);
}
else
{
...
...
@@ -253,6 +254,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
reconfig_ies
,
ue_context_p
->
ue_context
.
secondaryCellGroup
,
carrier
->
pdsch_AntennaPorts
,
carrier
->
do_CSIRS
,
carrier
->
initial_csi_index
[
ue_context_p
->
local_uid
+
1
],
ue_context_p
->
local_uid
);
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
71a9ee0c
...
...
@@ -128,7 +128,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CellGroupConfig_t
*
secondaryCellGroup
,
int
scg_id
,
int
servCellIndex
,
int
n_physical_antenna_ports
,
int
dl_antenna_ports
,
int
do_csirs
,
int
initial_csi_index
,
int
uid
)
{
AssertFatal
(
servingcellconfigcommon
!=
NULL
,
"servingcellconfigcommon is null
\n
"
);
...
...
@@ -1039,8 +1040,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_PUCCH_SpatialRelationInfo_t
*
pucchspatial
=
calloc
(
1
,
sizeof
(
*
pucchspatial
));
pucchspatial
->
pucch_SpatialRelationInfoId
=
1
;
pucchspatial
->
servingCellId
=
NULL
;
pucchspatial
->
referenceSignal
.
present
=
NR_PUCCH_SpatialRelationInfo__referenceSignal_PR_csi_RS_Index
;
pucchspatial
->
referenceSignal
.
choice
.
csi_RS_Index
=
0
;
if
(
do_csirs
)
{
pucchspatial
->
referenceSignal
.
present
=
NR_PUCCH_SpatialRelationInfo__referenceSignal_PR_csi_RS_Index
;
pucchspatial
->
referenceSignal
.
choice
.
csi_RS_Index
=
0
;
}
else
{
pucchspatial
->
referenceSignal
.
present
=
NR_PUCCH_SpatialRelationInfo__referenceSignal_PR_ssb_Index
;
pucchspatial
->
referenceSignal
.
choice
.
ssb_Index
=
0
;
}
pucchspatial
->
pucch_PathlossReferenceRS_Id
=
0
;
pucchspatial
->
p0_PUCCH_Id
=
1
;
pucchspatial
->
closedLoopIndex
=
NR_PUCCH_SpatialRelationInfo__closedLoopIndex_i0
;
...
...
@@ -1123,76 +1130,56 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
=
csi_MeasConfig
;
csi_MeasConfig
->
csi_IM_ResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_IM_ResourceToAddModList
));
NR_CSI_IM_Resource_t
*
imres0
=
calloc
(
1
,
sizeof
(
*
imres0
));
imres0
->
csi_IM_ResourceId
=
0
;
imres0
->
csi_IM_ResourceElementPattern
=
calloc
(
1
,
sizeof
(
*
imres0
->
csi_IM_ResourceElementPattern
));
imres0
->
csi_IM_ResourceElementPattern
->
present
=
NR_CSI_IM_Resource__csi_IM_ResourceElementPattern_PR_pattern1
;
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
=
calloc
(
1
,
sizeof
(
*
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
));
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
subcarrierLocation_p1
=
NR_CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern1__subcarrierLocation_p1_s4
;
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
symbolLocation_p1
=
6
;
imres0
->
freqBand
=
calloc
(
1
,
sizeof
(
*
imres0
->
freqBand
));
imres0
->
freqBand
->
startingRB
=
0
;
imres0
->
freqBand
->
nrofRBs
=
108
;
imres0
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
imres0
->
periodicityAndOffset
));
imres0
->
periodicityAndOffset
->
present
=
NR_CSI_ResourcePeriodicityAndOffset_PR_slots320
;
imres0
->
periodicityAndOffset
->
choice
.
slots320
=
0
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_IM_ResourceToAddModList
->
list
,
imres0
);
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
));
NR_CSI_IM_ResourceSet_t
*
imset0
=
calloc
(
1
,
sizeof
(
*
imset0
));
imset0
->
csi_IM_ResourceSetId
=
0
;
NR_CSI_IM_ResourceId_t
*
res0
=
calloc
(
1
,
sizeof
(
*
res0
));
*
res0
=
0
;
ASN_SEQUENCE_ADD
(
&
imset0
->
csi_IM_Resources
,
res0
);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
->
list
,
imset0
);
if
(
do_csirs
&&
dl_antenna_ports
>
1
)
{
csi_MeasConfig
->
csi_IM_ResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_IM_ResourceToAddModList
));
NR_CSI_IM_Resource_t
*
imres0
=
calloc
(
1
,
sizeof
(
*
imres0
));
imres0
->
csi_IM_ResourceId
=
0
;
imres0
->
csi_IM_ResourceElementPattern
=
calloc
(
1
,
sizeof
(
*
imres0
->
csi_IM_ResourceElementPattern
));
imres0
->
csi_IM_ResourceElementPattern
->
present
=
NR_CSI_IM_Resource__csi_IM_ResourceElementPattern_PR_pattern1
;
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
=
calloc
(
1
,
sizeof
(
*
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
));
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
subcarrierLocation_p1
=
NR_CSI_IM_Resource__csi_IM_ResourceElementPattern__pattern1__subcarrierLocation_p1_s4
;
imres0
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
symbolLocation_p1
=
6
;
imres0
->
freqBand
=
calloc
(
1
,
sizeof
(
*
imres0
->
freqBand
));
imres0
->
freqBand
->
startingRB
=
0
;
imres0
->
freqBand
->
nrofRBs
=
108
;
imres0
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
imres0
->
periodicityAndOffset
));
imres0
->
periodicityAndOffset
->
present
=
NR_CSI_ResourcePeriodicityAndOffset_PR_slots320
;
imres0
->
periodicityAndOffset
->
choice
.
slots320
=
0
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_IM_ResourceToAddModList
->
list
,
imres0
);
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
));
NR_CSI_IM_ResourceSet_t
*
imset0
=
calloc
(
1
,
sizeof
(
*
imset0
));
imset0
->
csi_IM_ResourceSetId
=
0
;
NR_CSI_IM_ResourceId_t
*
res0
=
calloc
(
1
,
sizeof
(
*
res0
));
*
res0
=
0
;
ASN_SEQUENCE_ADD
(
&
imset0
->
csi_IM_Resources
,
res0
);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
->
list
,
imset0
);
}
else
{
csi_MeasConfig
->
csi_IM_ResourceToAddModList
=
NULL
;
csi_MeasConfig
->
csi_IM_ResourceSetToAddModList
=
NULL
;
}
csi_MeasConfig
->
csi_IM_ResourceToReleaseList
=
NULL
;
csi_MeasConfig
->
csi_IM_ResourceSetToReleaseList
=
NULL
;
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
));
NR_NZP_CSI_RS_ResourceSet_t
*
nzpcsirs0
=
calloc
(
1
,
sizeof
(
*
nzpcsirs0
));
nzpcsirs0
->
nzp_CSI_ResourceSetId
=
0
;
NR_NZP_CSI_RS_ResourceId_t
*
nzpid0
=
calloc
(
1
,
sizeof
(
*
nzpid0
));
*
nzpid0
=
0
;
ASN_SEQUENCE_ADD
(
&
nzpcsirs0
->
nzp_CSI_RS_Resources
,
nzpid0
);
nzpcsirs0
->
repetition
=
NULL
;
nzpcsirs0
->
aperiodicTriggeringOffset
=
NULL
;
nzpcsirs0
->
trs_Info
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
->
list
,
nzpcsirs0
);
if
(
do_csirs
)
{
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
));
NR_NZP_CSI_RS_ResourceSet_t
*
nzpcsirs0
=
calloc
(
1
,
sizeof
(
*
nzpcsirs0
));
nzpcsirs0
->
nzp_CSI_ResourceSetId
=
0
;
NR_NZP_CSI_RS_ResourceId_t
*
nzpid0
=
calloc
(
1
,
sizeof
(
*
nzpid0
));
*
nzpid0
=
0
;
ASN_SEQUENCE_ADD
(
&
nzpcsirs0
->
nzp_CSI_RS_Resources
,
nzpid0
);
nzpcsirs0
->
repetition
=
NULL
;
nzpcsirs0
->
aperiodicTriggeringOffset
=
NULL
;
nzpcsirs0
->
trs_Info
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
->
list
,
nzpcsirs0
);
}
else
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
=
NULL
;
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToReleaseList
=
NULL
;
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
));
NR_NZP_CSI_RS_Resource_t
*
nzpcsi0
=
calloc
(
1
,
sizeof
(
*
nzpcsi0
));
nzpcsi0
->
nzp_CSI_RS_ResourceId
=
0
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
;
resourceMapping
.
frequencyDomainAllocation
.
present
=
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_other
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
=
calloc
(
2
,
sizeof
(
uint8_t
));
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
size
=
1
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
bits_unused
=
2
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
0
]
=
4
;
resourceMapping
.
nrofPorts
=
NR_CSI_RS_ResourceMapping__nrofPorts_p2
;
resourceMapping
.
firstOFDMSymbolInTimeDomain
=
6
;
resourceMapping
.
firstOFDMSymbolInTimeDomain2
=
NULL
;
resourceMapping
.
cdm_Type
=
NR_CSI_RS_ResourceMapping__cdm_Type_fd_CDM2
;
resourceMapping
.
density
.
present
=
NR_CSI_RS_ResourceMapping__density_PR_one
;
resourceMapping
.
density
.
choice
.
one
=
(
NULL_t
)
0
;
resourceMapping
.
freqBand
.
startingRB
=
0
;
resourceMapping
.
freqBand
.
nrofRBs
=
108
;
nzpcsi0
->
resourceMapping
=
resourceMapping
;
nzpcsi0
->
powerControlOffset
=
0
;
nzpcsi0
->
powerControlOffsetSS
=
calloc
(
1
,
sizeof
(
*
nzpcsi0
->
powerControlOffsetSS
));
*
nzpcsi0
->
powerControlOffsetSS
=
NR_NZP_CSI_RS_Resource__powerControlOffsetSS_db0
;
nzpcsi0
->
scramblingID
=
*
servingcellconfigcommon
->
physCellId
;
nzpcsi0
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
nzpcsi0
->
periodicityAndOffset
));
nzpcsi0
->
periodicityAndOffset
->
present
=
NR_CSI_ResourcePeriodicityAndOffset_PR_slots320
;
nzpcsi0
->
periodicityAndOffset
->
choice
.
slots320
=
0
;
nzpcsi0
->
qcl_InfoPeriodicCSI_RS
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
,
nzpcsi0
);
config_csirs
(
servingcellconfigcommon
,
csi_MeasConfig
,
dl_antenna_ports
,
do_csirs
);
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
));
csi_MeasConfig
->
csi_SSB_ResourceSetToReleaseList
=
NULL
;
...
...
@@ -1211,18 +1198,21 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
,
ssbresset0
);
csi_MeasConfig
->
csi_ResourceConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_ResourceConfigToAddModList
));
csi_MeasConfig
->
csi_ResourceConfigToReleaseList
=
NULL
;
NR_CSI_ResourceConfig_t
*
csires0
=
calloc
(
1
,
sizeof
(
*
csires0
));
csires0
->
csi_ResourceConfigId
=
0
;
csires0
->
csi_RS_ResourceSetList
.
present
=
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB
;
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
));
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
));
NR_NZP_CSI_RS_ResourceSetId_t
*
nzp0
=
calloc
(
1
,
sizeof
(
*
nzp0
));
*
nzp0
=
0
;
ASN_SEQUENCE_ADD
(
&
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
nzp0
);
csires0
->
bwp_Id
=
1
;
csires0
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires0
);
if
(
do_csirs
)
{
csi_MeasConfig
->
csi_ResourceConfigToReleaseList
=
NULL
;
NR_CSI_ResourceConfig_t
*
csires0
=
calloc
(
1
,
sizeof
(
*
csires0
));
csires0
->
csi_ResourceConfigId
=
0
;
csires0
->
csi_RS_ResourceSetList
.
present
=
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB
;
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
));
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
));
NR_NZP_CSI_RS_ResourceSetId_t
*
nzp0
=
calloc
(
1
,
sizeof
(
*
nzp0
));
*
nzp0
=
0
;
ASN_SEQUENCE_ADD
(
&
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
nzp0
);
csires0
->
bwp_Id
=
1
;
csires0
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires0
);
}
NR_CSI_ResourceConfig_t
*
csires1
=
calloc
(
1
,
sizeof
(
*
csires1
));
csires1
->
csi_ResourceConfigId
=
1
;
...
...
@@ -1236,111 +1226,147 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csires1
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires1
);
NR_CSI_ResourceConfig_t
*
csires2
=
calloc
(
1
,
sizeof
(
*
csires2
));
csires2
->
csi_ResourceConfigId
=
2
;
csires2
->
csi_RS_ResourceSetList
.
present
=
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_csi_IM_ResourceSetList
;
csires2
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires2
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
));
NR_CSI_IM_ResourceSetId_t
*
csiim00
=
calloc
(
1
,
sizeof
(
*
csiim00
));
*
csiim00
=
0
;
ASN_SEQUENCE_ADD
(
&
csires2
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
->
list
,
csiim00
);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires2
);
if
(
do_csirs
&&
dl_antenna_ports
>
1
)
{
NR_CSI_ResourceConfig_t
*
csires2
=
calloc
(
1
,
sizeof
(
*
csires2
));
csires2
->
csi_ResourceConfigId
=
2
;
csires2
->
csi_RS_ResourceSetList
.
present
=
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_csi_IM_ResourceSetList
;
csires2
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires2
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
));
NR_CSI_IM_ResourceSetId_t
*
csiim00
=
calloc
(
1
,
sizeof
(
*
csiim00
));
*
csiim00
=
0
;
ASN_SEQUENCE_ADD
(
&
csires2
->
csi_RS_ResourceSetList
.
choice
.
csi_IM_ResourceSetList
->
list
,
csiim00
);
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires2
);
}
csi_MeasConfig
->
csi_ReportConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_ReportConfigToAddModList
));
csi_MeasConfig
->
csi_ReportConfigToReleaseList
=
NULL
;
NR_CSI_ReportConfig_t
*
csirep1
=
calloc
(
1
,
sizeof
(
*
csirep1
));
csirep1
->
reportConfigId
=
0
;
csirep1
->
carrier
=
NULL
;
csirep1
->
resourcesForChannelMeasurement
=
0
;
csirep1
->
csi_IM_ResourcesForInterference
=
calloc
(
1
,
sizeof
(
*
csirep1
->
csi_IM_ResourcesForInterference
));
*
csirep1
->
csi_IM_ResourcesForInterference
=
2
;
csirep1
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep1
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
csirep1
->
reportConfigType
.
choice
.
periodic
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportConfigType
.
choice
.
periodic
));
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
=
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
;
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
9
+
(
20
*
uid
)
%
320
;
NR_PUCCH_CSI_Resource_t
*
pucchcsires1
=
calloc
(
1
,
sizeof
(
*
pucchcsires1
));
pucchcsires1
->
uplinkBandwidthPartId
=
1
;
pucchcsires1
->
pucch_Resource
=
2
;
ASN_SEQUENCE_ADD
(
&
csirep1
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep1
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI
;
csirep1
->
reportQuantity
.
choice
.
cri_RI_PMI_CQI
=
(
NULL_t
)
0
;
csirep1
->
reportFreqConfiguration
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
));
csirep1
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
->
cqi_FormatIndicator
));
*
csirep1
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__cqi_FormatIndicator_widebandCQI
;
csirep1
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
->
pmi_FormatIndicator
));
*
csirep1
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__pmi_FormatIndicator_widebandPMI
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
));
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
present
=
NR_CSI_ReportConfig__reportFreqConfiguration__csi_ReportingBand_PR_subbands7
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
size
=
1
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
bits_unused
=
1
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
buf
=
malloc
(
1
);
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
buf
[
0
]
=
254
;
csirep1
->
timeRestrictionForChannelMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForChannelMeasurements_configured
;
csirep1
->
timeRestrictionForInterferenceMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForInterferenceMeasurements_configured
;
csirep1
->
codebookConfig
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
));
csirep1
->
codebookConfig
->
codebookType
.
present
=
NR_CodebookConfig__codebookType_PR_type1
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
present
=
NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_two
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
size
=
1
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
bits_unused
=
2
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
buf
=
malloc
(
1
);
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
buf
[
0
]
=
0xfc
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
size
=
1
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
bits_unused
=
0
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
buf
=
malloc
(
1
);
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
buf
[
0
]
=
0x03
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
codebookMode
=
1
;
csirep1
->
dummy
=
NULL
;
csirep1
->
groupBasedBeamReporting
.
present
=
NR_CSI_ReportConfig__groupBasedBeamReporting_PR_disabled
;
csirep1
->
groupBasedBeamReporting
.
choice
.
disabled
=
calloc
(
1
,
sizeof
(
*
csirep1
->
groupBasedBeamReporting
.
choice
.
disabled
));
//csirep1->groupBasedBeamReporting.choice.disabled->nrofReportedRS = calloc(1,sizeof(*csirep1->groupBasedBeamReporting.choice.disabled->nrofReportedRS));
//*csirep1->groupBasedBeamReporting.choice.disabled->nrofReportedRS=NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1;
csirep1
->
cqi_Table
=
calloc
(
1
,
sizeof
(
*
csirep1
->
cqi_Table
));
*
csirep1
->
cqi_Table
=
NR_CSI_ReportConfig__cqi_Table_table1
;
csirep1
->
subbandSize
=
NR_CSI_ReportConfig__subbandSize_value2
;
csirep1
->
non_PMI_PortIndication
=
NULL
;
csirep1
->
ext1
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
,
csirep1
);
NR_CSI_ReportConfig_t
*
csirep2
=
calloc
(
1
,
sizeof
(
*
csirep2
));
csirep2
->
reportConfigId
=
1
;
csirep2
->
carrier
=
NULL
;
csirep2
->
resourcesForChannelMeasurement
=
1
;
csirep2
->
csi_IM_ResourcesForInterference
=
NULL
;
csirep2
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep2
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
csirep2
->
reportConfigType
.
choice
.
periodic
=
calloc
(
1
,
sizeof
(
*
csirep2
->
reportConfigType
.
choice
.
periodic
));
csirep2
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
=
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
;
csirep2
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
29
+
(
20
*
uid
)
%
320
;
ASN_SEQUENCE_ADD
(
&
csirep2
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep2
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
;
csirep2
->
reportQuantity
.
choice
.
ssb_Index_RSRP
=
(
NULL_t
)
0
;
csirep2
->
reportFreqConfiguration
=
calloc
(
1
,
sizeof
(
*
csirep2
->
reportFreqConfiguration
));
csirep2
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__cqi_FormatIndicator_widebandCQI
;
csirep2
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__pmi_FormatIndicator_widebandPMI
;
csirep2
->
reportFreqConfiguration
->
csi_ReportingBand
=
NULL
;
csirep2
->
timeRestrictionForChannelMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForChannelMeasurements_configured
;
csirep2
->
timeRestrictionForInterferenceMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForInterferenceMeasurements_configured
;
csirep2
->
codebookConfig
=
NULL
;
csirep2
->
dummy
=
NULL
;
csirep2
->
groupBasedBeamReporting
.
present
=
NR_CSI_ReportConfig__groupBasedBeamReporting_PR_disabled
;
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
=
calloc
(
1
,
sizeof
(
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
));
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
=
calloc
(
1
,
sizeof
(
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
));
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
=
NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1
;
csirep2
->
cqi_Table
=
calloc
(
1
,
sizeof
(
*
csirep2
->
cqi_Table
));
*
csirep2
->
cqi_Table
=
NR_CSI_ReportConfig__cqi_Table_table1
;
csirep2
->
subbandSize
=
NR_CSI_ReportConfig__subbandSize_value1
;
csirep2
->
non_PMI_PortIndication
=
NULL
;
csirep2
->
ext1
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
,
csirep2
);
csi_MeasConfig
->
csi_ReportConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_ReportConfigToAddModList
));
csi_MeasConfig
->
csi_ReportConfigToReleaseList
=
NULL
;
if
(
dl_antenna_ports
>
1
)
{
NR_CSI_ReportConfig_t
*
csirep1
=
calloc
(
1
,
sizeof
(
*
csirep1
));
csirep1
->
reportConfigId
=
0
;
csirep1
->
carrier
=
NULL
;
csirep1
->
resourcesForChannelMeasurement
=
0
;
csirep1
->
csi_IM_ResourcesForInterference
=
calloc
(
1
,
sizeof
(
*
csirep1
->
csi_IM_ResourcesForInterference
));
*
csirep1
->
csi_IM_ResourcesForInterference
=
2
;
csirep1
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep1
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
csirep1
->
reportConfigType
.
choice
.
periodic
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportConfigType
.
choice
.
periodic
));
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
=
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
;
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
9
+
(
20
*
uid
)
%
320
;
ASN_SEQUENCE_ADD
(
&
csirep1
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep1
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI
;
csirep1
->
reportQuantity
.
choice
.
cri_RI_PMI_CQI
=
(
NULL_t
)
0
;
csirep1
->
reportFreqConfiguration
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
));
csirep1
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
->
cqi_FormatIndicator
));
*
csirep1
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__cqi_FormatIndicator_widebandCQI
;
csirep1
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
->
pmi_FormatIndicator
));
*
csirep1
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__pmi_FormatIndicator_widebandPMI
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
=
calloc
(
1
,
sizeof
(
*
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
));
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
present
=
NR_CSI_ReportConfig__reportFreqConfiguration__csi_ReportingBand_PR_subbands7
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
size
=
1
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
bits_unused
=
1
;
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
buf
=
malloc
(
1
);
csirep1
->
reportFreqConfiguration
->
csi_ReportingBand
->
choice
.
subbands7
.
buf
[
0
]
=
254
;
csirep1
->
timeRestrictionForChannelMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForChannelMeasurements_configured
;
csirep1
->
timeRestrictionForInterferenceMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForInterferenceMeasurements_configured
;
csirep1
->
codebookConfig
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
));
csirep1
->
codebookConfig
->
codebookType
.
present
=
NR_CodebookConfig__codebookType_PR_type1
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
present
=
NR_CodebookConfig__codebookType__type1__subType_PR_typeI_SinglePanel
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
present
=
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts_PR_two
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
=
calloc
(
1
,
sizeof
(
*
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
));
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
size
=
1
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
bits_unused
=
2
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
buf
=
malloc
(
1
);
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
nrOfAntennaPorts
.
choice
.
two
->
twoTX_CodebookSubsetRestriction
.
buf
[
0
]
=
0xfc
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
size
=
1
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
bits_unused
=
0
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
buf
=
malloc
(
1
);
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
subType
.
choice
.
typeI_SinglePanel
->
typeI_SinglePanel_ri_Restriction
.
buf
[
0
]
=
0x03
;
csirep1
->
codebookConfig
->
codebookType
.
choice
.
type1
->
codebookMode
=
1
;
csirep1
->
dummy
=
NULL
;
csirep1
->
groupBasedBeamReporting
.
present
=
NR_CSI_ReportConfig__groupBasedBeamReporting_PR_disabled
;
csirep1
->
groupBasedBeamReporting
.
choice
.
disabled
=
calloc
(
1
,
sizeof
(
*
csirep1
->
groupBasedBeamReporting
.
choice
.
disabled
));
//csirep1->groupBasedBeamReporting.choice.disabled->nrofReportedRS = calloc(1,sizeof(*csirep1->groupBasedBeamReporting.choice.disabled->nrofReportedRS));
//*csirep1->groupBasedBeamReporting.choice.disabled->nrofReportedRS=NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1;
csirep1
->
cqi_Table
=
calloc
(
1
,
sizeof
(
*
csirep1
->
cqi_Table
));
*
csirep1
->
cqi_Table
=
NR_CSI_ReportConfig__cqi_Table_table1
;
csirep1
->
subbandSize
=
NR_CSI_ReportConfig__subbandSize_value2
;
csirep1
->
non_PMI_PortIndication
=
NULL
;
csirep1
->
ext1
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
,
csirep1
);
}
if
(
do_csirs
)
{
NR_CSI_ReportConfig_t
*
csirep2
=
calloc
(
1
,
sizeof
(
*
csirep2
));
csirep2
->
reportConfigId
=
1
;
csirep2
->
carrier
=
NULL
;
csirep2
->
resourcesForChannelMeasurement
=
0
;
csirep2
->
csi_IM_ResourcesForInterference
=
NULL
;
csirep2
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep2
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
csirep2
->
reportConfigType
.
choice
.
periodic
=
calloc
(
1
,
sizeof
(
*
csirep2
->
reportConfigType
.
choice
.
periodic
));
csirep2
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
=
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
;
csirep2
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
29
+
(
20
*
uid
)
%
320
;
ASN_SEQUENCE_ADD
(
&
csirep2
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep2
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
;
csirep2
->
reportQuantity
.
choice
.
cri_RSRP
=
(
NULL_t
)
0
;
csirep2
->
reportFreqConfiguration
=
calloc
(
1
,
sizeof
(
*
csirep2
->
reportFreqConfiguration
));
csirep2
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
NULL
;
csirep2
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
NULL
;
csirep2
->
reportFreqConfiguration
->
csi_ReportingBand
=
NULL
;
csirep2
->
timeRestrictionForChannelMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForChannelMeasurements_configured
;
csirep2
->
timeRestrictionForInterferenceMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForInterferenceMeasurements_configured
;
csirep2
->
codebookConfig
=
NULL
;
csirep2
->
dummy
=
NULL
;
csirep2
->
groupBasedBeamReporting
.
present
=
NR_CSI_ReportConfig__groupBasedBeamReporting_PR_disabled
;
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
=
calloc
(
1
,
sizeof
(
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
));
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
=
calloc
(
1
,
sizeof
(
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
));
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
=
NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1
;
csirep2
->
cqi_Table
=
NULL
;
csirep2
->
subbandSize
=
NR_CSI_ReportConfig__subbandSize_value1
;
csirep2
->
non_PMI_PortIndication
=
NULL
;
csirep2
->
ext1
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
,
csirep2
);
}
else
{
NR_CSI_ReportConfig_t
*
csirep2
=
calloc
(
1
,
sizeof
(
*
csirep2
));
csirep2
->
reportConfigId
=
1
;
csirep2
->
carrier
=
NULL
;
csirep2
->
resourcesForChannelMeasurement
=
1
;
csirep2
->
csi_IM_ResourcesForInterference
=
NULL
;
csirep2
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep2
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
csirep2
->
reportConfigType
.
choice
.
periodic
=
calloc
(
1
,
sizeof
(
*
csirep2
->
reportConfigType
.
choice
.
periodic
));
csirep2
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
present
=
NR_CSI_ReportPeriodicityAndOffset_PR_slots320
;
csirep2
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
29
+
(
20
*
uid
)
%
320
;
ASN_SEQUENCE_ADD
(
&
csirep2
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep2
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
;
csirep2
->
reportQuantity
.
choice
.
ssb_Index_RSRP
=
(
NULL_t
)
0
;
csirep2
->
reportFreqConfiguration
=
calloc
(
1
,
sizeof
(
*
csirep2
->
reportFreqConfiguration
));
csirep2
->
reportFreqConfiguration
->
cqi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__cqi_FormatIndicator_widebandCQI
;
csirep2
->
reportFreqConfiguration
->
pmi_FormatIndicator
=
NR_CSI_ReportConfig__reportFreqConfiguration__pmi_FormatIndicator_widebandPMI
;
csirep2
->
reportFreqConfiguration
->
csi_ReportingBand
=
NULL
;
csirep2
->
timeRestrictionForChannelMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForChannelMeasurements_configured
;
csirep2
->
timeRestrictionForInterferenceMeasurements
=
NR_CSI_ReportConfig__timeRestrictionForInterferenceMeasurements_configured
;
csirep2
->
codebookConfig
=
NULL
;
csirep2
->
dummy
=
NULL
;
csirep2
->
groupBasedBeamReporting
.
present
=
NR_CSI_ReportConfig__groupBasedBeamReporting_PR_disabled
;
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
=
calloc
(
1
,
sizeof
(
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
));
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
=
calloc
(
1
,
sizeof
(
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
));
*
csirep2
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
=
NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1
;
csirep2
->
cqi_Table
=
calloc
(
1
,
sizeof
(
*
csirep2
->
cqi_Table
));
*
csirep2
->
cqi_Table
=
NR_CSI_ReportConfig__cqi_Table_table1
;
csirep2
->
subbandSize
=
NR_CSI_ReportConfig__subbandSize_value1
;
csirep2
->
non_PMI_PortIndication
=
NULL
;
csirep2
->
ext1
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
,
csirep2
);
}
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
sCellDeactivationTimer
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
crossCarrierSchedulingConfig
=
NULL
;
...
...
@@ -1351,11 +1377,65 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
}
void
config_csirs
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
int
dl_antenna_ports
,
int
do_csirs
)
{
if
(
do_csirs
)
{
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
));
NR_NZP_CSI_RS_Resource_t
*
nzpcsi0
=
calloc
(
1
,
sizeof
(
*
nzpcsi0
));
nzpcsi0
->
nzp_CSI_RS_ResourceId
=
0
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
;
switch
(
dl_antenna_ports
)
{
case
1
:
resourceMapping
.
frequencyDomainAllocation
.
present
=
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_row2
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
=
calloc
(
2
,
sizeof
(
uint8_t
));
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
size
=
2
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
bits_unused
=
4
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
0
]
=
0
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
1
]
=
16
;
resourceMapping
.
nrofPorts
=
NR_CSI_RS_ResourceMapping__nrofPorts_p1
;
resourceMapping
.
cdm_Type
=
NR_CSI_RS_ResourceMapping__cdm_Type_noCDM
;
break
;
case
2
:
resourceMapping
.
frequencyDomainAllocation
.
present
=
NR_CSI_RS_ResourceMapping__frequencyDomainAllocation_PR_other
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
=
calloc
(
2
,
sizeof
(
uint8_t
));
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
size
=
1
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
bits_unused
=
2
;
resourceMapping
.
frequencyDomainAllocation
.
choice
.
row2
.
buf
[
0
]
=
4
;
resourceMapping
.
nrofPorts
=
NR_CSI_RS_ResourceMapping__nrofPorts_p2
;
resourceMapping
.
cdm_Type
=
NR_CSI_RS_ResourceMapping__cdm_Type_fd_CDM2
;
break
;
default:
AssertFatal
(
1
==
0
,
"Number of ports not yet supported
\n
"
);
}
resourceMapping
.
firstOFDMSymbolInTimeDomain
=
6
;
resourceMapping
.
firstOFDMSymbolInTimeDomain2
=
NULL
;
resourceMapping
.
density
.
present
=
NR_CSI_RS_ResourceMapping__density_PR_one
;
resourceMapping
.
density
.
choice
.
one
=
(
NULL_t
)
0
;
resourceMapping
.
freqBand
.
startingRB
=
0
;
resourceMapping
.
freqBand
.
nrofRBs
=
108
;
nzpcsi0
->
resourceMapping
=
resourceMapping
;
nzpcsi0
->
powerControlOffset
=
0
;
nzpcsi0
->
powerControlOffsetSS
=
calloc
(
1
,
sizeof
(
*
nzpcsi0
->
powerControlOffsetSS
));
*
nzpcsi0
->
powerControlOffsetSS
=
NR_NZP_CSI_RS_Resource__powerControlOffsetSS_db0
;
nzpcsi0
->
scramblingID
=
*
servingcellconfigcommon
->
physCellId
;
nzpcsi0
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
nzpcsi0
->
periodicityAndOffset
));
nzpcsi0
->
periodicityAndOffset
->
present
=
NR_CSI_ResourcePeriodicityAndOffset_PR_slots320
;
nzpcsi0
->
periodicityAndOffset
->
choice
.
slots320
=
0
;
nzpcsi0
->
qcl_InfoPeriodicCSI_RS
=
NULL
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
,
nzpcsi0
);
}
else
csi_MeasConfig
->
nzp_CSI_RS_ResourceToAddModList
=
NULL
;
}
void
fill_default_reconfig
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
int
n_physical_antenna_ports
,
int
dl_antenna_ports
,
int
do_csirs
,
int
initial_csi_index
,
int
uid
)
{
AssertFatal
(
servingcellconfigcommon
!=
NULL
,
"servingcellconfigcommon is null
\n
"
);
...
...
@@ -1369,9 +1449,11 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
secondaryCellGroup
,
1
,
1
,
n_physical_antenna_ports
,
dl_antenna_ports
,
do_csirs
,
initial_csi_index
,
uid
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
(
const
void
*
)
secondaryCellGroup
);
char
scg_buffer
[
1024
];
...
...
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