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
lizhongxiao
OpenXG-RAN
Commits
9f88fe18
Commit
9f88fe18
authored
Mar 04, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creation of get_pdsch_TimeDomainAllocationList function to avoid replicated code
parent
078dff03
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
19 deletions
+25
-19
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+5
-11
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+16
-8
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+4
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
9f88fe18
...
...
@@ -95,18 +95,12 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *
// get coreset symbol "map"
const
uint16_t
symb_coreset
=
(
1
<<
coreset
->
duration
)
-
1
;
/* check that TDA index 0 fits into DL and does not overlap CORESET */
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
=
NULL
;
if
(
bwp
)
{
tdaList
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
if
(
scc
)
{
tdaList
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
tdaList
=
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
=
get_pdsch_TimeDomainAllocationList
(
bwp
,
scc
,
nrmac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
AssertFatal
(
tdaList
->
list
.
count
>=
1
,
"need to have at least one TDA for DL slots
\n
"
);
/* check that TDA index 0 fits into DL and does not overlap CORESET */
const
NR_PDSCH_TimeDomainResourceAllocation_t
*
tdaP_DL
=
tdaList
->
list
.
array
[
0
];
AssertFatal
(
!
tdaP_DL
->
k0
||
*
tdaP_DL
->
k0
==
0
,
"TimeDomainAllocation at index 1: non-null k0 (%ld) is not supported by the scheduler
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
9f88fe18
...
...
@@ -254,6 +254,21 @@ NR_BWP_t *get_ul_bwp_genericParameters(NR_BWP_Uplink_t *active_ubwp,
return
genericParameters
;
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
get_pdsch_TimeDomainAllocationList
(
const
NR_BWP_Downlink_t
*
active_bwp
,
const
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
const
NR_SIB1_t
*
sib1
)
{
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
=
NULL
;
if
(
active_bwp
)
{
tdaList
=
active_bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
if
(
ServingCellConfigCommon
)
{
tdaList
=
ServingCellConfigCommon
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
{
tdaList
=
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
return
tdaList
;
}
NR_ControlResourceSet_t
*
get_coreset
(
module_id_t
module_idP
,
NR_ServingCellConfigCommon_t
*
scc
,
void
*
bwp
,
...
...
@@ -587,14 +602,7 @@ void nr_set_pdsch_semi_static(const NR_SIB1_t *sib1,
if
(
ps
->
time_domain_allocation
!=
tda
)
{
reset_dmrs
=
true
;
ps
->
time_domain_allocation
=
tda
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
=
NULL
;
if
(
bwp
)
{
tdaList
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
if
(
scc
)
{
tdaList
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
{
tdaList
=
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
=
get_pdsch_TimeDomainAllocationList
(
bwp
,
scc
,
sib1
);
AssertFatal
(
tda
<
tdaList
->
list
.
count
,
"time_domain_allocation %d>=%d
\n
"
,
tda
,
tdaList
->
list
.
count
);
ps
->
mapping_type
=
tdaList
->
list
.
array
[
tda
]
->
mappingType
;
if
(
pdsch_Config
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
9f88fe18
...
...
@@ -308,6 +308,10 @@ NR_BWP_t *get_ul_bwp_genericParameters(NR_BWP_Uplink_t *active_ubwp,
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
NR_SIB1_t
*
sib1
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
get_pdsch_TimeDomainAllocationList
(
const
NR_BWP_Downlink_t
*
active_bwp
,
const
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
const
NR_SIB1_t
*
sib1
);
/* find coreset within the search space */
NR_ControlResourceSet_t
*
get_coreset
(
module_id_t
module_idP
,
NR_ServingCellConfigCommon_t
*
scc
,
...
...
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