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
ZhouShuya
OpenXG-RAN
Commits
e8f82978
Commit
e8f82978
authored
4 years ago
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix search space and coreset for Msg2 and Msg4 at gNB
parent
a8ca37a7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
81 deletions
+94
-81
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+31
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+59
-66
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+3
-13
No files found.
openair2/GNB_APP/gnb_config.c
View file @
e8f82978
...
...
@@ -123,7 +123,37 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
=
CALLOC
(
1
,
sizeof
(
struct
NR_PDCCH_ConfigCommon
));
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
controlResourceSetZero
=
CALLOC
(
1
,
sizeof
(
long
));
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
searchSpaceZero
=
CALLOC
(
1
,
sizeof
(
long
));
// scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet));
NR_ControlResourceSet_t
*
coreset0
=
CALLOC
(
1
,
sizeof
(
struct
NR_ControlResourceSet
));
coreset0
->
controlResourceSetId
=
0
;
// frequencyDomainResources '11111111 00000000 00000000 00000000 00000000 00000'B,
if
(
coreset0
->
frequencyDomainResources
.
buf
==
NULL
)
coreset0
->
frequencyDomainResources
.
buf
=
calloc
(
1
,
6
);
coreset0
->
frequencyDomainResources
.
buf
[
0
]
=
0xff
;
coreset0
->
frequencyDomainResources
.
buf
[
1
]
=
0
;
coreset0
->
frequencyDomainResources
.
buf
[
2
]
=
0
;
coreset0
->
frequencyDomainResources
.
buf
[
3
]
=
0
;
coreset0
->
frequencyDomainResources
.
buf
[
4
]
=
0
;
coreset0
->
frequencyDomainResources
.
buf
[
5
]
=
0
;
coreset0
->
frequencyDomainResources
.
size
=
6
;
coreset0
->
frequencyDomainResources
.
bits_unused
=
3
;
coreset0
->
duration
=
1
;
coreset0
->
cce_REG_MappingType
.
present
=
NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved
;
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
=
calloc
(
1
,
sizeof
(
*
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
));
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
=
NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6
;
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
=
NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2
;
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
=
scc
->
physCellId
;
coreset0
->
precoderGranularity
=
NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle
;
if
(
coreset0
->
tci_StatesPDCCH_ToAddList
==
NULL
)
coreset0
->
tci_StatesPDCCH_ToAddList
=
calloc
(
1
,
sizeof
(
*
coreset0
->
tci_StatesPDCCH_ToAddList
));
NR_TCI_StateId_t
*
tci
[
8
];
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
tci
[
i
]
=
calloc
(
1
,
sizeof
(
*
tci
[
i
]));
*
tci
[
i
]
=
i
;
ASN_SEQUENCE_ADD
(
&
coreset0
->
tci_StatesPDCCH_ToAddList
->
list
,
tci
[
i
]);
}
coreset0
->
tci_StatesPDCCH_ToReleaseList
=
NULL
;
coreset0
->
tci_PresentInDCI
=
NULL
;
coreset0
->
pdcch_DMRS_ScramblingID
=
NULL
;
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonControlResourceSet
=
coreset0
;
// scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList));
// scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t));
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
e8f82978
...
...
@@ -528,10 +528,11 @@ void nr_initiate_ra_proc(module_id_t module_idP,
else
ra_rnti
=
1
+
symbol
+
(
slotP
*
14
)
+
(
freq_index
*
14
*
80
)
+
(
ul_carrier_id
*
14
*
80
*
8
);
// This should be handled differently when we use the initialBWP for RA
ra
->
bwp_id
=
1
;
NR_BWP_Downlink_t
*
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_BWP_Downlink_t
*
bwp
=
NULL
;
// For SA we use InitialBWP
if
(
get_softmodem_params
()
->
sa
!=
1
)
{
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC
,
1
);
...
...
@@ -562,13 +563,21 @@ void nr_initiate_ra_proc(module_id_t module_idP,
ra
->
timing_offset
=
timing_offset
;
ra
->
preamble_slot
=
slotP
;
struct
NR_PDCCH_ConfigCommon__commonSearchSpaceList
*
commonSearchSpaceList
=
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
NR_SearchSpaceId_t
ra_SearchSpace
=
0
;
struct
NR_PDCCH_ConfigCommon__commonSearchSpaceList
*
commonSearchSpaceList
=
NULL
;
if
(
bwp
)
{
commonSearchSpaceList
=
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
ra_SearchSpace
=
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
;
}
else
{
commonSearchSpaceList
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
ra_SearchSpace
=
*
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
;
}
AssertFatal
(
commonSearchSpaceList
->
list
.
count
>
0
,
"common SearchSpace list has 0 elements
\n
"
);
// Common searchspace list
for
(
int
i
=
0
;
i
<
commonSearchSpaceList
->
list
.
count
;
i
++
)
{
ss
=
commonSearchSpaceList
->
list
.
array
[
i
];
if
(
ss
->
searchSpaceId
==
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
)
if
(
ss
->
searchSpaceId
==
ra_SearchSpace
)
ra
->
ra_ss
=
ss
;
}
...
...
@@ -866,30 +875,27 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
int
rbSize
=
8
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_SearchSpace_t
*
ss
=
ra
->
ra_ss
;
long
BWPSize
=
NRRIV2BW
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
NR_SearchSpace_t
*
ss
=
NULL
;
if
(
ra
->
ra_ss
)
{
ss
=
ra
->
ra_ss
;
}
else
{
if
(
nr_mac
->
sched_ctrlCommon
==
NULL
){
nr_mac
->
sched_ctrlCommon
=
calloc
(
1
,
sizeof
(
*
nr_mac
->
sched_ctrlCommon
));
}
if
(
nr_mac
->
sched_ctrlCommon
->
search_space
==
NULL
)
{
nr_mac
->
sched_ctrlCommon
->
search_space
=
calloc
(
1
,
sizeof
(
*
nr_mac
->
sched_ctrlCommon
->
search_space
));
fill_default_searchSpaceZero
(
nr_mac
->
sched_ctrlCommon
->
search_space
);
}
ss
=
nr_mac
->
sched_ctrlCommon
->
search_space
;
NR_BWP_Downlink_t
*
bwp
=
NULL
;
// For SA we use InitialBWP
if
(
get_softmodem_params
()
->
sa
!=
1
)
{
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
}
NR_BWP_Downlink_t
*
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
bwp
,
ss
,
0
);
NR_ControlResourceSet_t
*
coreset
=
NULL
;
if
(
bwp
)
{
coreset
=
get_coreset
(
bwp
,
ss
,
0
);
}
else
{
coreset
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonControlResourceSet
;
}
long
BWPStart
=
0
;
if
(
get_softmodem_params
()
->
sa
)
{
BWPStart
=
NRRIV2PRBOFFSET
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
}
else
{
// NSA mode is not using the Initial BWP
if
(
get_softmodem_params
()
->
sa
!=
1
)
{
BWPStart
=
NRRIV2PRBOFFSET
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
}
else
{
BWPStart
=
NRRIV2PRBOFFSET
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
}
uint16_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
...
...
@@ -923,7 +929,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Calculate number of symbols
int
startSymbolIndex
,
nrOfSymbols
;
const
int
startSymbolAndLength
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
array
[
time_domain_assignment
]
->
startSymbolAndLength
;
const
int
startSymbolAndLength
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
]
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
array
[
time_domain_assignment
]
->
startSymbolAndLength
;
SLIV2SL
(
startSymbolAndLength
,
&
startSymbolIndex
,
&
nrOfSymbols
);
AssertFatal
(
startSymbolIndex
>=
0
,
"StartSymbolIndex is negative
\n
"
);
...
...
@@ -934,9 +942,8 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially
// important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them
const
int
bwpid
=
bwp
->
bwp_Id
;
const
int
coresetid
=
coreset
->
controlResourceSetId
;
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
bwp
id
][
coresetid
];
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
ra
->
bwp_
id
][
coresetid
];
if
(
!
pdcch_pdu_rel15
)
{
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdcch_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
memset
(
dl_tti_pdcch_pdu
,
0
,
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
...
...
@@ -945,14 +952,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
dl_req
->
nPDUs
+=
1
;
pdcch_pdu_rel15
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
nr_configure_pdcch
(
pdcch_pdu_rel15
,
ss
,
coreset
,
scc
,
bwp
);
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
bwpid
][
coresetid
]
=
pdcch_pdu_rel15
;
}
// TODO: This assignment should be done in function nr_configure_pdcch()
if
(
get_softmodem_params
()
->
sa
)
{
pdcch_pdu_rel15
->
CoreSetType
=
NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0
;
pdcch_pdu_rel15
->
BWPSize
=
NRRIV2BW
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
pdcch_pdu_rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
ra
->
bwp_id
][
coresetid
]
=
pdcch_pdu_rel15
;
}
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdsch_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
...
...
@@ -976,7 +976,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
const
int
pduindex
=
nr_mac
->
pdu_index
[
CC_id
]
++
;
uint8_t
mcsTableIdx
=
0
;
if
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
NULL
)
if
(
bwp
==
NULL
||
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
NULL
)
mcsTableIdx
=
0
;
else
{
if
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
0
)
...
...
@@ -994,7 +994,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
pduIndex
=
pduindex
;
pdsch_pdu_rel15
->
BWPSize
=
BWPSize
;
pdsch_pdu_rel15
->
BWPStart
=
BWPStart
;
pdsch_pdu_rel15
->
SubcarrierSpacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
pdsch_pdu_rel15
->
SubcarrierSpacing
=
bwp
!=
NULL
?
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
pdsch_pdu_rel15
->
CyclicPrefix
=
0
;
pdsch_pdu_rel15
->
NrOfCodewords
=
1
;
pdsch_pdu_rel15
->
targetCodeRate
[
0
]
=
nr_get_code_rate_dl
(
mcsIndex
,
mcsTableIdx
);
...
...
@@ -1006,7 +1006,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
nrOfLayers
=
1
;
pdsch_pdu_rel15
->
transmissionScheme
=
0
;
pdsch_pdu_rel15
->
refPoint
=
0
;
pdsch_pdu_rel15
->
dmrsConfigType
=
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
pdsch_pdu_rel15
->
dmrsConfigType
=
bwp
!=
NULL
?
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
)
:
0
;
pdsch_pdu_rel15
->
dlDmrsScramblingId
=
*
scc
->
physCellId
;
pdsch_pdu_rel15
->
SCID
=
0
;
pdsch_pdu_rel15
->
numDmrsCdmGrpsNoData
=
numDmrsCdmGrpsNoData
;
...
...
@@ -1074,7 +1074,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
NR_DL_DCI_FORMAT_1_0
,
NR_RNTI_RA
,
pdsch_pdu_rel15
->
BWPSize
,
bwp
->
bwp_I
d
);
ra
->
bwp_i
d
);
// DL TX request
nfapi_nr_pdu_t
*
tx_req
=
&
nr_mac
->
TX_req
[
CC_id
].
pdu_list
[
nr_mac
->
TX_req
[
CC_id
].
Number_of_PDUs
];
...
...
@@ -1119,28 +1119,25 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
uint8_t
time_domain_assignment
=
0
;
uint8_t
mcsIndex
=
0
;
NR_SearchSpace_t
*
ss
=
NULL
;
if
(
ra
->
ra_ss
)
{
ss
=
ra
->
ra_ss
;
}
else
{
if
(
nr_mac
->
sched_ctrlCommon
==
NULL
){
nr_mac
->
sched_ctrlCommon
=
calloc
(
1
,
sizeof
(
*
nr_mac
->
sched_ctrlCommon
));
}
if
(
nr_mac
->
sched_ctrlCommon
->
search_space
==
NULL
)
{
nr_mac
->
sched_ctrlCommon
->
search_space
=
calloc
(
1
,
sizeof
(
*
nr_mac
->
sched_ctrlCommon
->
search_space
));
fill_default_searchSpaceZero
(
nr_mac
->
sched_ctrlCommon
->
search_space
);
}
ss
=
nr_mac
->
sched_ctrlCommon
->
search_space
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_SearchSpace_t
*
ss
=
ra
->
ra_ss
;
NR_BWP_Downlink_t
*
bwp
=
NULL
;
// For SA we use InitialBWP
if
(
get_softmodem_params
()
->
sa
!=
1
)
{
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
}
NR_BWP_Downlink_t
*
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
bwp
,
ss
,
0
);
NR_ControlResourceSet_t
*
coreset
=
NULL
;
if
(
bwp
)
{
coreset
=
get_coreset
(
bwp
,
ss
,
0
);
}
else
{
coreset
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonControlResourceSet
;
}
int
UE_id
=
find_nr_UE_id
(
module_idP
,
ra
->
rnti
);
NR_UE_info_t
*
UE_info
=
&
nr_mac
->
UE_info
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
long
BWPSize
=
NRRIV2BW
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
long
BWPStart
=
NRRIV2PRBOFFSET
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -1180,7 +1177,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Calculate number of symbols
int
startSymbolIndex
,
nrOfSymbols
;
const
int
startSymbolAndLength
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
array
[
time_domain_assignment
]
->
startSymbolAndLength
;
const
int
startSymbolAndLength
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
]
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
array
[
time_domain_assignment
]
->
startSymbolAndLength
;
SLIV2SL
(
startSymbolAndLength
,
&
startSymbolIndex
,
&
nrOfSymbols
);
AssertFatal
(
startSymbolIndex
>=
0
,
"StartSymbolIndex is negative
\n
"
);
...
...
@@ -1191,7 +1190,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
uint16_t
N_DMRS_SLOT
=
get_num_dmrs
(
dlDmrsSymbPos
);
long
dmrsConfigType
=
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
long
dmrsConfigType
=
bwp
!=
NULL
?
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
)
:
0
;
uint8_t
N_PRB_DMRS
=
0
;
AssertFatal
(
nr_mac
->
sched_ctrlCommon
->
numDmrsCdmGrpsNoData
==
1
||
nr_mac
->
sched_ctrlCommon
->
numDmrsCdmGrpsNoData
==
2
,
...
...
@@ -1206,7 +1205,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
}
uint8_t
mcsTableIdx
=
0
;
if
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
NULL
)
if
(
bwp
==
NULL
||
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
NULL
)
mcsTableIdx
=
0
;
else
{
if
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
0
)
...
...
@@ -1257,9 +1256,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially
// important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them
const
int
bwpid
=
bwp
->
bwp_Id
;
const
int
coresetid
=
coreset
->
controlResourceSetId
;
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
bwp
id
][
coresetid
];
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
ra
->
bwp_
id
][
coresetid
];
if
(
!
pdcch_pdu_rel15
)
{
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdcch_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
memset
(
dl_tti_pdcch_pdu
,
0
,
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
...
...
@@ -1268,14 +1266,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
dl_req
->
nPDUs
+=
1
;
pdcch_pdu_rel15
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
nr_configure_pdcch
(
pdcch_pdu_rel15
,
ss
,
coreset
,
scc
,
bwp
);
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
bwp
id
][
coresetid
]
=
pdcch_pdu_rel15
;
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
ra
->
bwp_
id
][
coresetid
]
=
pdcch_pdu_rel15
;
}
// TODO: This assignment should be done in function nr_configure_pdcch()
pdcch_pdu_rel15
->
CoreSetType
=
NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0
;
pdcch_pdu_rel15
->
BWPSize
=
NRRIV2BW
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
pdcch_pdu_rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdsch_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
memset
((
void
*
)
dl_tti_pdsch_pdu
,
0
,
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
dl_tti_pdsch_pdu
->
PDUType
=
NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE
;
...
...
@@ -1300,7 +1293,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
pduIndex
=
pduindex
;
pdsch_pdu_rel15
->
BWPSize
=
BWPSize
;
pdsch_pdu_rel15
->
BWPStart
=
BWPStart
;
pdsch_pdu_rel15
->
SubcarrierSpacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
pdsch_pdu_rel15
->
SubcarrierSpacing
=
bwp
!=
NULL
?
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
pdsch_pdu_rel15
->
CyclicPrefix
=
0
;
pdsch_pdu_rel15
->
NrOfCodewords
=
1
;
pdsch_pdu_rel15
->
targetCodeRate
[
0
]
=
nr_get_code_rate_dl
(
mcsIndex
,
mcsTableIdx
);
...
...
@@ -1390,7 +1383,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
NR_DL_DCI_FORMAT_1_0
,
NR_RNTI_TC
,
pdsch_pdu_rel15
->
BWPSize
,
bwp
->
bwp_I
d
);
ra
->
bwp_i
d
);
// Add padding header and zero rest out if there is space left
if
(
mac_pdu_length
<
harq
->
tb_size
)
{
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
e8f82978
...
...
@@ -178,7 +178,7 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
int
coreset_id
=
coreset
->
controlResourceSetId
;
int
*
cce_list
;
if
(
bwp
->
bwp_Id
==
0
)
{
if
(
bwp
==
NULL
||
bwp
->
bwp_Id
==
0
)
{
cce_list
=
nr_mac
->
cce_list
[
1
][
0
];
}
else
{
cce_list
=
nr_mac
->
cce_list
[
bwp
->
bwp_Id
][
coreset_id
];
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
e8f82978
...
...
@@ -483,7 +483,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
coreset
->
frequencyDomainResources
.
buf
[
0
]
=
0xf0
;
else
coreset
->
frequencyDomainResources
.
buf
[
0
]
=
0xff
;
if
(
curr_bwp
<
96
||
get_softmodem_params
()
->
sa
==
1
)
if
(
curr_bwp
<
96
)
coreset
->
frequencyDomainResources
.
buf
[
1
]
=
0
;
else
coreset
->
frequencyDomainResources
.
buf
[
1
]
=
0xff
;
...
...
@@ -494,17 +494,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
coreset
->
frequencyDomainResources
.
size
=
6
;
coreset
->
frequencyDomainResources
.
bits_unused
=
3
;
coreset
->
duration
=
1
;
if
(
get_softmodem_params
()
->
sa
)
{
coreset
->
cce_REG_MappingType
.
present
=
NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved
;
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
=
calloc
(
1
,
sizeof
(
*
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
));
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
=
NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6
;
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
=
NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2
;
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
=
servingcellconfigcommon
->
physCellId
;
}
else
{
coreset
->
cce_REG_MappingType
.
present
=
NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved
;
}
coreset
->
cce_REG_MappingType
.
present
=
NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved
;
coreset
->
precoderGranularity
=
NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle
;
coreset
->
tci_StatesPDCCH_ToAddList
=
calloc
(
1
,
sizeof
(
*
coreset
->
tci_StatesPDCCH_ToAddList
));
...
...
@@ -552,7 +542,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
=
calloc
(
1
,
sizeof
(
*
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
));
ASN_SEQUENCE_ADD
(
&
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
->
list
,
ss
);
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
searchSpaceSIB1
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
searchSpaceSIB1
));
*
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
searchSpaceSIB1
=
0
;
...
...
This diff is collapsed.
Click to expand it.
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