Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
e0f2f09a
Commit
e0f2f09a
authored
Oct 06, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve sib1 code for aggregation levels
parent
0502cf64
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
54 deletions
+33
-54
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+4
-22
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+22
-26
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+6
-5
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
e0f2f09a
...
...
@@ -4015,7 +4015,7 @@ void fill_coresetZero(NR_ControlResourceSet_t *coreset0, NR_Type0_PDCCH_CSS_conf
}
uint8_t
fill_searchSpaceZero
(
NR_SearchSpace_t
*
ss0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
,
int
L
)
{
void
fill_searchSpaceZero
(
NR_SearchSpace_t
*
ss0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
)
{
if
(
ss0
==
NULL
)
ss0
=
calloc
(
1
,
sizeof
(
*
ss0
));
if
(
ss0
->
controlResourceSetId
==
NULL
)
ss0
->
controlResourceSetId
=
calloc
(
1
,
sizeof
(
*
ss0
->
controlResourceSetId
));
...
...
@@ -4033,7 +4033,6 @@ uint8_t fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t
AssertFatal
(
type0_PDCCH_CSS_config
!=
NULL
,
"No type0 CSS configuration
\n
"
);
max_agg
=
(
type0_PDCCH_CSS_config
->
num_symbols
*
type0_PDCCH_CSS_config
->
num_rbs
)
/
6
;
if
(
L
>
max_agg
)
return
0
;
symbols
=
(
1
-
(
1
<<
type0_PDCCH_CSS_config
->
num_symbols
))
<<
type0_PDCCH_CSS_config
->
first_symbol_index
;
duration
=
type0_PDCCH_CSS_config
->
search_space_duration
;
...
...
@@ -4066,28 +4065,11 @@ uint8_t fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t
// max values are set according to TS38.213 Section 10.1 Table 10.1-1
ss0
->
nrofCandidates
->
aggregationLevel1
=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
;
ss0
->
nrofCandidates
->
aggregationLevel2
=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
;
switch
(
L
){
case
4
:
ss0
->
nrofCandidates
->
aggregationLevel4
=
(((
max_agg
>>
2
)
>
4
)
?
4
:
max_agg
>>
2
);
ss0
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss0
->
nrofCandidates
->
aggregationLevel16
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
break
;
case
8
:
ss0
->
nrofCandidates
->
aggregationLevel4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
;
ss0
->
nrofCandidates
->
aggregationLevel8
=
(((
max_agg
>>
3
)
>
2
)
?
2
:
max_agg
>>
3
);
ss0
->
nrofCandidates
->
aggregationLevel16
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
break
;
case
16
:
ss0
->
nrofCandidates
->
aggregationLevel4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
;
ss0
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss0
->
nrofCandidates
->
aggregationLevel16
=
(((
max_agg
>>
4
)
>
1
)
?
1
:
max_agg
>>
4
);
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid aggregation level %d for SS0
\n
"
,
L
);
}
ss0
->
searchSpaceType
->
present
=
NR_SearchSpace__searchSpaceType_PR_common
;
return
1
;
}
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
e0f2f09a
...
...
@@ -150,7 +150,7 @@ void get_info_from_tda_tables(int default_abc,
int
*
nrOfSymbols
);
void
fill_coresetZero
(
NR_ControlResourceSet_t
*
coreset0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
);
uint8_t
fill_searchSpaceZero
(
NR_SearchSpace_t
*
ss0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
,
int
L
);
void
fill_searchSpaceZero
(
NR_SearchSpace_t
*
ss0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
);
uint16_t
compute_pucch_prb_size
(
uint8_t
format
,
uint8_t
nr_prbs
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
e0f2f09a
...
...
@@ -2000,11 +2000,8 @@ void nr_ue_sib1_scheduler(module_id_t module_idP,
if
(
mac
->
search_space_zero
==
NULL
)
mac
->
search_space_zero
=
calloc
(
1
,
sizeof
(
*
mac
->
search_space_zero
));
if
(
mac
->
coreset0
==
NULL
)
mac
->
coreset0
=
calloc
(
1
,
sizeof
(
*
mac
->
coreset0
));
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
// loop over possible aggregation levels
fill_coresetZero
(
mac
->
coreset0
,
&
mac
->
type0_PDCCH_CSS_config
);
ret
=
fill_searchSpaceZero
(
mac
->
search_space_zero
,
&
mac
->
type0_PDCCH_CSS_config
,
4
<<
i
);
if
(
ret
)
{
fill_searchSpaceZero
(
mac
->
search_space_zero
,
&
mac
->
type0_PDCCH_CSS_config
,
4
<<
i
);
rel15
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
dci_config_pdu
.
dci_config_rel15
;
rel15
->
num_dci_options
=
1
;
rel15
->
dci_format_options
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
...
...
@@ -2025,8 +2022,7 @@ void nr_ue_sib1_scheduler(module_id_t module_idP,
}
LOG_D
(
MAC
,
"Calling fill_scheduled_response, type0_pdcch, num_pdus %d
\n
"
,
dl_config
->
number_pdus
);
fill_scheduled_response
(
&
scheduled_response
,
dl_config
,
NULL
,
NULL
,
module_idP
,
cc_id
,
frame_s
,
slot_s
,
0
);
// TODO fix thread_id, for now assumed 0
}
}
if
(
dl_config
->
number_pdus
)
{
if
(
mac
->
if_module
!=
NULL
&&
mac
->
if_module
->
scheduled_response
!=
NULL
)
mac
->
if_module
->
scheduled_response
(
&
scheduled_response
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
e0f2f09a
...
...
@@ -335,10 +335,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
gNB_mac
->
sched_ctrlCommon
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
));
gNB_mac
->
sched_ctrlCommon
->
search_space
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
->
search_space
));
gNB_mac
->
sched_ctrlCommon
->
coreset
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
->
coreset
));
for
(
int
i
=
0
;
i
<
3
;
i
++
){
// loop over possible aggregation levels
ret
=
fill_searchSpaceZero
(
gNB_mac
->
sched_ctrlCommon
->
search_space
,
type0_PDCCH_CSS_config
,
4
<<
i
);
if
(
ret
==
1
)
break
;
}
ret
=
fill_searchSpaceZero
(
gNB_mac
->
sched_ctrlCommon
->
search_space
,
type0_PDCCH_CSS_config
);
AssertFatal
(
ret
==
1
,
"No aggregation level for type0_PDCCH_CSS found
\n
"
);
fill_coresetZero
(
gNB_mac
->
sched_ctrlCommon
->
coreset
,
type0_PDCCH_CSS_config
);
}
...
...
@@ -349,7 +346,11 @@ uint32_t schedule_control_sib1(module_id_t module_id,
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
=
num_total_bytes
;
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
gNB_mac
->
sched_ctrlCommon
->
aggregation_level
,
&
nr_of_candidates
,
gNB_mac
->
sched_ctrlCommon
->
search_space
,
4
);
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
find_aggregation_candidates
(
&
gNB_mac
->
sched_ctrlCommon
->
aggregation_level
,
&
nr_of_candidates
,
gNB_mac
->
sched_ctrlCommon
->
search_space
,
4
<<
i
);
if
(
nr_of_candidates
>
0
)
break
;
// choosing the lower value of aggregation level available
}
AssertFatal
(
nr_of_candidates
>
0
,
"nr_of_candidates is 0
\n
"
);
gNB_mac
->
sched_ctrlCommon
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
NULL
,
...
...
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