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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
1be8caaf
Commit
1be8caaf
authored
Jun 14, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing dl active_bwp
parent
e592045d
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
100 additions
and
211 deletions
+100
-211
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+5
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+26
-56
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+11
-46
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+3
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+35
-70
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+12
-19
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+3
-8
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-2
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
1be8caaf
...
...
@@ -272,25 +272,22 @@ void nr_dlsim_preprocessor(module_id_t module_id,
NR_UE_info_t
*
UE_info
=
RC
.
nrmac
[
module_id
]
->
UE_info
.
list
[
0
];
AssertFatal
(
RC
.
nrmac
[
module_id
]
->
UE_info
.
list
[
1
]
==
NULL
,
"can have only a single UE
\n
"
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
;
NR_UE_BWP_t
*
BWP
=
&
UE_info
->
current_BWP
;
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
0
]
->
common_channels
[
0
].
ServingCellConfigCommon
;
/* manually set free CCE to 0 */
const
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
sched_ctrl
->
search_space
=
get_searchspace
(
scc
,
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Dedicated
:
NULL
,
target_ss
);
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
&
nr_of_candidates
,
sched_ctrl
->
search_space
,
4
);
sched_ctrl
->
coreset
=
get_coreset
(
RC
.
nrmac
[
module_id
],
scc
,
sched_ctrl
->
active_bwp
->
bwp_Dedicated
,
sched_ctrl
->
search_space
,
target_ss
);
sched_ctrl
->
cce_index
=
0
;
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
nr_set_pdsch_semi_static
(
NULL
,
nr_set_pdsch_semi_static
(
BWP
,
scc
,
UE_info
->
CellGroup
,
sched_ctrl
->
active_bwp
,
NULL
,
/* tda = */
0
,
g_nrOfLayers
,
sched_ctrl
,
...
...
@@ -838,6 +835,8 @@ int main(int argc, char **argv)
N_RB_DL
=
gNB
->
frame_parms
.
N_RB_DL
;
NR_UE_info_t
*
UE_info
=
RC
.
nrmac
[
0
]
->
UE_info
.
list
[
0
];
configure_UE_BWP
(
RC
.
nrmac
[
0
],
&
UE_info
->
current_BWP
,
scc
,
&
UE_info
->
UE_sched_ctrl
,
NULL
,
UE_info
->
CellGroup
);
// stub to configure frame_parms
// nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions);
// call MAC to configure common parameters
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
1be8caaf
...
...
@@ -850,6 +850,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
fill_dci_pdu_rel15
(
scc
,
ra
->
CellGroup
,
ra_BWP
,
dci_pdu
,
&
uldci_payload
,
NR_UL_DCI_FORMAT_0_0
,
...
...
@@ -1164,21 +1165,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_SearchSpace_t
*
ss
=
ra
->
ra_ss
;
NR_BWP_Downlink_t
*
bwp
=
NULL
;
NR_ControlResourceSet_t
*
coreset
=
NULL
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
NULL
;
if
(
ra
->
CellGroup
&&
ra
->
CellGroup
->
spCellConfig
&&
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
&&
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra_BWP
->
dl_bwp_id
-
1
])
{
bwp
=
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra_BWP
->
dl_bwp_id
-
1
];
pdsch_TimeDomainAllocationList
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
{
pdsch_TimeDomainAllocationList
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
ra_BWP
->
tdaList
;
long
BWPStart
=
0
;
long
BWPSize
=
0
;
...
...
@@ -1199,7 +1186,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
SLIV2SL
(
startSymbolAndLength
,
&
startSymbolIndex
,
&
nrOfSymbols
);
AssertFatal
(
startSymbolIndex
>=
0
,
"StartSymbolIndex is negative
\n
"
);
coreset
=
ra
->
coreset
;
NR_ControlResourceSet_t
*
coreset
=
ra
->
coreset
;
AssertFatal
(
coreset
!=
NULL
,
"Coreset cannot be null for RA-Msg2
\n
"
);
...
...
@@ -1278,13 +1265,11 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// information to data and is reset every slot.
const
int
pduindex
=
nr_mac
->
pdu_index
[
CC_id
]
++
;
NR_PDSCH_Config_t
*
pdsch_Config
=
ra_BWP
->
pdsch_Config
;
uint8_t
mcsTableIdx
=
0
;
if
(
bwp
&&
bwp
->
bwp_Dedicated
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
)
{
if
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
0
)
if
(
pdsch_Config
&&
pdsch_Config
->
mcs_Table
)
{
if
(
*
pdsch_Config
->
mcs_Table
==
0
)
mcsTableIdx
=
1
;
else
mcsTableIdx
=
2
;
...
...
@@ -1292,17 +1277,12 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
else
mcsTableIdx
=
0
;
int
dmrsConfigType
=
0
;
if
(
bwp
&&
bwp
->
bwp_Dedicated
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
)
if
(
pdsch_Config
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
)
dmrsConfigType
=
1
;
NR_PDSCH_Config_t
*
pdsch_config
=
bwp
&&
bwp
->
bwp_Dedicated
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
?
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
:
NULL
;
pdsch_pdu_rel15
->
pduBitmap
=
0
;
pdsch_pdu_rel15
->
rnti
=
ra
->
RA_rnti
;
pdsch_pdu_rel15
->
pduIndex
=
pduindex
;
...
...
@@ -1328,7 +1308,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
VRBtoPRBMapping
=
0
;
pdsch_pdu_rel15
->
StartSymbolIndex
=
startSymbolIndex
;
pdsch_pdu_rel15
->
NrOfSymbols
=
nrOfSymbols
;
pdsch_pdu_rel15
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
pdsch_
c
onfig
,
pdsch_pdu_rel15
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
pdsch_
C
onfig
,
nr_mac
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
nrOfSymbols
,
startSymbolIndex
,
...
...
@@ -1421,6 +1401,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
fill_dci_pdu_rel15
(
scc
,
ra
->
CellGroup
,
ra_BWP
,
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
-
1
],
&
dci_payload
,
NR_DL_DCI_FORMAT_1_0
,
...
...
@@ -1485,23 +1466,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_SearchSpace_t
*
ss
=
ra
->
ra_ss
;
NR_BWP_Downlink_t
*
bwp
=
NULL
;
NR_ControlResourceSet_t
*
coreset
=
NULL
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
NULL
;
if
(
ra
->
CellGroup
&&
ra
->
CellGroup
->
spCellConfig
&&
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
&&
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra_BWP
->
dl_bwp_id
-
1
])
{
bwp
=
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra_BWP
->
dl_bwp_id
-
1
];
pdsch_TimeDomainAllocationList
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
{
pdsch_TimeDomainAllocationList
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
coreset
=
ra
->
coreset
;
NR_ControlResourceSet_t
*
coreset
=
ra
->
coreset
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
ra_BWP
->
tdaList
;
AssertFatal
(
coreset
!=
NULL
,
"Coreset cannot be null for RA-Msg4
\n
"
);
...
...
@@ -1635,7 +1601,13 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
uint16_t
N_DMRS_SLOT
=
get_num_dmrs
(
dlDmrsSymbPos
);
long
dmrsConfigType
=
bwp
!=
NULL
?
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
)
:
0
;
NR_PDSCH_Config_t
*
pdsch_Config
=
ra_BWP
->
pdsch_Config
;
int
dmrsConfigType
=
0
;
if
(
pdsch_Config
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
)
dmrsConfigType
=
1
;
nr_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
=
2
;
if
(
nrOfSymbols
==
2
)
{
...
...
@@ -1656,12 +1628,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
}
uint8_t
mcsTableIdx
=
0
;
if
(
bwp
&&
bwp
->
bwp_Dedicated
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
)
{
if
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
0
)
if
(
pdsch_Config
&&
pdsch_Config
->
mcs_Table
)
{
if
(
*
pdsch_Config
->
mcs_Table
==
0
)
mcsTableIdx
=
1
;
else
mcsTableIdx
=
2
;
...
...
@@ -1837,6 +1806,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
fill_dci_pdu_rel15
(
scc
,
ra
->
CellGroup
,
ra_BWP
,
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
-
1
],
&
dci_payload
,
NR_DL_DCI_FORMAT_1_0
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
1be8caaf
...
...
@@ -545,6 +545,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
int
rnti_type
=
NR_RNTI_SI
;
fill_dci_pdu_rel15
(
scc
,
NULL
,
NULL
,
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
-
1
],
&
dci_payload
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
1be8caaf
...
...
@@ -376,15 +376,10 @@ bool allocate_dl_retransmission(module_id_t module_id,
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
module_id
];
const
NR_ServingCellConfigCommon_t
*
scc
=
nr_mac
->
common_channels
->
ServingCellConfigCommon
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_BWP_t
*
BWP
=
&
UE
->
current_BWP
;
NR_sched_pdsch_t
*
retInfo
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
].
sched_pdsch
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
...
...
@@ -392,8 +387,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
const
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
const
int
coresetid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_size
:
UE
->
current_BWP
.
dl_BWPSize
;
...
...
@@ -427,11 +420,9 @@ bool allocate_dl_retransmission(module_id_t module_id,
/* check whether we need to switch the TDA allocation since the last
* (re-)transmission */
if
(
ps
->
time_domain_allocation
!=
tda
)
{
nr_set_pdsch_semi_static
(
sib1
,
nr_set_pdsch_semi_static
(
BWP
,
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
ps
->
nrOfLayers
,
sched_ctrl
,
...
...
@@ -442,11 +433,9 @@ bool allocate_dl_retransmission(module_id_t module_id,
* that we have enough resources */
NR_pdsch_semi_static_t
temp_ps
=
*
ps
;
nr_set_pdsch_semi_static
(
sib1
,
nr_set_pdsch_semi_static
(
BWP
,
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
ps
->
nrOfLayers
,
sched_ctrl
,
...
...
@@ -651,12 +640,6 @@ void pf_dl(module_id_t module_id,
NR_CellGroupConfig_t
*
cg
=
iterator
->
UE
->
CellGroup
;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
...
...
@@ -666,9 +649,6 @@ void pf_dl(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
iterator
->
UE
->
UE_sched_ctrl
;
const
uint16_t
rnti
=
iterator
->
UE
->
rnti
;
const
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_UE_BWP_t
*
BWP
=
&
iterator
->
UE
->
current_BWP
;
...
...
@@ -744,11 +724,9 @@ void pf_dl(module_id_t module_id,
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
if
(
ps
->
nrOfLayers
!=
iterator
->
UE
->
layers
||
ps
->
time_domain_allocation
!=
tda
)
{
nr_set_pdsch_semi_static
(
sib1
,
nr_set_pdsch_semi_static
(
BWP
,
scc
,
iterator
->
UE
->
CellGroup
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
iterator
->
UE
->
layers
,
sched_ctrl
,
...
...
@@ -813,17 +791,14 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
/* This is temporary and it assumes all UEs have the same BWP and TDA*/
NR_UE_info_t
*
UE
=
UE_info
->
list
[
0
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_BWP_t
*
BWP
=
&
UE
->
current_BWP
;
const
int
tda
=
get_dl_tda
(
RC
.
nrmac
[
module_id
],
scc
,
slot
);
int
startSymbolIndex
,
nrOfSymbols
;
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
BWP
->
tdaList
;
AssertFatal
(
tda
<
tdaList
->
list
.
count
,
"time_domain_allocation %d>=%d
\n
"
,
tda
,
tdaList
->
list
.
count
);
const
int
startSymbolAndLength
=
tdaList
->
list
.
array
[
tda
]
->
startSymbolAndLength
;
SLIV2SL
(
startSymbolAndLength
,
&
startSymbolIndex
,
&
nrOfSymbols
);
NR_UE_BWP_t
*
BWP
=
&
UE
->
current_BWP
;
const
int
coresetid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_size
:
BWP
->
dl_BWPSize
;
...
...
@@ -986,8 +961,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
sched_pdsch
->
pucch_allocation
,
sched_ctrl
->
tpc1
);
NR_BWP_Downlink_t
*
bwp
=
sched_ctrl
->
active_bwp
;
NR_SearchSpace_t
*
ss
=
sched_ctrl
->
search_space
;
const
int
bwp_id
=
current_BWP
->
dl_bwp_id
;
...
...
@@ -1087,13 +1060,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
bw_tbslbrm
,
nl_tbslbrm
);
NR_PDSCH_Config_t
*
pdsch_Config
=
NULL
;
if
(
bwp
&&
bwp
->
bwp_Dedicated
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
&&
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
)
pdsch_Config
=
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
;
NR_PDSCH_Config_t
*
pdsch_Config
=
current_BWP
->
pdsch_Config
;
/* Check and validate PTRS values */
struct
NR_SetupRelease_PTRS_DownlinkConfig
*
phaseTrackingRS
=
...
...
@@ -1140,14 +1107,11 @@ void nr_schedule_ue_spec(module_id_t module_id,
dci_pdu_rel15_t
dci_payload
;
memset
(
&
dci_payload
,
0
,
sizeof
(
dci_pdu_rel15_t
));
// bwp indicator
const
int
n_dl_bwp
=
bwp
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
:
0
;
AssertFatal
(
n_dl_bwp
<=
NR_MAX_NUM_BWP
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
n_dl_bwp
);
// as per table 7.3.1.1.2-1 in 38.212
dci_payload
.
bwp_indicator
.
val
=
bwp
?
(
n_dl_bwp
<
4
?
bwp_id
:
bwp_id
-
1
)
:
0
;
dci_payload
.
bwp_indicator
.
val
=
current_BWP
->
n_dl_bwp
<
4
?
bwp_id
:
bwp_id
-
1
;
if
(
bwp
)
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
resourceAllocation
==
NR_PDSCH_Config__resourceAllocation_resourceAllocationType1
,
"Only frequency resource allocation type 1 is currently supported
\n
"
);
AssertFatal
(
pdsch_Config
->
resourceAllocation
==
NR_PDSCH_Config__resourceAllocation_resourceAllocationType1
,
"Only frequency resource allocation type 1 is currently supported
\n
"
);
dci_payload
.
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu
->
rbSize
,
pdsch_pdu
->
rbStart
,
...
...
@@ -1189,6 +1153,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
const
int
rnti_type
=
NR_RNTI_C
;
fill_dci_pdu_rel15
(
scc
,
cg
,
current_BWP
,
dci_pdu
,
&
dci_payload
,
dci_format
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
1be8caaf
...
...
@@ -202,7 +202,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
ps
->
nrOfLayers
=
target_dl_Nl
;
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
nrOfLayers
!=
target_dl_Nl
)
nr_set_pdsch_semi_static
(
NULL
,
scc
,
UE
->
CellGroup
,
sched_ctrl
->
active_bwp
,
NULL
,
tda
,
target_dl_Nl
,
sched_ctrl
,
ps
);
nr_set_pdsch_semi_static
(
BWP
,
scc
,
UE
->
CellGroup
,
tda
,
target_dl_Nl
,
sched_ctrl
,
ps
);
/* find largest unallocated chunk */
const
int
bwpSize
=
BWP
->
dl_BWPSize
;
...
...
@@ -380,9 +380,8 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
if
(
!
is_xlsch_in_slot
(
ulsch_slot_bitmap
,
sched_slot
))
return
false
;
const
long
f
=
(
sched_ctrl
->
active_bwp
&&
sched_ctrl
->
search_space
&&
sched_ctrl
->
search_space
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
)
?
sched_ctrl
->
search_space
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
:
0
;
const
long
f
=
(
sched_ctrl
->
search_space
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
)
?
sched_ctrl
->
search_space
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
:
0
;
const
int
dci_format
=
f
?
NR_UL_DCI_FORMAT_0_1
:
NR_UL_DCI_FORMAT_0_0
;
uint8_t
num_dmrs_cdm_grps_no_data
=
1
;
if
((
target_ul_Nl
==
4
)
||
(
target_ul_Nl
==
3
))
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
1be8caaf
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
1be8caaf
...
...
@@ -833,13 +833,13 @@ static void handle_dl_harq(NR_UE_info_t * UE,
}
int
checkTargetSSBInFirst64TCIStates_pdschConfig
(
int
ssb_index_t
,
NR_UE_info_t
*
UE
)
{
NR_CellGroupConfig_t
*
CellGroup
=
UE
->
CellGroup
;
int
nb_tci_states
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
->
list
.
count
;
const
NR_PDSCH_Config_t
*
pdsch_Config
=
UE
->
current_BWP
.
pdsch_Config
;
int
nb_tci_states
=
pdsch_Config
?
pdsch_Config
->
tci_StatesToAddModList
->
list
.
count
:
0
;
NR_TCI_State_t
*
tci
=
NULL
;
int
i
;
for
(
i
=
0
;
i
<
nb_tci_states
&&
i
<
64
;
i
++
)
{
tci
=
(
NR_TCI_State_t
*
)
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
->
list
.
array
[
i
];
for
(
i
nt
i
=
0
;
i
<
nb_tci_states
&&
i
<
64
;
i
++
)
{
tci
=
(
NR_TCI_State_t
*
)
pdsch_Config
->
tci_StatesToAddModList
->
list
.
array
[
i
];
if
(
tci
!=
NULL
)
{
if
(
tci
->
qcl_Type1
.
referenceSignal
.
present
==
NR_QCL_Info__referenceSignal_PR_ssb
)
{
...
...
@@ -859,18 +859,17 @@ int checkTargetSSBInFirst64TCIStates_pdschConfig(int ssb_index_t, NR_UE_info_t *
}
int
checkTargetSSBInTCIStates_pdcchConfig
(
int
ssb_index_t
,
NR_UE_info_t
*
UE
)
{
NR_CellGroupConfig_t
*
CellGroup
=
UE
->
CellGroup
;
int
nb_tci_states
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
->
list
.
count
;
NR_TCI_State_t
*
tci
=
NULL
;
NR_TCI_StateId_t
*
tci_id
=
NULL
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_ControlResourceSet_t
*
coreset
=
sched_ctrl
->
coreset
;
int
i
;
int
flag
=
0
;
int
tci_stateID
=
-
1
;
for
(
i
=
0
;
i
<
nb_tci_states
&&
i
<
128
;
i
++
)
{
tci
=
(
NR_TCI_State_t
*
)
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
->
list
.
array
[
i
];
const
NR_PDSCH_Config_t
*
pdsch_Config
=
UE
->
current_BWP
.
pdsch_Config
;
int
nb_tci_states
=
pdsch_Config
?
pdsch_Config
->
tci_StatesToAddModList
->
list
.
count
:
0
;
for
(
int
i
=
0
;
i
<
nb_tci_states
&&
i
<
128
;
i
++
)
{
tci
=
(
NR_TCI_State_t
*
)
pdsch_Config
->
tci_StatesToAddModList
->
list
.
array
[
i
];
if
(
tci
!=
NULL
&&
tci
->
qcl_Type1
.
referenceSignal
.
present
==
NR_QCL_Info__referenceSignal_PR_ssb
)
{
if
(
tci
->
qcl_Type1
.
referenceSignal
.
choice
.
ssb
==
ssb_index_t
)
{
...
...
@@ -932,14 +931,6 @@ void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) {
uint8_t
idx
=
0
;
NR_UE_BWP_t
*
BWP
=
&
UE
->
current_BWP
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_CellGroupConfig_t
*
CellGroup
=
UE
->
CellGroup
;
//bwp indicator
int
n_dl_bwp
=
0
;
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
)
n_dl_bwp
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
;
uint8_t
nr_ssbri_cri
=
0
;
uint8_t
nb_of_csi_ssb_report
=
UE
->
csi_report_template
[
cqi_idx
].
nb_of_csi_ssb_report
;
...
...
@@ -947,6 +938,8 @@ void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) {
uint8_t
diff_rsrp_idx
=
0
;
uint8_t
i
,
j
;
//bwp indicator
int
n_dl_bwp
=
BWP
->
n_dl_bwp
;
const
int
bwp_id
=
BWP
->
dl_bwp_id
;
if
(
n_dl_bwp
<
4
)
pdsch_bwp_id
=
bwp_id
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
1be8caaf
...
...
@@ -1806,6 +1806,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
current_BWP
);
fill_dci_pdu_rel15
(
scc
,
cg
,
current_BWP
,
dci_pdu
,
&
uldci_payload
,
ps
->
dci_format
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
1be8caaf
...
...
@@ -297,6 +297,7 @@ void fill_pdcch_vrb_map(gNB_MAC_INST *mac,
void
fill_dci_pdu_rel15
(
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_CellGroupConfig_t
*
CellGroup
,
const
NR_UE_BWP_t
*
BWP
,
nfapi_nr_dl_dci_pdu_t
*
pdcch_dci_pdu
,
dci_pdu_rel15_t
*
dci_pdu_rel15
,
int
dci_formats
,
...
...
@@ -307,6 +308,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
uint16_t
cset0_bwp_size
);
void
prepare_dci
(
const
NR_CellGroupConfig_t
*
CellGroup
,
const
NR_UE_BWP_t
*
BWP
,
dci_pdu_rel15_t
*
dci_pdu_rel15
,
nr_dci_format_t
format
,
int
bwp_id
);
...
...
@@ -319,11 +321,6 @@ void set_r_pucch_parms(int rsetindex,
int
*
nr_of_symbols
,
int
*
start_symbol_index
);
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
(
gNB_MAC_INST
*
nrmac
,
NR_ServingCellConfigCommon_t
*
scc
,
...
...
@@ -342,11 +339,9 @@ long get_K2(NR_ServingCellConfigCommon_t *scc,
int
time_domain_assignment
,
int
mu
);
void
nr_set_pdsch_semi_static
(
const
NR_
SIB1_t
*
sib1
,
void
nr_set_pdsch_semi_static
(
const
NR_
UE_BWP_t
*
BWP
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_CellGroupConfig_t
*
secondaryCellGroup
,
const
NR_BWP_Downlink_t
*
bwp
,
const
NR_BWP_DownlinkDedicated_t
*
bwpd0
,
int
tda
,
uint8_t
layers
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
1be8caaf
...
...
@@ -94,6 +94,7 @@ typedef struct {
typedef
struct
NR_UE_BWP
{
NR_BWP_Id_t
dl_bwp_id
;
NR_BWP_Id_t
ul_bwp_id
;
int
n_dl_bwp
;
int
dl_scs
;
int
ul_scs
;
long
*
dl_cyclicprefix
;
...
...
@@ -102,6 +103,8 @@ typedef struct NR_UE_BWP {
uint16_t
dl_BWPStart
;
uint16_t
ul_BWPSize
;
uint16_t
ul_BWPStart
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
;
NR_PDSCH_Config_t
*
pdsch_Config
;
}
NR_UE_BWP_t
;
typedef
enum
{
...
...
@@ -576,8 +579,6 @@ typedef struct NR_UE_ul_harq {
/*! \brief scheduling control information set through an API */
#define MAX_CSI_REPORTS 48
typedef
struct
{
/// the currently active BWP in DL
NR_BWP_Downlink_t
*
active_bwp
;
/// the currently active BWP in UL
NR_BWP_Uplink_t
*
active_ubwp
;
...
...
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