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
wangwenhui
OpenXG-RAN
Commits
7ab0b200
Commit
7ab0b200
authored
Dec 18, 2020
by
k.ramya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code rearrangement
parent
0e24d8f4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
157 deletions
+170
-157
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+5
-10
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+18
-12
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+10
-2
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+2
-3
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+132
-127
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
7ab0b200
...
...
@@ -309,7 +309,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
}
}
#if 0
//!TODO : smae function can be written to handle csi_resources
void update_csi_bitlen (NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_list_t *UE_list, int UE_id, module_id_t Mod_idP) {
uint8_t csi_report_id = 0;
...
...
@@ -636,7 +636,7 @@ void update_csi_bitlen (NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_list_t *UE_li
}
}
}
#endif
extern
uint16_t
sl_ahead
;
int
rrc_mac_config_req_gNB
(
module_id_t
Mod_idP
,
...
...
@@ -754,7 +754,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
LOG_I
(
PHY
,
"Modified UE_id %d/%x with secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
update_csi_bitlen
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_list
,
UE_id
,
Mod_idP
);
//
update_csi_bitlen (secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup, UE_list, UE_id, Mod_idP);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG
,
VCD_FUNCTION_OUT
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
7ab0b200
...
...
@@ -310,7 +310,7 @@ void copy_nr_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
}
*/
/*
void nr_schedule_pusch(int Mod_idP,
int UE_id,
int num_slots_per_tdd,
...
...
@@ -321,7 +321,7 @@ void nr_schedule_pusch(int Mod_idP,
nfapi_nr_ul_tti_request_t *UL_tti_req = &RC.nrmac[Mod_idP]->UL_tti_req[0];
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
int k = slotP + ul_slots - num_slots_per_tdd;
NR_sched_pusch
*
pusch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pusch
[
k
];
NR_sched_pusch
_t
*pusch = &UE_info->UE_sched_ctrl[UE_id].sched_pusch[k];
if ((pusch->active == true) && (frameP == pusch->frame) && (slotP == pusch->slot)) {
UL_tti_req->SFN = pusch->frame;
UL_tti_req->Slot = pusch->slot;
...
...
@@ -333,7 +333,7 @@ void nr_schedule_pusch(int Mod_idP,
0, sizeof(NR_sched_pusch));
}
}
*/
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
slot
)
{
return
(
bitmap
>>
slot
)
&
0x01
;
...
...
@@ -348,7 +348,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
,
slot
,
module_idP
);
int
nb_periods_per_frame
;
const
int
UE_id
=
0
;
const
int
bwp_id
=
1
;
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
...
...
@@ -471,12 +470,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This schedules the DCI for Downlink and PDSCH
if
(
is_xlsch_in_slot
(
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
)
&&
slot
<
10
)
{
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
nr_acknack_scheduling
(
module_idP
,
UE_id
,
frame
,
slot
,
num_slots_per_tdd
,
&
pucch_sched
,
&
pucch_occ
);
//TCI handling function
//tci_handling(module_idP, UE_id, CC_id, ue_sched_ctl, frame, slot);
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
,
slot
,
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
pucch_sched
][
pucch_occ
],
NULL
);
ue_sched_ctl
->
ta_apply
=
false
;
//ue_sched_ctl->current_harq_pid = slot % num_slots_per_tdd;
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
7ab0b200
...
...
@@ -40,6 +40,11 @@ extern RAN_CONTEXT_t RC;
#define L1_RSRP_HYSTERIS 10 //considering 10 dBm as hysterisis for avoiding frequent SSB Beam Switching. !Fixme provide exact value if any
//#define L1_DIFF_RSRP_STEP_SIZE 2
void
nr_rx_acknack
(
nfapi_nr_uci_pusch_pdu_t
*
uci_pusch
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
,
NR_UL_IND_t
*
UL_info
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_mac_stats_t
*
stats
);
int
ssb_index_sorted
[
MAX_NUM_SSB
]
=
{
0
};
int
ssb_rsrp_sorted
[
MAX_NUM_SSB
]
=
{
0
};
//Sorts ssb_index and ssb_rsrp array data and keeps in ssb_index_sorted and
...
...
@@ -94,7 +99,6 @@ void nr_schedule_pucch(int Mod_idP,
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
<<<<<<<
HEAD
NR_sched_pucch
*
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
][
l
];
const
uint16_t
O_ack
=
curr_pucch
->
dai_c
;
const
uint16_t
O_csi
=
curr_pucch
->
csi_bits
;
...
...
@@ -555,7 +559,8 @@ void nr_csi_meas_reporting(int Mod_idP,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
)
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
NR_UL_IND_t
*
UL_info
)
{
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
if
(
UE_id
<
0
)
{
...
...
@@ -576,21 +581,22 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
}
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x01
))
{
nr_rx_acknack
(
NULL
,
uci_01
,
NULL
,
UL_info
,
sched_ctrl
,
stats
);
nr_rx_acknack
(
NULL
,
uci_01
,
NULL
,
UL_info
,
sched_ctrl
,
&
UE_info
->
mac_stats
[
0
]
);
}
}
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
frame_t
frame
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
)
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
,
NR_UL_IND_t
*
UL_info
)
{
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
RC
.
nrmac
[
Mod_idP
]
->
UE_list
.
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_234
->
rnti
);
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
return
;
}
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
RC
.
nrmac
[
mod_id
]
->
UE_info
.
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
...
...
@@ -604,29 +610,29 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
uint8_t
sr_id
=
0
;
for
(
sr_id
=
0
;
sr_id
<
uci_234
->
sr
.
sr_bit_len
;
sr_id
++
)
{
sched_ctrl
->
sr_req
.
ul_SR
[
sr_id
]
=
uci_234
->
sr
.
sr_payload
&
1
;
uci_234
->
sr
.
sr_payload
>>=
1
;
sched_ctrl
->
sr_req
.
ul_SR
[
sr_id
]
=
*
(
uci_234
->
sr
.
sr_payload
)
&
1
;
*
(
uci_234
->
sr
.
sr_payload
)
>>=
1
;
}
sched_ctrl
->
sr_req
.
nr_of_srs
=
uci_234
->
sr
.
sr_bit_len
;
}
// TODO
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
nr_rx_acknack
(
NULL
,
NULL
,
uci_234
,
UL_info
,
sched_ctrl
,
stats
);
nr_rx_acknack
(
NULL
,
NULL
,
uci_234
,
UL_info
,
sched_ctrl
,
&
UE_info
->
mac_stats
[
0
]
);
}
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
NR_SubcarrierSpacing_t
scs
=*
(
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
->
ssbSubcarrierSpacing
);
NR_SubcarrierSpacing_t
scs
=*
(
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
->
ssbSubcarrierSpacing
);
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %ld
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
);
//API to parse the csi report and store it into sched_ctrl
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_
pdu
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
,
UE_id
,
Mod_idP
);
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_
234
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
,
UE_id
,
mod_id
);
//TCI handling function
tci_handling
(
Mod_idP
,
UE_id
,
UL_info
->
CC_id
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
);
tci_handling
(
mod_id
,
UE_id
,
UL_info
->
CC_id
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
);
}
if
(
uci_
pdu
->
pduBitmap
&
0x08
)
{
if
(
uci_
234
->
pduBitmap
&
0x08
)
{
///Handle CSI Report 2
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
7ab0b200
...
...
@@ -180,14 +180,22 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
int
ndi
,
int
round
);
void
tci_handling
(
module_id_t
Mod_idP
,
int
UE_id
,
int
CC_id
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
frame_t
frame
,
slot_t
slot
);
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
);
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
NR_UL_IND_t
*
UL_info
);
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
frame_t
frame
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
);
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
,
NR_UL_IND_t
*
UL_info
);
void
config_uldci
(
NR_BWP_Uplink_t
*
ubwp
,
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
7ab0b200
...
...
@@ -84,7 +84,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
const
sub_frame_t
slot
=
UL_info
->
slot
;
int
num_ucis
=
UL_info
->
uci_ind
.
num_ucis
;
nfapi_nr_uci_t
*
uci_list
=
UL_info
->
uci_ind
.
uci_list
;
uint8_t
UE_id
=
0
;
for
(
int
i
=
0
;
i
<
num_ucis
;
i
++
)
{
switch
(
uci_list
[
i
].
pdu_type
)
{
...
...
@@ -94,13 +93,13 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
case
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
:
{
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
=
&
uci_list
[
i
].
pucch_pdu_format_0_1
;
handle_nr_uci_pucch_0_1
(
mod_id
,
frame
,
slot
,
uci_pdu
);
handle_nr_uci_pucch_0_1
(
mod_id
,
frame
,
slot
,
uci_pdu
,
UL_info
);
break
;
}
case
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE
:
{
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
=
&
uci_list
[
i
].
pucch_pdu_format_2_3_4
;
handle_nr_uci_pucch_2_3_4
(
mod_id
,
frame
,
slot
,
uci_pdu
);
handle_nr_uci_pucch_2_3_4
(
mod_id
,
frame
,
slot
,
uci_pdu
,
UL_info
);
break
;
}
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
7ab0b200
...
...
@@ -58,47 +58,33 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
AssertFatal
(
servingcellconfigcommon
!=
NULL
,
"servingcellconfigcommon is null
\n
"
);
AssertFatal
(
secondaryCellGroup
!=
NULL
,
"secondaryCellGroup is null
\n
"
);
if
(
servingcellconfigcommon
->
ssb_PositionsInBurst
->
present
!=
2
)
AssertFatal
(
1
==
0
,
"Currenrly implemented only for medium size SSB bitmap
\n
"
);
uint8_t
bitmap
=
servingcellconfigcommon
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
];
uint64_t
bitmap
=
0
;
switch
(
servingcellconfigcommon
->
ssb_PositionsInBurst
->
present
)
{
case
1
:
bitmap
=
((
uint64_t
)
servingcellconfigcommon
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
])
<<
56
;
break
;
case
2
:
bitmap
=
((
uint64_t
)
servingcellconfigcommon
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
])
<<
56
;
break
;
case
3
:
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
bitmap
|=
(((
uint64_t
)
servingcellconfigcommon
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
])
<<
((
7
-
i
)
*
8
));
}
break
;
default:
AssertFatal
(
1
==
0
,
"SSB bitmap size value %d undefined (allowed values 1,2,3)
\n
"
,
servingcellconfigcommon
->
ssb_PositionsInBurst
->
present
);
}
memset
(
secondaryCellGroup
,
0
,
sizeof
(
NR_CellGroupConfig_t
));
secondaryCellGroup
->
cellGroupId
=
scg_id
;
NR_RLC_BearerConfig_t
*
RLC_BearerConfig
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
));
RLC_BearerConfig
->
logicalChannelIdentity
=
4
;
RLC_BearerConfig
->
servedRadioBearer
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
servedRadioBearer
));
RLC_BearerConfig
->
servedRadioBearer
->
present
=
NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity
;
RLC_BearerConfig
->
servedRadioBearer
->
choice
.
drb_Identity
=
1
;
RLC_BearerConfig
->
reestablishRLC
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
reestablishRLC
));
*
RLC_BearerConfig
->
reestablishRLC
=
NR_RLC_BearerConfig__reestablishRLC_true
;
RLC_BearerConfig
->
rlc_Config
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
rlc_Config
));
RLC_BearerConfig
->
rlc_Config
->
present
=
NR_RLC_Config_PR_am
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
));
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
sn_FieldLength
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
sn_FieldLength
));
*
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
sn_FieldLength
=
NR_SN_FieldLengthAM_size18
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
t_PollRetransmit
=
NR_T_PollRetransmit_ms45
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
pollPDU
=
NR_PollPDU_p64
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
pollByte
=
NR_PollByte_kB500
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
ul_AM_RLC
.
maxRetxThreshold
=
NR_UL_AM_RLC__maxRetxThreshold_t32
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
sn_FieldLength
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
sn_FieldLength
));
*
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
sn_FieldLength
=
NR_SN_FieldLengthAM_size18
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
t_Reassembly
=
NR_T_Reassembly_ms15
;
RLC_BearerConfig
->
rlc_Config
->
choice
.
am
->
dl_AM_RLC
.
t_StatusProhibit
=
NR_T_StatusProhibit_ms15
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
mac_LogicalChannelConfig
));
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
));
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
priority
=
1
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
prioritisedBitRate
=
NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
bucketSizeDuration
=
NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
allowedServingCells
=
NULL
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
allowedSCS_List
=
NULL
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
maxPUSCH_Duration
=
NULL
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
configuredGrantType1Allowed
=
NULL
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelGroup
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelGroup
));
*
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelGroup
=
1
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
schedulingRequestID
=
NULL
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelSR_Mask
=
false
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
logicalChannelSR_DelayTimerApplied
=
false
;
RLC_BearerConfig
->
mac_LogicalChannelConfig
->
ul_SpecificParameters
->
bitRateQueryProhibitTimer
=
NULL
;
nr_rlc_bearer_init
(
RLC_BearerConfig
);
if
(
get_softmodem_params
()
->
do_ra
)
nr_drb_config
(
RLC_BearerConfig
->
rlc_Config
,
NR_RLC_Config_PR_um_Bi_Directional
);
else
nr_drb_config
(
RLC_BearerConfig
->
rlc_Config
,
NR_RLC_Config_PR_am
);
nr_rlc_bearer_init_ul_spec
(
RLC_BearerConfig
->
mac_LogicalChannelConfig
);
secondaryCellGroup
->
rlc_BearerToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
rlc_BearerToAddModList
));
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
rlc_BearerToAddModList
->
list
,
RLC_BearerConfig
);
secondaryCellGroup
->
mac_CellGroupConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
));
...
...
@@ -156,18 +142,46 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
occasions
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA__occasions
));
memcpy
(
&
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
occasions
->
rach_ConfigGeneric
,
&
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
,
sizeof
(
NR_RACH_ConfigGeneric_t
));
//secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->ssb_perRACH_Occasion= calloc(1,sizeof(long));
//*secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->ssb_perRACH_Occasion = NR_CFRA__occasions__ssb_perRACH_Occasion_one;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
occasions
->
ssb_perRACH_Occasion
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
occasions
->
ssb_perRACH_Occasion
=
calloc
(
1
,
sizeof
(
long
));
*
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
occasions
->
ssb_perRACH_Occasion
=
NR_CFRA__occasions__ssb_perRACH_Occasion_one
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
present
=
NR_CFRA__resources_PR_ssb
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA__resources__ssb
));
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ra_ssb_OccasionMaskIndex
=
0
;
//from NR_CSI_Reporting branch
struct
NR_CFRA_SSB_Resource
*
ssbElem
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA_SSB_Resource
));
ssbElem
->
ssb
=
0
;
ssbElem
->
ra_PreambleIndex
=
63
;
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
,
ssbElem
);
//
struct
NR_CFRA_SSB_Resource
*
ssbElem
[
8
];
ssbElem
[
0
]
=
calloc
(
1
,
sizeof
(
struct
NR_CFRA_SSB_Resource
));
ssbElem
[
0
]
->
ssb
=
0
;
ssbElem
[
0
]
->
ra_PreambleIndex
=
63
;
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
,
ssbElem
[
0
]);
#if 0
ssbElem[1] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[1]->ssb = 1;
ssbElem[1]->ra_PreambleIndex = 62;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[1]);
ssbElem[2] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[2]->ssb = 2;
ssbElem[2]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[2]);
ssbElem[3] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[3]->ssb = 3;
ssbElem[3]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[3]);
ssbElem[4] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[4]->ssb = 4;
ssbElem[4]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[4]);
ssbElem[5] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[5]->ssb = 5;
ssbElem[5]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[5]);
ssbElem[6] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[6]->ssb = 6;
ssbElem[6]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[6]);
ssbElem[7] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[7]->ssb = 7;
ssbElem[7]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[7]);
#endif
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
ext1
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
present
=
NR_SetupRelease_RLF_TimersAndConstants_PR_setup
;
...
...
@@ -176,7 +190,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n310
=
NR_RLF_TimersAndConstants__n310_n10
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n311
=
NR_RLF_TimersAndConstants__n311_n1
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
->
t311
_v1530
=
NR_RLF_TimersAndConstants__ext1__t311_v1530
_ms30000
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
->
t311
=
NR_RLF_TimersAndConstants__ext1__t311
_ms30000
;
secondaryCellGroup
->
spCellConfig
->
rlmInSyncOutOfSyncThreshold
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
tdd_UL_DL_ConfigurationDedicated
=
NULL
;
...
...
@@ -203,11 +217,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
//NR_CSI_Reporting branch
int
n_ssb
=
0
;
NR_TCI_State_t
*
tcic
[
8
];
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
((
bitmap
>>
(
7
-
i
))
&
0x01
){
NR_TCI_State_t
*
tcic
[
64
];
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
if
((
bitmap
>>
(
63
-
i
))
&
0x01
){
tcic
[
i
]
=
calloc
(
1
,
sizeof
(
*
tcic
[
i
]));
tcic
[
i
]
->
tci_StateId
=
n_ssb
;
tcic
[
i
]
->
qcl_Type1
.
cell
=
NULL
;
...
...
@@ -221,7 +235,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
}
}
//
#if 0
NR_TCI_State_t*tci0=calloc(1,sizeof(*tci0));
...
...
@@ -316,7 +330,12 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup1
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup2
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
rbg_Size
=
NR_PDSCH_Config__rbg_Size_config1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
if
(
!
get_softmodem_params
()
->
use_256qam_table
)
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
else
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
present
=
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
;
...
...
@@ -366,12 +385,21 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
controlResourceSetZero
=
NULL
;
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonControlResourceSet
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonControlResourceSet
));
int
curr_bwp
=
NRRIV2BW
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
NR_ControlResourceSet_t
*
coreset
=
calloc
(
1
,
sizeof
(
*
coreset
));
coreset
->
controlResourceSetId
=
1
;
// frequencyDomainResources '11111111 11111111 00000000 00000000 00000000 00000'B,
// frequency domain resources depends on BWP size
// options are 24, 48 or 96
coreset
->
frequencyDomainResources
.
buf
=
calloc
(
1
,
6
);
coreset
->
frequencyDomainResources
.
buf
[
0
]
=
0xff
;
coreset
->
frequencyDomainResources
.
buf
[
1
]
=
0xff
;
if
(
curr_bwp
<
48
)
coreset
->
frequencyDomainResources
.
buf
[
0
]
=
0xf0
;
else
coreset
->
frequencyDomainResources
.
buf
[
0
]
=
0xff
;
if
(
curr_bwp
<
96
)
coreset
->
frequencyDomainResources
.
buf
[
1
]
=
0
;
else
coreset
->
frequencyDomainResources
.
buf
[
1
]
=
0xff
;
coreset
->
frequencyDomainResources
.
buf
[
2
]
=
0
;
coreset
->
frequencyDomainResources
.
buf
[
3
]
=
0
;
coreset
->
frequencyDomainResources
.
buf
[
4
]
=
0
;
...
...
@@ -383,9 +411,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
coreset
->
precoderGranularity
=
NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle
;
coreset
->
tci_StatesPDCCH_ToAddList
=
calloc
(
1
,
sizeof
(
*
coreset
->
tci_StatesPDCCH_ToAddList
));
NR_TCI_StateId_t
*
tci
[
8
];
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
((
bitmap
>>
(
7
-
i
))
&
0x01
){
//NR_CSI_Reporting
NR_TCI_StateId_t
*
tci
[
64
];
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
if
((
bitmap
>>
(
63
-
i
))
&
0x01
){
tci
[
i
]
=
calloc
(
1
,
sizeof
(
*
tci
[
i
]));
*
tci
[
i
]
=
i
;
ASN_SEQUENCE_ADD
(
&
coreset
->
tci_StatesPDCCH_ToAddList
->
list
,
tci
[
i
]);
...
...
@@ -485,7 +513,12 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ss2
->
nrofCandidates
=
calloc
(
1
,
sizeof
(
*
ss2
->
nrofCandidates
));
ss2
->
nrofCandidates
->
aggregationLevel1
=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
;
ss2
->
nrofCandidates
->
aggregationLevel2
=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
;
ss2
->
nrofCandidates
->
aggregationLevel4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n4
;
if
(
curr_bwp
<
48
)
ss2
->
nrofCandidates
->
aggregationLevel4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n1
;
else
if
(
curr_bwp
<
96
)
ss2
->
nrofCandidates
->
aggregationLevel4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n2
;
else
ss2
->
nrofCandidates
->
aggregationLevel4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n4
;
ss2
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss2
->
nrofCandidates
->
aggregationLevel16
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
ss2
->
searchSpaceType
=
calloc
(
1
,
sizeof
(
*
ss2
->
searchSpaceType
));
...
...
@@ -518,10 +551,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
;
//NR_CSI_Reporting
//bwp->bwp_Dedicated->pdsch_Config->choice.setup->tci_StatesToAddModList=NULL;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
//
#if 0
bwp->bwp_Dedicated->pdsch_Config->choice.setup->tci_StatesToAddModList=calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->tci_StatesToAddModList));
...
...
@@ -604,14 +636,13 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
tcid7->qcl_Type1.referenceSignal.choice.csi_rs = 30;
tcid7->qcl_Type1.qcl_Type=NR_QCL_Info__qcl_Type_typeA;
ASN_SEQUENCE_ADD(&bwp->bwp_Dedicated->pdsch_Config->choice.setup->tci_StatesToAddModList->list,tcid7);
//NR_CSI_Reporting
#endif
n_ssb
=
0
;
NR_TCI_State_t
*
tcid
[
8
];
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
((
bitmap
>>
(
7
-
i
))
&
0x01
){
NR_TCI_State_t
*
tcid
[
64
];
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
if
((
bitmap
>>
(
63
-
i
))
&
0x01
){
tcid
[
i
]
=
calloc
(
1
,
sizeof
(
*
tcid
[
i
]));
tcid
[
i
]
->
tci_StateId
=
n_ssb
;
tcid
[
i
]
->
qcl_Type1
.
cell
=
NULL
;
...
...
@@ -624,7 +655,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
n_ssb
++
;
}
}
//
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
vrb_ToPRB_Interleaver
=
NULL
;
...
...
@@ -636,7 +667,12 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup1
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup2
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rbg_Size
=
NR_PDSCH_Config__rbg_Size_config1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
if
(
!
get_softmodem_params
()
->
use_256qam_table
)
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
else
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
present
=
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
;
...
...
@@ -662,7 +698,12 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup1
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup2
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rbg_Size
=
NR_PDSCH_Config__rbg_Size_config1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
if
(
!
get_softmodem_params
()
->
use_256qam_table
)
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
else
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
present
=
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
;
...
...
@@ -850,7 +891,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucchresset0
->
resourceList
.
list
,
pucchresset0id0
);
*
pucchresset0id1
=
2
;
ASN_SEQUENCE_ADD
(
&
pucchresset0
->
resourceList
.
list
,
pucchresset0id1
);
pucchresset0
->
maxPayload
Minus1
=
NULL
;
pucchresset0
->
maxPayload
Size
=
NULL
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceSetToAddModList
->
list
,
pucchresset0
);
...
...
@@ -861,7 +902,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucchresset1
->
resourceList
.
list
,
pucchresset1id0
);
*
pucchresset1id1
=
4
;
ASN_SEQUENCE_ADD
(
&
pucchresset1
->
resourceList
.
list
,
pucchresset1id1
);
pucchresset1
->
maxPayload
Minus1
=
NULL
;
pucchresset1
->
maxPayload
Size
=
NULL
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceSetToAddModList
->
list
,
pucchresset1
);
pucch_Config
->
resourceToAddModList
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
resourceToAddModList
));
...
...
@@ -871,7 +912,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_PUCCH_Resource_t
*
pucchres2
=
calloc
(
1
,
sizeof
(
*
pucchres2
));
NR_PUCCH_Resource_t
*
pucchres3
=
calloc
(
1
,
sizeof
(
*
pucchres3
));
pucchres0
->
pucch_ResourceId
=
1
;
pucchres0
->
startingPRB
=
4
8
;
pucchres0
->
startingPRB
=
8
;
pucchres0
->
intraSlotFrequencyHopping
=
NULL
;
pucchres0
->
secondHopPRB
=
NULL
;
pucchres0
->
format
.
present
=
NR_PUCCH_Resource__format_PR_format0
;
...
...
@@ -882,7 +923,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceToAddModList
->
list
,
pucchres0
);
pucchres1
->
pucch_ResourceId
=
2
;
pucchres1
->
startingPRB
=
4
8
;
pucchres1
->
startingPRB
=
8
;
pucchres1
->
intraSlotFrequencyHopping
=
NULL
;
pucchres1
->
secondHopPRB
=
NULL
;
pucchres1
->
format
.
present
=
NR_PUCCH_Resource__format_PR_format0
;
...
...
@@ -893,23 +934,23 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceToAddModList
->
list
,
pucchres1
);
pucchres2
->
pucch_ResourceId
=
3
;
pucchres2
->
startingPRB
=
4
0
;
pucchres2
->
startingPRB
=
0
;
pucchres2
->
intraSlotFrequencyHopping
=
NULL
;
pucchres2
->
secondHopPRB
=
NULL
;
pucchres2
->
format
.
present
=
NR_PUCCH_Resource__format_PR_format2
;
pucchres2
->
format
.
choice
.
format2
=
calloc
(
1
,
sizeof
(
*
pucchres2
->
format
.
choice
.
format2
));
pucchres2
->
format
.
choice
.
format2
->
nrofPRBs
=
16
;
pucchres2
->
format
.
choice
.
format2
->
nrofPRBs
=
8
;
pucchres2
->
format
.
choice
.
format2
->
nrofSymbols
=
1
;
pucchres2
->
format
.
choice
.
format2
->
startingSymbolIndex
=
13
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceToAddModList
->
list
,
pucchres2
);
pucchres3
->
pucch_ResourceId
=
4
;
pucchres3
->
startingPRB
=
4
0
;
pucchres3
->
startingPRB
=
0
;
pucchres3
->
intraSlotFrequencyHopping
=
NULL
;
pucchres3
->
secondHopPRB
=
NULL
;
pucchres3
->
format
.
present
=
NR_PUCCH_Resource__format_PR_format2
;
pucchres3
->
format
.
choice
.
format2
=
calloc
(
1
,
sizeof
(
*
pucchres3
->
format
.
choice
.
format2
));
pucchres3
->
format
.
choice
.
format2
->
nrofPRBs
=
16
;
pucchres3
->
format
.
choice
.
format2
->
nrofPRBs
=
8
;
pucchres3
->
format
.
choice
.
format2
->
nrofSymbols
=
1
;
pucchres3
->
format
.
choice
.
format2
->
startingSymbolIndex
=
12
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceToAddModList
->
list
,
pucchres3
);
...
...
@@ -921,7 +962,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchfmt2
->
interslotFrequencyHopping
=
NULL
;
pucchfmt2
->
additionalDMRS
=
NULL
;
pucchfmt2
->
maxCodeRate
=
calloc
(
1
,
sizeof
(
*
pucchfmt2
->
maxCodeRate
));
*
pucchfmt2
->
maxCodeRate
=
NR_PUCCH_MaxCodeRate_zeroDot
1
5
;
*
pucchfmt2
->
maxCodeRate
=
NR_PUCCH_MaxCodeRate_zeroDot
2
5
;
pucchfmt2
->
nrofSlots
=
NULL
;
pucchfmt2
->
pi2BPSK
=
NULL
;
pucchfmt2
->
simultaneousHARQ_ACK_CSI
=
NULL
;
...
...
@@ -1032,45 +1073,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CSI_SSB_ResourceSet_t
*
ssbresset0
=
calloc
(
1
,
sizeof
(
*
ssbresset0
));
ssbresset0
->
csi_SSB_ResourceSetId
=
0
;
if
((
bitmap
>>
7
)
&
0x01
){
NR_SSB_Index_t
*
ssbresset00
=
calloc
(
1
,
sizeof
(
*
ssbresset00
));
*
ssbresset00
=
0
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset00
);
}
if
((
bitmap
>>
6
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset01
=
calloc
(
1
,
sizeof
(
*
ssbresset01
));
*
ssbresset01
=
1
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset01
);
}
if
((
bitmap
>>
5
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset02
=
calloc
(
1
,
sizeof
(
*
ssbresset02
));
*
ssbresset02
=
2
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset02
);
}
if
((
bitmap
>>
4
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset03
=
calloc
(
1
,
sizeof
(
*
ssbresset03
));
*
ssbresset03
=
3
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset03
);
}
if
((
bitmap
>>
3
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset04
=
calloc
(
1
,
sizeof
(
*
ssbresset04
));
*
ssbresset04
=
4
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset04
);
}
if
((
bitmap
>>
2
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset05
=
calloc
(
1
,
sizeof
(
*
ssbresset05
));
*
ssbresset05
=
5
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset05
);
}
if
((
bitmap
>>
1
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset06
=
calloc
(
1
,
sizeof
(
*
ssbresset06
));
*
ssbresset06
=
6
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset06
);
}
if
((
bitmap
)
&
0x01
)
{
NR_SSB_Index_t
*
ssbresset07
=
calloc
(
1
,
sizeof
(
*
ssbresset07
));
*
ssbresset07
=
7
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset07
);
NR_SSB_Index_t
*
ssbresset
[
64
];
for
(
int
i
=
0
;
i
<
64
;
i
++
)
{
if
((
bitmap
>>
(
63
-
i
))
&
0x01
){
ssbresset
[
i
]
=
calloc
(
1
,
sizeof
(
*
ssbresset
[
i
]));
*
ssbresset
[
i
]
=
i
;
ASN_SEQUENCE_ADD
(
&
ssbresset0
->
csi_SSB_ResourceList
.
list
,
ssbresset
[
i
]);
}
}
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
,
ssbresset0
);
...
...
@@ -1080,14 +1090,10 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
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
=
NULL
;
//calloc(1,sizeof(*csires0->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB->nzp_CSI_RS_ResourceSetList));
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
));
//NULL;
//NR_NZP_CSI_RS_ResourceSetId_t *csires00 = calloc(1,sizeof(*csires00));
//For verification of CSI measurment for SSB
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
=
NULL
;
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
));
NR_CSI_SSB_ResourceSetId_t
*
ssbres00
=
calloc
(
1
,
sizeof
(
*
ssbres00
));
//*csires00 = 0;
*
ssbres00
=
0
;
//ASN_SEQUENCE_ADD(&csires0->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB->nzp_CSI_RS_ResourceSetList->list,csires00);
ASN_SEQUENCE_ADD
(
&
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
,
ssbres00
);
csires0
->
bwp_Id
=
1
;
csires0
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
...
...
@@ -1098,7 +1104,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
NR_CSI_ReportConfig_t
*
csirep1
=
calloc
(
1
,
sizeof
(
*
csirep1
));
csirep1
->
reportConfigId
=
0
;
csirep1
->
carrier
=
NULL
;
csirep1
->
resourcesForChannelMeasurement
=
0
;
//initial_csi_index; Just for verification
csirep1
->
resourcesForChannelMeasurement
=
0
;
csirep1
->
csi_IM_ResourcesForInterference
=
NULL
;
csirep1
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep1
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
...
...
@@ -1107,7 +1113,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
49
;
NR_PUCCH_CSI_Resource_t
*
pucchcsires1
=
calloc
(
1
,
sizeof
(
*
pucchcsires1
));
pucchcsires1
->
uplinkBandwidthPartId
=
1
;
pucchcsires1
->
pucch_Resource
=
3
;
//4;//12;
pucchcsires1
->
pucch_Resource
=
3
;
ASN_SEQUENCE_ADD
(
&
csirep1
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep1
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
;
csirep1
->
reportQuantity
.
choice
.
ssb_Index_RSRP
=
(
NULL_t
)
0
;
...
...
@@ -1154,7 +1160,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
,
csirep1
);
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
sCellDeactivationTimer
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
crossCarrierSchedulingConfig
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
tag_Id
=
0
;
...
...
@@ -1163,7 +1168,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
servingCellMO
=
NULL
;
}
void
fill_default_reconfig
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
...
...
@@ -1272,3 +1276,4 @@ void rrc_config_dl_ptrs_params(NR_BWP_Downlink_t *bwp, int *ptrsNrb, int *ptrsMc
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
=
*
reOffset
;
}
#endif
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