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
cb399c88
Commit
cb399c88
authored
Oct 14, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added coreset and search configuration MAC from CellGroupConfig.
parent
0b4da471
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
364 additions
and
97 deletions
+364
-97
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+6
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+10
-13
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+299
-4
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+37
-67
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+6
-5
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+4
-4
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
cb399c88
...
...
@@ -237,16 +237,20 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if
(
secondaryCellGroup
)
{
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
int
UE_id
;
if
(
add_ue
==
1
)
{
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
);
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
);
UE_list
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
LOG_I
(
PHY
,
"Added new UE_id %d/%x with initial secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
else
{
// secondaryCellGroup has been updated
int
UE_id
=
find_nr_UE_id
(
Mod_idP
,
rnti
);
UE_id
=
find_nr_UE_id
(
Mod_idP
,
rnti
);
UE_list
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
LOG_I
(
PHY
,
"Modified UE_id %d/%x with secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
fill_nfapi_coresets_and_searchspaces
(
secondaryCellGroup
,
UE_list
->
coreset
[
UE_id
],
UE_list
->
search_space
[
UE_id
]);
}
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 @
cb399c88
...
...
@@ -338,11 +338,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nfapi_nr_config_request_t
*
cfg
=
&
RC
.
nrmac
[
module_idP
]
->
config
[
CC_id
];
nfapi_nr_coreset_t
coreset
=
RC
.
nrmac
[
module_idP
]
->
coreset
[
CC_id
][
1
];
nfapi_nr_search_space_t
search_space
=
RC
.
nrmac
[
module_idP
]
->
search_space
[
CC_id
][
1
];
if
(
nr_is_dci_opportunity
(
search_space
,
coreset
,
if
(
nr_is_dci_opportunity
(
UE_list
->
search_space
[
i
][
1
],
UE_list
->
coreset
[
i
][
1
],
frameP
,
slotP
,
*
cfg
))
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
cb399c88
...
...
@@ -208,8 +208,8 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
LOG_D
(
MAC
,
"Scheduling UE specific search space DCI type 1 for CC_id %d
\n
"
,
CC_id
);
nfapi_nr_coreset_t
*
coreset
=
&
nr_mac
->
coreset
[
CC_id
][
1
];
nfapi_nr_search_space_t
*
search_space
=
&
nr_mac
->
search_space
[
CC_id
][
1
];
nfapi_nr_coreset_t
*
coreset
=
&
nr_mac
->
UE_list
.
coreset
[
0
][
1
];
nfapi_nr_search_space_t
*
search_space
=
&
nr_mac
->
UE_list
.
search_space
[
0
][
1
];
dl_req
=
&
nr_mac
->
DL_req
[
CC_id
].
dl_config_request_body
;
dl_config_dci_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
cb399c88
...
...
@@ -55,6 +55,9 @@
#endif
#include "T.h"
#include "NR_PDCCH-ConfigCommon.h"
#include "NR_ControlResourceSet.h"
#include "NR_SearchSpace.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_gNB_SCHEDULER 1
...
...
@@ -654,3 +657,295 @@ int add_new_nr_ue(module_id_t mod_idP,
0
);
return
-
1
;
}
void
fill_nfapi_coresets_and_searchspaces
(
NR_CellGroupConfig_t
*
cg
,
nfapi_nr_coreset_t
*
coreset
,
nfapi_nr_search_space_t
*
search_space
)
{
nfapi_nr_coreset_t
*
cs
;
nfapi_nr_search_space_t
*
ss
;
AssertFatal
(
cg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
cg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
);
NR_BWP_Downlink_t
*
bwp
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
0
];
struct
NR_PDCCH_Config__controlResourceSetToAddModList
*
coreset_list
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
controlResourceSetToAddModList
;
AssertFatal
(
coreset_list
->
list
.
count
>
0
,
"cs list has 0 elements
\n
"
);
for
(
int
i
=
0
;
i
<
coreset_list
->
list
.
count
;
i
++
)
{
NR_ControlResourceSet_t
*
coreset_i
=
coreset_list
->
list
.
array
[
i
];
cs
=
coreset
+
coreset_i
->
controlResourceSetId
;
cs
->
coreset_id
=
coreset_i
->
controlResourceSetId
;
AssertFatal
(
coreset_i
->
frequencyDomainResources
.
size
<=
8
&&
coreset_i
->
frequencyDomainResources
.
size
>
0
,
"coreset_i->frequencyDomainResources.size=%d
\n
"
,
coreset_i
->
frequencyDomainResources
.
size
);
for
(
int
f
=
0
;
f
<
coreset_i
->
frequencyDomainResources
.
size
;
f
++
)
((
uint8_t
*
)
&
cs
->
frequency_domain_resources
)[
coreset_i
->
frequencyDomainResources
.
size
-
1
-
f
]
=
coreset_i
->
frequencyDomainResources
.
buf
[
f
];
cs
->
frequency_domain_resources
>>=
coreset_i
->
frequencyDomainResources
.
bits_unused
;
cs
->
duration
=
coreset_i
->
duration
;
// Need to add information about TCI_StateIDs
if
(
coreset_i
->
cce_REG_MappingType
.
present
==
NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved
)
cs
->
cce_reg_mapping_type
=
NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED
;
else
{
cs
->
cce_reg_mapping_type
=
NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED
;
if
(
coreset_i
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6
)
cs
->
reg_bundle_size
=
6
;
else
cs
->
reg_bundle_size
=
2
+
coreset_i
->
cce_REG_MappingType
.
choice
.
interleaved
->
reg_BundleSize
;
if
(
coreset_i
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n6
)
cs
->
interleaver_size
=
6
;
else
cs
->
interleaver_size
=
2
+
coreset_i
->
cce_REG_MappingType
.
choice
.
interleaved
->
interleaverSize
;
if
(
coreset_i
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
)
cs
->
shift_index
=
*
coreset_i
->
cce_REG_MappingType
.
choice
.
interleaved
->
shiftIndex
;
else
cs
->
shift_index
=
0
;
}
if
(
coreset_i
->
precoderGranularity
==
NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle
)
cs
->
precoder_granularity
=
NFAPI_NR_CSET_SAME_AS_REG_BUNDLE
;
else
cs
->
precoder_granularity
=
NFAPI_NR_CSET_ALL_CONTIGUOUS_RBS
;
if
(
coreset_i
->
tci_PresentInDCI
==
NULL
)
cs
->
tci_present_in_dci
=
0
;
else
cs
->
tci_present_in_dci
=
1
;
if
(
coreset_i
->
tci_PresentInDCI
==
NULL
)
cs
->
dmrs_scrambling_id
=
0
;
else
cs
->
dmrs_scrambling_id
=
*
coreset_i
->
tci_PresentInDCI
;
}
struct
NR_PDCCH_ConfigCommon__commonSearchSpaceList
*
commonSearchSpaceList
=
bwp
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
AssertFatal
(
commonSearchSpaceList
->
list
.
count
>
0
,
"common SearchSpace list has 0 elements
\n
"
);
// Common searchspace list
for
(
int
i
=
0
;
i
<
commonSearchSpaceList
->
list
.
count
;
i
++
)
{
NR_SearchSpace_t
*
searchSpace_i
=
commonSearchSpaceList
->
list
.
array
[
i
];
ss
=
search_space
+
searchSpace_i
->
searchSpaceId
;
if
(
searchSpace_i
->
controlResourceSetId
)
ss
->
coreset_id
=
*
searchSpace_i
->
controlResourceSetId
;
switch
(
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
present
)
{
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL1
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL2
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl2
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL4
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl4
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL5
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl5
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL8
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl8
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL10
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl10
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL16
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl16
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL20
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl20
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl40
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL40
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl40
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl80
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL80
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl80
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl160
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL160
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl160
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl320
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL320
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl320
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl640
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL640
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl640
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1280
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL1280
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl1280
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2560
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL2560
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl2560
;
break
;
default:
AssertFatal
(
1
==
0
,
"Shouldn't get here
\n
"
);
break
;
}
if
(
searchSpace_i
->
duration
)
ss
->
duration
=
*
searchSpace_i
->
duration
;
else
ss
->
duration
=
1
;
AssertFatal
(
searchSpace_i
->
monitoringSymbolsWithinSlot
->
size
==
2
,
"ss_i->monitoringSymbolsWithinSlot = %d != 2
\n
"
,
searchSpace_i
->
monitoringSymbolsWithinSlot
->
size
);
((
uint8_t
*
)
&
ss
->
monitoring_symbols_in_slot
)[
1
]
=
searchSpace_i
->
monitoringSymbolsWithinSlot
->
buf
[
0
];
((
uint8_t
*
)
&
ss
->
monitoring_symbols_in_slot
)[
0
]
=
searchSpace_i
->
monitoringSymbolsWithinSlot
->
buf
[
1
];
AssertFatal
(
searchSpace_i
->
nrofCandidates
!=
NULL
,
"searchSpace_%d->nrofCandidates is null
\n
"
,
searchSpace_i
->
searchSpaceId
);
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel1
==
NR_SearchSpace__nrofCandidates__aggregationLevel1_n8
)
ss
->
number_of_candidates
[
0
]
=
8
;
else
ss
->
number_of_candidates
[
0
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel1
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel2
==
NR_SearchSpace__nrofCandidates__aggregationLevel2_n8
)
ss
->
number_of_candidates
[
1
]
=
8
;
else
ss
->
number_of_candidates
[
1
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel2
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel4
==
NR_SearchSpace__nrofCandidates__aggregationLevel4_n8
)
ss
->
number_of_candidates
[
2
]
=
8
;
else
ss
->
number_of_candidates
[
2
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel4
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel8
==
NR_SearchSpace__nrofCandidates__aggregationLevel8_n8
)
ss
->
number_of_candidates
[
3
]
=
8
;
else
ss
->
number_of_candidates
[
3
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel8
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel16
==
NR_SearchSpace__nrofCandidates__aggregationLevel16_n8
)
ss
->
number_of_candidates
[
4
]
=
8
;
else
ss
->
number_of_candidates
[
4
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel16
;
AssertFatal
(
searchSpace_i
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
,
"searchspace %d is not common
\n
"
,
searchSpace_i
->
searchSpaceId
);
AssertFatal
(
searchSpace_i
->
searchSpaceType
->
choice
.
common
!=
NULL
,
"searchspace %d common is null
\n
"
,
searchSpace_i
->
searchSpaceId
);
ss
->
search_space_type
=
NFAPI_NR_SEARCH_SPACE_TYPE_COMMON
;
if
(
searchSpace_i
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
ss
->
css_formats_0_0_and_1_0
=
1
;
if
(
searchSpace_i
->
searchSpaceType
->
choice
.
common
->
dci_Format2_0
)
{
ss
->
css_format_2_0
=
1
;
// add aggregation info
}
if
(
searchSpace_i
->
searchSpaceType
->
choice
.
common
->
dci_Format2_1
)
ss
->
css_format_2_1
=
1
;
if
(
searchSpace_i
->
searchSpaceType
->
choice
.
common
->
dci_Format2_2
)
ss
->
css_format_2_2
=
1
;
if
(
searchSpace_i
->
searchSpaceType
->
choice
.
common
->
dci_Format2_3
)
ss
->
css_format_2_3
=
1
;
}
struct
NR_PDCCH_Config__searchSpacesToAddModList
*
dedicatedSearchSpaceList
=
bwp
->
bwp_Dedicated
->
pdcch_Config
->
choice
.
setup
->
searchSpacesToAddModList
;
AssertFatal
(
dedicatedSearchSpaceList
->
list
.
count
>
0
,
"Dedicated Search Space list has 0 elements
\n
"
);
// Dedicated searchspace list
for
(
int
i
=
0
;
i
<
dedicatedSearchSpaceList
->
list
.
count
;
i
++
)
{
NR_SearchSpace_t
*
searchSpace_i
=
dedicatedSearchSpaceList
->
list
.
array
[
i
];
ss
=
search_space
+
searchSpace_i
->
searchSpaceId
;
ss
->
search_space_id
=
searchSpace_i
->
searchSpaceId
;
if
(
searchSpace_i
->
controlResourceSetId
)
ss
->
coreset_id
=
*
searchSpace_i
->
controlResourceSetId
;
switch
(
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
present
)
{
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL1
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL2
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl2
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL4
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl4
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL5
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl5
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL8
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl8
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL10
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl10
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL16
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl16
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL20
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl20
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl40
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL40
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl40
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl80
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL80
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl80
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl160
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL160
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl160
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl320
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL320
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl320
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl640
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL640
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl640
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1280
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL1280
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl1280
;
break
;
case
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2560
:
ss
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL2560
;
ss
->
slot_monitoring_offset
=
searchSpace_i
->
monitoringSlotPeriodicityAndOffset
->
choice
.
sl2560
;
break
;
default:
AssertFatal
(
1
==
0
,
"Shouldn't get here
\n
"
);
break
;
}
if
(
searchSpace_i
->
duration
)
ss
->
duration
=
*
searchSpace_i
->
duration
;
else
ss
->
duration
=
1
;
AssertFatal
(
searchSpace_i
->
monitoringSymbolsWithinSlot
->
size
==
2
,
"ss_i->monitoringSymbolsWithinSlot = %d != 2
\n
"
,
searchSpace_i
->
monitoringSymbolsWithinSlot
->
size
);
((
uint8_t
*
)
&
ss
->
monitoring_symbols_in_slot
)[
1
]
=
searchSpace_i
->
monitoringSymbolsWithinSlot
->
buf
[
0
];
((
uint8_t
*
)
&
ss
->
monitoring_symbols_in_slot
)[
0
]
=
searchSpace_i
->
monitoringSymbolsWithinSlot
->
buf
[
1
];
AssertFatal
(
searchSpace_i
->
nrofCandidates
!=
NULL
,
"searchSpace_%d->nrofCandidates is null
\n
"
,
searchSpace_i
->
searchSpaceId
);
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel1
==
NR_SearchSpace__nrofCandidates__aggregationLevel1_n8
)
ss
->
number_of_candidates
[
0
]
=
8
;
else
ss
->
number_of_candidates
[
0
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel1
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel2
==
NR_SearchSpace__nrofCandidates__aggregationLevel2_n8
)
ss
->
number_of_candidates
[
1
]
=
8
;
else
ss
->
number_of_candidates
[
1
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel2
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel4
==
NR_SearchSpace__nrofCandidates__aggregationLevel4_n8
)
ss
->
number_of_candidates
[
2
]
=
8
;
else
ss
->
number_of_candidates
[
2
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel4
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel8
==
NR_SearchSpace__nrofCandidates__aggregationLevel8_n8
)
ss
->
number_of_candidates
[
3
]
=
8
;
else
ss
->
number_of_candidates
[
3
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel8
;
if
(
searchSpace_i
->
nrofCandidates
->
aggregationLevel16
==
NR_SearchSpace__nrofCandidates__aggregationLevel16_n8
)
ss
->
number_of_candidates
[
4
]
=
8
;
else
ss
->
number_of_candidates
[
4
]
=
searchSpace_i
->
nrofCandidates
->
aggregationLevel16
;
AssertFatal
(
searchSpace_i
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
,
"searchspace %d is not ue-Specific
\n
"
,
searchSpace_i
->
searchSpaceId
);
AssertFatal
(
searchSpace_i
->
searchSpaceType
->
choice
.
ue_Specific
!=
NULL
,
"searchspace %d ue-Specific is null
\n
"
,
searchSpace_i
->
searchSpaceId
);
ss
->
search_space_type
=
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
;
ss
->
uss_dci_formats
=
searchSpace_i
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
;
}
}
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
cb399c88
...
...
@@ -44,34 +44,6 @@
extern
RAN_CONTEXT_t
RC
;
void
nr_init_coreset
(
nfapi_nr_coreset_t
*
coreset
)
{
coreset
->
coreset_id
=
1
;
coreset
->
frequency_domain_resources
=
0x1E0000000000
;
//0x1FFFE0000000; // 96 RB starting from CRB0
coreset
->
duration
=
2
;
coreset
->
cce_reg_mapping_type
=
NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED
;
coreset
->
reg_bundle_size
=
6
;
coreset
->
interleaver_size
=
2
;
coreset
->
precoder_granularity
=
NFAPI_NR_CSET_SAME_AS_REG_BUNDLE
;
coreset
->
tci_present_in_dci
=
0
;
coreset
->
dmrs_scrambling_id
=
0
;
}
void
nr_init_search_space
(
nfapi_nr_search_space_t
*
search_space
)
{
search_space
->
search_space_id
=
1
;
search_space
->
coreset_id
=
1
;
search_space
->
search_space_type
=
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
;
search_space
->
duration
=
5
;
search_space
->
slot_monitoring_periodicity
=
NFAPI_NR_SS_PERIODICITY_SL10
;
search_space
->
slot_monitoring_offset
=
1
;
search_space
->
monitoring_symbols_in_slot
=
0xC0000000
;
// first 2 ofdm symbols
search_space
->
css_formats_0_0_and_1_0
=
1
;
search_space
->
uss_dci_formats
=
0
;
// enum to be defined-- formats 0.0 and 1.0
for
(
int
i
=
0
;
i
<
NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS
;
i
++
)
search_space
->
number_of_candidates
[
i
]
=
4
;
// TODO
}
void
mac_top_init_gNB
(
void
)
{
module_id_t
i
,
j
;
...
...
@@ -114,9 +86,7 @@ void mac_top_init_gNB(void)
RC
.
nrmac
[
i
]
->
TX_req
[
j
].
tx_request_body
.
tx_pdu_list
=
RC
.
nrmac
[
i
]
->
tx_request_pdu
[
j
];
RC
.
nrmac
[
i
]
->
ul_handle
=
0
;
// Init PDCCH structures
nr_init_coreset
(
&
RC
.
nrmac
[
i
]
->
coreset
[
j
][
1
]);
nr_init_search_space
(
&
RC
.
nrmac
[
i
]
->
search_space
[
j
][
1
]);
}
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
cb399c88
...
...
@@ -115,6 +115,12 @@ typedef struct {
boolean_t
active
[
MAX_MOBILES_PER_GNB
];
rnti_t
rnti
[
MAX_MOBILES_PER_GNB
];
NR_CellGroupConfig_t
*
secondaryCellGroup
[
MAX_MOBILES_PER_GNB
];
/// NFAPI coreset structure
nfapi_nr_coreset_t
coreset
[
MAX_MOBILES_PER_GNB
][
NFAPI_NR_MAX_NB_CORESETS
];
/// NFAPI search space structure
nfapi_nr_search_space_t
search_space
[
MAX_MOBILES_PER_GNB
][
NFAPI_NR_MAX_NB_SEARCH_SPACES
];
}
NR_UE_list_t
;
/*! \brief top level eNB MAC structure */
...
...
@@ -158,11 +164,6 @@ typedef struct gNB_MAC_INST_s {
nfapi_tx_request_pdu_t
tx_request_pdu
[
NFAPI_CC_MAX
][
MAX_NUM_TX_REQUEST_PDU
];
/// NFAPI DL PDU structure
nfapi_tx_request_t
TX_req
[
NFAPI_CC_MAX
];
/// NFAPI coreset structure
nfapi_nr_coreset_t
coreset
[
NFAPI_CC_MAX
][
NFAPI_NR_MAX_NB_CORESETS
];
/// NFAPI search space structure
nfapi_nr_search_space_t
search_space
[
NFAPI_CC_MAX
][
NFAPI_NR_MAX_NB_SEARCH_SPACES
];
NR_UE_list_t
UE_list
;
/// UL handle
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
cb399c88
...
...
@@ -513,8 +513,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ss3
->
monitoringSymbolsWithinSlot
->
buf
=
calloc
(
1
,
2
);
ss3
->
monitoringSymbolsWithinSlot
->
size
=
2
;
ss3
->
monitoringSymbolsWithinSlot
->
bits_unused
=
2
;
ss3
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x
3
;
ss3
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x0
;
ss3
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x
c0
;
ss3
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
=
0x0
;
ss3
->
nrofCandidates
=
calloc
(
1
,
sizeof
(
*
ss3
->
nrofCandidates
));
ss3
->
nrofCandidates
->
aggregationLevel1
=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
;
ss3
->
nrofCandidates
->
aggregationLevel2
=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
;
...
...
@@ -540,8 +540,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ss2
->
monitoringSymbolsWithinSlot
->
buf
=
calloc
(
1
,
2
);
ss2
->
monitoringSymbolsWithinSlot
->
size
=
2
;
ss2
->
monitoringSymbolsWithinSlot
->
bits_unused
=
2
;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x
3
;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x0
;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
=
0x
c0
;
ss2
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
=
0x0
;
ss2
->
nrofCandidates
=
calloc
(
1
,
sizeof
(
*
ss2
->
nrofCandidates
));
ss2
->
nrofCandidates
->
aggregationLevel1
=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
;
ss2
->
nrofCandidates
->
aggregationLevel2
=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
;
...
...
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