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
8f354ec3
Commit
8f354ec3
authored
Sep 30, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix calculate_preferred_dl_tda and remove duplicated code
parent
e1cc60d3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
42 deletions
+9
-42
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+6
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+1
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+0
-33
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
8f354ec3
...
@@ -543,6 +543,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
...
@@ -543,6 +543,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
const
NR_BWP_Downlink_t
*
bwp
=
bwpList
->
list
.
array
[
i
];
const
NR_BWP_Downlink_t
*
bwp
=
bwpList
->
list
.
array
[
i
];
calculate_preferred_dl_tda
(
Mod_idP
,
bwp
);
calculate_preferred_dl_tda
(
Mod_idP
,
bwp
);
}
}
}
else
{
calculate_preferred_dl_tda
(
Mod_idP
,
NULL
);
}
}
const
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
servingCellConfig
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
const
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
servingCellConfig
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
8f354ec3
...
@@ -81,11 +81,12 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *
...
@@ -81,11 +81,12 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *
const
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
scc
,
bwp
?
bwp
->
bwp_Dedicated
:
NULL
,
search_space
,
target_ss
);
const
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
scc
,
bwp
?
bwp
->
bwp_Dedicated
:
NULL
,
search_space
,
target_ss
);
// get coreset symbol "map"
// get coreset symbol "map"
const
uint16_t
symb_coreset
=
(
1
<<
coreset
->
duration
)
-
1
;
const
uint16_t
symb_coreset
=
coreset
?
(
1
<<
coreset
->
duration
)
-
1
:
1
;
/* check that TDA index 0 fits into DL and does not overlap CORESET */
/* check that TDA index 0 fits into DL and does not overlap CORESET */
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
bwp
?
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
AssertFatal
(
tdaList
->
list
.
count
>=
1
,
"need to have at least one TDA for DL slots
\n
"
);
AssertFatal
(
tdaList
->
list
.
count
>=
1
,
"need to have at least one TDA for DL slots
\n
"
);
const
NR_PDSCH_TimeDomainResourceAllocation_t
*
tdaP_DL
=
tdaList
->
list
.
array
[
0
];
const
NR_PDSCH_TimeDomainResourceAllocation_t
*
tdaP_DL
=
tdaList
->
list
.
array
[
0
];
AssertFatal
(
!
tdaP_DL
->
k0
||
*
tdaP_DL
->
k0
==
0
,
AssertFatal
(
!
tdaP_DL
->
k0
||
*
tdaP_DL
->
k0
==
0
,
...
@@ -490,7 +491,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
...
@@ -490,7 +491,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
const
long
f
=
(
sched_ctrl
->
active_bwp
||
bwpd
)
?
sched_ctrl
->
search_space
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
:
0
;
const
long
f
=
(
sched_ctrl
->
active_bwp
||
bwpd
)
?
sched_ctrl
->
search_space
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
:
0
;
int
rbSize
=
0
;
int
rbSize
=
0
;
const
int
tda
=
sched_ctrl
->
active_bwp
?
RC
.
nrmac
[
module_id
]
->
preferred_dl_tda
[
sched_ctrl
->
active_bwp
->
bwp_Id
][
slot
]
:
nr_find_default_tda
(
module_id
,
slot
)
;
const
int
tda
=
RC
.
nrmac
[
module_id
]
->
preferred_dl_tda
[
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Id
:
0
][
slot
]
;
AssertFatal
(
tda
>=
0
,
"Unable to find PDSCH time domain allocation in list
\n
"
);
AssertFatal
(
tda
>=
0
,
"Unable to find PDSCH time domain allocation in list
\n
"
);
if
(
tda
==
retInfo
->
time_domain_allocation
)
{
if
(
tda
==
retInfo
->
time_domain_allocation
)
{
/* Check that there are enough resources for retransmission */
/* Check that there are enough resources for retransmission */
...
@@ -715,7 +716,7 @@ void pf_dl(module_id_t module_id,
...
@@ -715,7 +716,7 @@ void pf_dl(module_id_t module_id,
/* MCS has been set above */
/* MCS has been set above */
const
int
tda
=
sched_ctrl
->
active_bwp
?
RC
.
nrmac
[
module_id
]
->
preferred_dl_tda
[
sched_ctrl
->
active_bwp
->
bwp_Id
][
slot
]
:
nr_find_default_tda
(
module_id
,
slot
)
;
const
int
tda
=
RC
.
nrmac
[
module_id
]
->
preferred_dl_tda
[
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Id
:
0
][
slot
]
;
AssertFatal
(
tda
>=
0
,
"Unable to find PDSCH time domain allocation in list
\n
"
);
AssertFatal
(
tda
>=
0
,
"Unable to find PDSCH time domain allocation in list
\n
"
);
NR_sched_pdsch_t
*
sched_pdsch
=
&
sched_ctrl
->
sched_pdsch
;
NR_sched_pdsch_t
*
sched_pdsch
=
&
sched_ctrl
->
sched_pdsch
;
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
8f354ec3
...
@@ -371,8 +371,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
...
@@ -371,8 +371,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
sched_pdsch
->
pucch_allocation
=
alloc
;
sched_pdsch
->
pucch_allocation
=
alloc
;
sched_pdsch
->
rbStart
=
rbStart
;
sched_pdsch
->
rbStart
=
rbStart
;
sched_pdsch
->
rbSize
=
rbSize
;
sched_pdsch
->
rbSize
=
rbSize
;
const
int
tda
=
sched_ctrl
->
active_bwp
?
RC
.
nrmac
[
module_id
]
->
preferred_dl_tda
[
sched_ctrl
->
active_bwp
->
bwp_Id
][
slot
]
:
nr_find_default_tda
(
module_id
,
slot
);
const
int
tda
=
sched_ctrl
->
active_bwp
?
RC
.
nrmac
[
module_id
]
->
preferred_dl_tda
[
sched_ctrl
->
active_bwp
->
bwp_Id
][
slot
]
:
1
;
AssertFatal
(
tda
>=
0
,
"Unable to find PDSCH time domain allocation in list
\n
"
);
const
uint8_t
num_dmrs_cdm_grps_no_data
=
1
;
const
uint8_t
num_dmrs_cdm_grps_no_data
=
1
;
const
long
f
=
1
;
const
long
f
=
1
;
ps
->
nrOfLayers
=
target_dl_Nl
;
ps
->
nrOfLayers
=
target_dl_Nl
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
8f354ec3
...
@@ -295,39 +295,6 @@ bool nr_find_nb_rb(uint16_t Qm,
...
@@ -295,39 +295,6 @@ bool nr_find_nb_rb(uint16_t Qm,
return
*
tbs
>=
bytes
&&
*
nb_rb
<=
nb_rb_max
;
return
*
tbs
>=
bytes
&&
*
nb_rb
<=
nb_rb_max
;
}
}
int
nr_find_default_tda
(
module_id_t
module_id
,
sub_frame_t
slot
)
{
int
tda
=
-
1
;
const
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
module_id
]
->
common_channels
->
ServingCellConfigCommon
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
bool
is_mixed_slot
=
is_xlsch_in_slot
(
RC
.
nrmac
[
module_id
]
->
dlsch_slot_bitmap
[
slot
/
64
],
slot
)
&&
is_xlsch_in_slot
(
RC
.
nrmac
[
module_id
]
->
ulsch_slot_bitmap
[
slot
/
64
],
slot
);
int
startSymbolAndLength
=
0
;
int
StartSymbolIndex
=
0
;
int
NrOfSymbols
=
0
;
int
NrOfSymbols_sel
=
-
1
;
for
(
int
i
=
0
;
i
<
pdsch_TimeDomainAllocationList
->
list
.
count
;
i
++
)
{
startSymbolAndLength
=
pdsch_TimeDomainAllocationList
->
list
.
array
[
i
]
->
startSymbolAndLength
;
SLIV2SL
(
startSymbolAndLength
,
&
StartSymbolIndex
,
&
NrOfSymbols
);
if
(
is_mixed_slot
)
{
if
(
StartSymbolIndex
+
NrOfSymbols
<=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSymbols
&&
NrOfSymbols
>
NrOfSymbols_sel
)
{
NrOfSymbols_sel
=
NrOfSymbols
;
tda
=
i
;
}
}
else
{
if
(
NrOfSymbols
>
NrOfSymbols_sel
)
{
NrOfSymbols_sel
=
NrOfSymbols
;
tda
=
i
;
}
}
}
return
tda
;
}
void
nr_set_pdsch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
void
nr_set_pdsch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_CellGroupConfig_t
*
secondaryCellGroup
,
const
NR_CellGroupConfig_t
*
secondaryCellGroup
,
const
NR_BWP_Downlink_t
*
bwp
,
const
NR_BWP_Downlink_t
*
bwp
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
8f354ec3
...
@@ -284,8 +284,6 @@ NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc,
...
@@ -284,8 +284,6 @@ NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc,
long
get_K2
(
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Uplink_t
*
ubwp
,
int
time_domain_assignment
,
int
mu
);
long
get_K2
(
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Uplink_t
*
ubwp
,
int
time_domain_assignment
,
int
mu
);
int
nr_find_default_tda
(
module_id_t
module_id
,
sub_frame_t
slot
);
void
nr_set_pdsch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
void
nr_set_pdsch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_CellGroupConfig_t
*
secondaryCellGroup
,
const
NR_CellGroupConfig_t
*
secondaryCellGroup
,
const
NR_BWP_Downlink_t
*
bwp
,
const
NR_BWP_Downlink_t
*
bwp
,
...
...
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