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
canghaiwuhen
OpenXG-RAN
Commits
042e4e5c
Commit
042e4e5c
authored
Apr 13, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reworking of nr_configure_pdcch
parent
221e1526
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
188 additions
and
111 deletions
+188
-111
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+60
-42
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+115
-64
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+12
-3
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
042e4e5c
...
...
@@ -230,7 +230,6 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
uint32_t
encoder_output
[
NR_MAX_DCI_SIZE_DWORD
];
uint16_t
n_RNTI
=
pdcch_pdu_rel15
->
RNTI
[
d
];
uint16_t
Nid
=
pdcch_pdu_rel15
->
ScramblingId
[
d
];
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_DCI_MESSAGE_TYPE
,
pdcch_pdu_rel15
->
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
AggregationLevel
[
d
],
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
042e4e5c
...
...
@@ -251,7 +251,6 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
int
configure_fapi_dl_pdu
(
int
Mod_idP
,
int
*
CCEIndex
,
nfapi_nr_dl_tti_request_body_t
*
dl_req
,
NR_sched_pucch
*
pucch_sched
,
uint8_t
*
mcsIndex
,
...
...
@@ -388,22 +387,42 @@ int configure_fapi_dl_pdu(int Mod_idP,
dci_pdu_rel15
[
0
].
ndi
,
dci_pdu_rel15
[
0
].
rv
);
nr_configure_pdcch
(
pdcch_pdu_rel15
,
1
,
// ue-specific
NR_SearchSpace_t
*
ss
;
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
!=
NULL
,
"searchPsacesToAddModList is null
\n
"
);
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
count
>
0
,
"searchPsacesToAddModList is empty
\n
"
);
int
found
=
0
;
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
count
;
i
++
)
{
ss
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
array
[
i
];
AssertFatal
(
ss
->
controlResourceSetId
!=
NULL
,
"ss->controlResourceSetId is null
\n
"
);
AssertFatal
(
ss
->
searchSpaceType
!=
NULL
,
"ss->searchSpaceType is null
\n
"
);
if
(
ss
->
searchSpaceType
->
present
==
target_ss
)
{
found
=
1
;
break
;
}
}
AssertFatal
(
found
==
1
,
"Couldn't find an adequate searchspace
\n
"
);
nr_configure_pdcch
(
nr_mac
,
pdcch_pdu_rel15
,
UE_list
->
rnti
[
UE_id
],
ss
,
scc
,
bwp
);
pdcch_pdu_rel15
->
numDlDci
=
1
;
pdcch_pdu_rel15
->
AggregationLevel
[
0
]
=
4
;
pdcch_pdu_rel15
->
RNTI
[
0
]
=
UE_list
->
rnti
[
0
];
pdcch_pdu_rel15
->
CceIndex
[
0
]
=
CCEIndex
[
0
];
pdcch_pdu_rel15
->
beta_PDCCH_1_0
[
0
]
=
0
;
pdcch_pdu_rel15
->
powerControlOffsetSS
[
0
]
=
1
;
int
dci_formats
[
2
];
int
rnti_types
[
2
];
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
)
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
else
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_1
;
rnti_types
[
0
]
=
NR_RNTI_C
;
fill_dci_pdu_rel15
(
secondaryCellGroup
,
pdcch_pdu_rel15
,
dci_pdu_rel15
,
dci_formats
,
rnti_types
,
bwp_id
);
...
...
@@ -517,7 +536,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
int
post_padding
=
0
,
ta_len
=
0
,
header_length_total
=
0
,
sdu_length_total
=
0
,
num_sdus
=
0
;
int
lcid
,
offset
,
i
,
header_length_last
,
TBS_bytes
;
int
UE_id
=
0
,
CC
EIndex
=
-
1
,
CC
_id
=
0
;
int
UE_id
=
0
,
CC_id
=
0
;
gNB_MAC_INST
*
gNB_mac
=
RC
.
nrmac
[
module_idP
];
//NR_COMMON_channels_t *cc = nr_mac->common_channels;
...
...
@@ -541,22 +560,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
ta_len
=
gNB_mac
->
ta_len
;
CCEIndex
=
allocate_nr_CCEs
(
gNB_mac
,
1
,
// bwp_id
0
,
// coreset_id
4
,
// aggregation,
1
,
// search_space, 0 common, 1 ue-specific
UE_id
,
0
);
// m
if
(
CCEIndex
==
-
1
)
return
;
AssertFatal
(
CCEIndex
>
0
,
"CCEIndex is negative
\n
"
);
int
CCEIndices
[
2
];
CCEIndices
[
0
]
=
CCEIndex
;
TBS_bytes
=
configure_fapi_dl_pdu
(
module_idP
,
CCEIndices
,
dl_req
,
pucch_sched
,
dlsch_config
!=
NULL
?
dlsch_config
->
mcsIndex
:
NULL
,
...
...
@@ -827,29 +831,43 @@ void nr_schedule_uss_ulsch_phytest(int Mod_idP,
int
dci_formats
[
2
];
int
rnti_types
[
2
];
int
CCEIndex
=
allocate_nr_CCEs
(
nr_mac
,
1
,
// bwp_id
0
,
// coreset_id
4
,
// aggregation,
1
,
// search_space, 0 common, 1 ue-specific
UE_id
,
0
);
// m
NR_SearchSpace_t
*
ss
;
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
!=
NULL
,
"searchPsacesToAddModList is null
\n
"
);
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
count
>
0
,
"searchPsacesToAddModList is empty
\n
"
);
int
found
=
0
;
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
count
;
i
++
)
{
ss
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
array
[
i
];
AssertFatal
(
ss
->
controlResourceSetId
!=
NULL
,
"ss->controlResourceSetId is null
\n
"
);
AssertFatal
(
ss
->
searchSpaceType
!=
NULL
,
"ss->searchSpaceType is null
\n
"
);
if
(
ss
->
searchSpaceType
->
present
==
target_ss
)
{
found
=
1
;
break
;
}
}
AssertFatal
(
found
==
1
,
"Couldn't find an adequate searchspace
\n
"
);
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
)
dci_formats
[
0
]
=
NR_UL_DCI_FORMAT_0_1
;
else
dci_formats
[
0
]
=
NR_UL_DCI_FORMAT_0_0
;
rnti_types
[
0
]
=
NR_RNTI_C
;
LOG_D
(
MAC
,
"Configuring ULDCI/PDCCH in %d.%d
\n
"
,
frameP
,
slotP
);
nr_configure_pdcch
(
pdcch_pdu_rel15
,
1
,
// ue-specific,
nr_configure_pdcch
(
nr_mac
,
pdcch_pdu_rel15
,
UE_list
->
rnti
[
UE_id
],
ss
,
scc
,
bwp
);
dci_pdu_rel15_t
dci_pdu_rel15
[
MAX_DCI_CORESET
];
AssertFatal
(
CCEIndex
>=
0
,
"CCEIndex is negative
\n
"
);
pdcch_pdu_rel15
->
CceIndex
[
pdcch_pdu_rel15
->
numDlDci
]
=
CCEIndex
;
LOG_D
(
PHY
,
"CCEIndex %d
\n
"
,
pdcch_pdu_rel15
->
CceIndex
[
pdcch_pdu_rel15
->
numDlDci
]);
config_uldci
(
ubwp
,
pusch_pdu
,
pdcch_pdu_rel15
,
&
dci_pdu_rel15
[
0
],
dci_formats
,
rnti_types
);
fill_dci_pdu_rel15
(
secondaryCellGroup
,
pdcch_pdu_rel15
,
dci_pdu_rel15
,
dci_formats
,
rnti_types
,
bwp_id
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
042e4e5c
...
...
@@ -182,8 +182,8 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
}
int
first_cce
=
aggregation
*
((
Y
+
(
m
*
N_cce
)
/
(
aggregation
*
M_s_max
)
+
n_CI
)
%
CEILIDIV
(
N_cce
,
aggregation
));
for
(
int
i
=
0
;
i
<
aggregation
;
i
++
)
if
(
cce_list
[
first_cce
+
i
]
!=
0
)
return
(
-
1
);
// for (int i=0;i<aggregation;i++)
//
if (cce_list[first_cce+i] != 0) return(-1);
for
(
int
i
=
0
;
i
<
aggregation
;
i
++
)
cce_list
[
first_cce
+
i
]
=
1
;
...
...
@@ -409,11 +409,15 @@ void nr_configure_css_dci_initial(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
}
void
nr_configure_pdcch
(
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
int
ss_type
,
void
nr_configure_pdcch
(
gNB_MAC_INST
*
nr_mac
,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
uint16_t
rnti
,
NR_SearchSpace_t
*
ss
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
){
int
CCEIndex
=
-
1
;
if
(
bwp
)
{
// This is not the InitialBWP
/// coreset
...
...
@@ -421,28 +425,37 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
// pdcch_pdu->config_type = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG;
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
controlResourceSetToAddModList
!=
NULL
,
"controlResourceSetToAddModList is null
\n
"
);
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
controlResourceSetToAddModList
->
list
.
count
>
0
,
int
num_list
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
controlResourceSetToAddModList
->
list
.
count
;
AssertFatal
(
num_list
>
0
,
"controlResourceSetToAddModList is empty
\n
"
);
NR_ControlResourceSet_t
*
coreset0
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
controlResourceSetToAddModList
->
list
.
array
[
0
];
NR_ControlResourceSet_t
*
coreset
;
int
coresetid
=-
1
;
for
(
int
i
=
0
;
i
<
num_list
;
i
++
)
{
coreset
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
controlResourceSetToAddModList
->
list
.
array
[
i
];
if
(
coreset
->
controlResourceSetId
==
*
ss
->
controlResourceSetId
)
{
coresetid
=
i
;
break
;
}
}
AssertFatal
(
coresetid
>-
1
,
"Couldn't find a coreset with ID %ld
\n
"
,
*
ss
->
controlResourceSetId
);
pdcch_pdu
->
BWPSize
=
NRRIV2BW
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
pdcch_pdu
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
pdcch_pdu
->
SubcarrierSpacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
pdcch_pdu
->
CyclicPrefix
=
(
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
==
NULL
)
?
0
:
*
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
;
pdcch_pdu
->
DurationSymbols
=
coreset
0
->
duration
;
pdcch_pdu
->
DurationSymbols
=
coreset
->
duration
;
//frequencyDomainResources
/* uint8_t count=0, start=0, start_set=0;
// find coreset descriptor
uint64_t bitmap = (((uint64_t)coreset
0
->frequencyDomainResources.buf[0])<<37)|
(((uint64_t)coreset
0
->frequencyDomainResources.buf[1])<<29)|
(((uint64_t)coreset
0
->frequencyDomainResources.buf[2])<<21)|
(((uint64_t)coreset
0
->frequencyDomainResources.buf[3])<<13)|
(((uint64_t)coreset
0
->frequencyDomainResources.buf[4])<<5)|
(((uint64_t)coreset
0
->frequencyDomainResources.buf[5])>>3);
uint64_t bitmap = (((uint64_t)coreset->frequencyDomainResources.buf[0])<<37)|
(((uint64_t)coreset->frequencyDomainResources.buf[1])<<29)|
(((uint64_t)coreset->frequencyDomainResources.buf[2])<<21)|
(((uint64_t)coreset->frequencyDomainResources.buf[3])<<13)|
(((uint64_t)coreset->frequencyDomainResources.buf[4])<<5)|
(((uint64_t)coreset->frequencyDomainResources.buf[5])>>3);
for (int i=0; i<45; i++)
if ((bitmap>>(44-i))&1) {
...
...
@@ -456,18 +469,18 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
pdcch_pdu->n_rb = 6*count;
*/
for
(
int
i
=
0
;
i
<
6
;
i
++
)
pdcch_pdu
->
FreqDomainResource
[
i
]
=
coreset
0
->
frequencyDomainResources
.
buf
[
i
];
pdcch_pdu
->
FreqDomainResource
[
i
]
=
coreset
->
frequencyDomainResources
.
buf
[
i
];
//duration
//cce-REG-MappingType
pdcch_pdu
->
CceRegMappingType
=
coreset
0
->
cce_REG_MappingType
.
present
==
NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved
?
pdcch_pdu
->
CceRegMappingType
=
coreset
->
cce_REG_MappingType
.
present
==
NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved
?
NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED
:
NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED
;
if
(
pdcch_pdu
->
CceRegMappingType
==
NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED
)
{
pdcch_pdu
->
RegBundleSize
=
(
coreset
0
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6
)
?
6
:
(
2
+
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
);
pdcch_pdu
->
InterleaverSize
=
(
coreset
0
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n6
)
?
6
:
(
2
+
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
);
pdcch_pdu
->
RegBundleSize
=
(
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6
)
?
6
:
(
2
+
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
);
pdcch_pdu
->
InterleaverSize
=
(
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n6
)
?
6
:
(
2
+
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
);
AssertFatal
(
scc
->
physCellId
!=
NULL
,
"scc->physCellId is null
\n
"
);
pdcch_pdu
->
ShiftIndex
=
coreset
0
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
!=
NULL
?
*
coreset0
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
:
*
scc
->
physCellId
;
pdcch_pdu
->
ShiftIndex
=
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
!=
NULL
?
*
coreset
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
:
*
scc
->
physCellId
;
}
else
{
pdcch_pdu
->
RegBundleSize
=
0
;
...
...
@@ -478,56 +491,27 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
pdcch_pdu
->
CoreSetType
=
1
;
//precoderGranularity
pdcch_pdu
->
precoderGranularity
=
coreset
0
->
precoderGranularity
;
pdcch_pdu
->
precoderGranularity
=
coreset
->
precoderGranularity
;
//TCI states
//
/*
//TCI present
if (coreset
0
->tci_PresentInDCI != NULL) {
AssertFatal(coreset
0
->tci_StatesPDCCH_ToAddList != NULL,"tci_StatesPDCCH_ToAddList is null\n");
AssertFatal(coreset
0
->tci_StatesPDCCH_ToAddList->list.count>0,"TCI state list is empty\n");
for (int i=0;i<coreset
0
->tci_StatesPDCCH_ToAddList->list.count;i++) {
if (coreset->tci_PresentInDCI != NULL) {
AssertFatal(coreset->tci_StatesPDCCH_ToAddList != NULL,"tci_StatesPDCCH_ToAddList is null\n");
AssertFatal(coreset->tci_StatesPDCCH_ToAddList->list.count>0,"TCI state list is empty\n");
for (int i=0;i<coreset->tci_StatesPDCCH_ToAddList->list.count;i++) {
}
*/
for
(
int
i
=
0
;
i
<
pdcch_pdu
->
numDlDci
;
i
++
)
{
//pdcch-DMRS-ScramblingID
AssertFatal
(
coreset0
->
pdcch_DMRS_ScramblingID
!=
NULL
,
"coreset0->pdcch_DMRS_ScramblingID is null
\n
"
);
pdcch_pdu
->
ScramblingId
[
i
]
=
*
coreset0
->
pdcch_DMRS_ScramblingID
;
}
/// SearchSpace
AssertFatal
(
ss
->
monitoringSymbolsWithinSlot
!=
NULL
,
"ss->monitoringSymbolsWithinSlot is null
\n
"
);
AssertFatal
(
ss
->
monitoringSymbolsWithinSlot
->
buf
!=
NULL
,
"ss->monitoringSymbolsWithinSlot->buf is null
\n
"
);
// first symbol
//AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored");
int
sps
=
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
==
NULL
?
14
:
12
;
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
!=
NULL
,
"searchPsacesToAddModList is null
\n
"
);
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
count
>
0
,
"searchPsacesToAddModList is empty
\n
"
);
NR_SearchSpace_t
*
ss
;
int
found
=
0
;
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_common
;
if
(
ss_type
==
1
)
{
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
}
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
count
;
i
++
)
{
ss
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
.
array
[
i
];
AssertFatal
(
ss
->
controlResourceSetId
!=
NULL
,
"ss->controlResourceSetId is null
\n
"
);
AssertFatal
(
ss
->
searchSpaceType
!=
NULL
,
"ss->searchSpaceType is null
\n
"
);
if
(
*
ss
->
controlResourceSetId
==
coreset0
->
controlResourceSetId
&&
ss
->
searchSpaceType
->
present
==
target_ss
)
{
found
=
1
;
break
;
}
}
AssertFatal
(
found
==
1
,
"Couldn't find a searchspace corresponding to coreset0
\n
"
);
AssertFatal
(
ss
->
monitoringSymbolsWithinSlot
!=
NULL
,
"ss->monitoringSymbolsWithinSlot is null
\n
"
);
AssertFatal
(
ss
->
monitoringSymbolsWithinSlot
->
buf
!=
NULL
,
"ss->monitoringSymbolsWithinSlot->buf is null
\n
"
);
// for SPS=14 8 MSBs in positions 13 downto 6,
uint16_t
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
...
...
@@ -537,6 +521,43 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
pdcch_pdu
->
StartSymbolIndex
=
i
;
break
;
}
pdcch_pdu
->
RNTI
[
pdcch_pdu
->
numDlDci
]
=
rnti
;
if
(
coreset
->
pdcch_DMRS_ScramblingID
!=
NULL
&&
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
)
{
pdcch_pdu
->
ScramblingId
[
pdcch_pdu
->
numDlDci
]
=
*
coreset
->
pdcch_DMRS_ScramblingID
;
pdcch_pdu
->
ScramblingRNTI
[
pdcch_pdu
->
numDlDci
]
=
rnti
;
}
else
{
pdcch_pdu
->
ScramblingId
[
pdcch_pdu
->
numDlDci
]
=
*
scc
->
physCellId
;
pdcch_pdu
->
ScramblingRNTI
[
pdcch_pdu
->
numDlDci
]
=
0
;
}
uint8_t
nr_of_candidates
,
aggregation_level
;
find_aggregation_candidates
(
&
aggregation_level
,
&
nr_of_candidates
,
ss
);
CCEIndex
=
allocate_nr_CCEs
(
nr_mac
,
1
,
// bwp_id
coresetid
,
aggregation_level
,
ss
->
searchSpaceType
->
present
-
1
,
// search_space, 0 common, 1 ue-specific
0
,
// UE-id
0
);
// m
AssertFatal
(
CCEIndex
>=
0
,
"CCEIndex is negative
\n
"
);
pdcch_pdu
->
AggregationLevel
[
pdcch_pdu
->
numDlDci
]
=
aggregation_level
;
pdcch_pdu
->
CceIndex
[
pdcch_pdu
->
numDlDci
]
=
CCEIndex
;
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
==
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_0_And_1_0
)
pdcch_pdu
->
beta_PDCCH_1_0
[
pdcch_pdu
->
numDlDci
]
=
0
;
pdcch_pdu
->
powerControlOffsetSS
[
pdcch_pdu
->
numDlDci
]
=
1
;
pdcch_pdu
->
numDlDci
++
;
}
else
{
// this is for InitialBWP
...
...
@@ -545,7 +566,6 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
}
// This function configures pucch pdu fapi structure
void
nr_configure_pucch
(
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
NR_ServingCellConfigCommon_t
*
scc
,
...
...
@@ -1386,6 +1406,7 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
pdsch_to_harq_feedback
[
i
]
=
i
+
1
;
}
else
{
// searching for a ue specific search space
int
found
=
0
;
...
...
@@ -1399,15 +1420,19 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
}
}
AssertFatal
(
found
==
1
,
"Couldn't find a ue specific searchspace
\n
"
);
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
==
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_0_And_1_0
)
{
for
(
int
i
=
0
;
i
<
8
;
i
++
)
pdsch_to_harq_feedback
[
i
]
=
i
+
1
;
}
else
{
if
(
ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
dl_DataToUL_ACK
!=
NULL
)
pdsch_to_harq_feedback
=
(
uint8_t
*
)
ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
dl_DataToUL_ACK
;
if
(
ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
dl_DataToUL_ACK
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
8
;
i
++
)
pdsch_to_harq_feedback
[
i
]
=
*
ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
dl_DataToUL_ACK
->
list
.
array
[
i
];
}
else
AssertFatal
(
found
==
1
,
"There is no allocated dl_DataToUL_ACK for pdsch to harq feedback
\n
"
);
AssertFatal
(
0
==
1
,
"There is no allocated dl_DataToUL_ACK for pdsch to harq feedback
\n
"
);
}
}
}
...
...
@@ -1531,6 +1556,32 @@ void nr_update_pucch_scheduling(int Mod_idP,
}
void
find_aggregation_candidates
(
uint8_t
*
aggregation_level
,
uint8_t
*
nr_of_candidates
,
NR_SearchSpace_t
*
ss
)
{
if
(
ss
->
nrofCandidates
->
aggregationLevel1
!=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
)
{
*
aggregation_level
=
1
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel1
;
}
if
(
ss
->
nrofCandidates
->
aggregationLevel2
!=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
)
{
*
aggregation_level
=
2
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel2
;
}
if
(
ss
->
nrofCandidates
->
aggregationLevel4
!=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
)
{
*
aggregation_level
=
4
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel4
;
}
if
(
ss
->
nrofCandidates
->
aggregationLevel8
!=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
)
{
*
aggregation_level
=
8
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel8
;
}
if
(
ss
->
nrofCandidates
->
aggregationLevel16
!=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
)
{
*
aggregation_level
=
16
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel16
;
}
}
/*void fill_nfapi_coresets_and_searchspaces(NR_CellGroupConfig_t *cg,
nfapi_nr_coreset_t *coreset,
nfapi_nr_search_space_t *search_space) {
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
042e4e5c
...
...
@@ -83,7 +83,6 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
sub_frame_t
subframeP
);
int
configure_fapi_dl_pdu
(
int
Mod_id
,
int
*
CCEIndeces
,
nfapi_nr_dl_tti_request_body_t
*
dl_req
,
NR_sched_pucch
*
pucch_sched
,
uint8_t
*
mcsIndex
,
...
...
@@ -149,8 +148,14 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
uint16_t
O_ack
,
uint8_t
SR_flag
);
void
nr_configure_pdcch
(
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
int
ss_type
,
void
find_search_space
(
int
ss_type
,
NR_BWP_Downlink_t
*
bwp
,
NR_SearchSpace_t
*
ss
);
void
nr_configure_pdcch
(
gNB_MAC_INST
*
nr_mac
,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
uint16_t
rnti
,
NR_SearchSpace_t
*
ss
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
);
...
...
@@ -166,6 +171,10 @@ void prepare_dci(NR_CellGroupConfig_t *secondaryCellGroup,
nr_dci_format_t
format
,
int
bwp_id
);
void
find_aggregation_candidates
(
uint8_t
*
aggregation_level
,
uint8_t
*
nr_of_candidates
,
NR_SearchSpace_t
*
ss
);
void
nr_configure_pucch
(
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Uplink_t
*
bwp
,
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
042e4e5c
...
...
@@ -555,7 +555,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ss2
->
searchSpaceType
=
calloc
(
1
,
sizeof
(
*
ss2
->
searchSpaceType
));
ss2
->
searchSpaceType
->
present
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
ss2
->
searchSpaceType
->
choice
.
ue_Specific
=
calloc
(
1
,
sizeof
(
*
ss2
->
searchSpaceType
->
choice
.
ue_Specific
));
ss2
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
=
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_
0_And_1_0
;
ss2
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
=
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_
1_And_1_1
;
ASN_SEQUENCE_ADD
(
&
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
->
list
,
ss3
);
...
...
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