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
3cd49db4
Commit
3cd49db4
authored
Jun 17, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing ul active_bwp
parent
66e28109
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
240 deletions
+68
-240
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+2
-15
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+4
-18
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+3
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+40
-81
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+8
-48
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+6
-53
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+2
-12
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-5
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
3cd49db4
...
...
@@ -699,13 +699,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_UE_UL_BWP_t
*
UL_BWP
=
&
ra
->
UL_BWP
;
NR_BWP_Uplink_t
*
ubwp
=
NULL
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
NULL
;
NR_PUSCH_TimeDomainResourceAllocationList_t
*
pusch_TimeDomainAllocationList
=
UL_BWP
->
tdaList
;
if
(
ra
->
CellGroup
)
{
ubwp
=
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
UL_BWP
->
bwp_id
-
1
];
ubwpd
=
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
;
}
int
mu
=
UL_BWP
->
scs
;
uint8_t
K2
=
*
pusch_TimeDomainAllocationList
->
list
.
array
[
ra
->
Msg3_tda_id
]
->
k2
;
const
int
sched_frame
=
frame
+
(
slot
+
K2
>=
nr_slots_per_frame
[
mu
]);
...
...
@@ -834,14 +828,11 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
const
NR_SIB1_t
*
sib1
=
cc
->
sib1
?
cc
->
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
config_uldci
(
sib1
,
ubwp
,
ubwpd
,
scc
,
pusch_pdu
,
&
uldci_payload
,
ra
->
Msg3_tda_id
,
ra
->
msg3_TPC
,
0
,
// not used in format 0_0
&
ra
->
UL_BWP
);
fill_dci_pdu_rel15
(
scc
,
...
...
@@ -879,7 +870,6 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
void
nr_get_Msg3alloc
(
module_id_t
module_id
,
int
CC_id
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Uplink_t
*
ubwp
,
sub_frame_t
current_slot
,
frame_t
current_frame
,
NR_RA_t
*
ra
,
...
...
@@ -1393,10 +1383,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
nfapi_nr_pdu_t
*
tx_req
=
&
nr_mac
->
TX_req
[
CC_id
].
pdu_list
[
nr_mac
->
TX_req
[
CC_id
].
Number_of_PDUs
];
// Program UL processing for Msg3
NR_BWP_Uplink_t
*
ubwp
=
ra
->
CellGroup
?
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
UL_BWP
.
bwp_id
-
1
]
:
NULL
;
nr_get_Msg3alloc
(
module_idP
,
CC_id
,
scc
,
ubwp
,
slotP
,
frameP
,
ra
,
nr_mac
->
tdd_beam_association
);
nr_get_Msg3alloc
(
module_idP
,
CC_id
,
scc
,
slotP
,
frameP
,
ra
,
nr_mac
->
tdd_beam_association
);
nr_add_msg3
(
module_idP
,
CC_id
,
frameP
,
slotP
,
ra
,
(
uint8_t
*
)
&
tx_req
->
TLVs
[
0
].
value
.
direct
[
0
]);
if
(
ra
->
cfra
)
{
...
...
@@ -1520,7 +1507,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
}
const
int
delta_PRI
=
0
;
int
r_pucch
=
nr_get_pucch_resource
(
coreset
,
sched_ctrl
->
active_ubwp
,
NULL
,
CCEIndex
);
int
r_pucch
=
nr_get_pucch_resource
(
coreset
,
ra
->
UL_BWP
.
pucch_Config
,
CCEIndex
);
LOG_D
(
NR_MAC
,
"[RAPROC] Msg4 r_pucch %d (CCEIndex %d, nb_of_candidates %d, delta_PRI %d)
\n
"
,
r_pucch
,
CCEIndex
,
nr_of_candidates
,
delta_PRI
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
3cd49db4
...
...
@@ -377,16 +377,10 @@ bool allocate_dl_retransmission(module_id_t 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_DL_BWP_t
*
BWP
=
&
UE
->
current_DL_BWP
;
NR_UE_UL_BWP_t
*
UBWP
=
&
UE
->
current_UL_BWP
;
NR_sched_pdsch_t
*
retInfo
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
].
sched_pdsch
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
const
int
coresetid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_size
:
BWP
->
BWPSize
;
...
...
@@ -506,7 +500,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
* allocation after CCE alloc fail would be more complex) */
int
r_pucch
=
nr_get_pucch_resource
(
sched_ctrl
->
coreset
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
CCEIndex
);
int
r_pucch
=
nr_get_pucch_resource
(
sched_ctrl
->
coreset
,
UBWP
->
pucch_Config
,
CCEIndex
);
const
int
alloc
=
nr_acknack_scheduling
(
module_id
,
UE
,
frame
,
slot
,
r_pucch
,
0
);
if
(
alloc
<
0
)
{
LOG_D
(
MAC
,
...
...
@@ -639,19 +633,11 @@ void pf_dl(module_id_t module_id,
/* Loop UE_sched to find max coeff and allocate transmission */
while
(
remainUEs
>
0
&&
n_rb_sched
>=
min_rbSize
&&
iterator
->
UE
!=
NULL
)
{
NR_CellGroupConfig_t
*
cg
=
iterator
->
UE
->
CellGroup
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
iterator
->
UE
->
UE_sched_ctrl
;
const
uint16_t
rnti
=
iterator
->
UE
->
rnti
;
NR_UE_DL_BWP_t
*
BWP
=
&
iterator
->
UE
->
current_DL_BWP
;
NR_UE_UL_BWP_t
*
UBWP
=
&
iterator
->
UE
->
current_UL_BWP
;
const
int
coresetid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
...
...
@@ -697,7 +683,7 @@ void pf_dl(module_id_t module_id,
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
* allocation after CCE alloc fail would be more complex) */
int
r_pucch
=
nr_get_pucch_resource
(
sched_ctrl
->
coreset
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
CCEIndex
);
int
r_pucch
=
nr_get_pucch_resource
(
sched_ctrl
->
coreset
,
UBWP
->
pucch_Config
,
CCEIndex
);
const
int
alloc
=
nr_acknack_scheduling
(
module_id
,
iterator
->
UE
,
frame
,
slot
,
r_pucch
,
0
);
if
(
alloc
<
0
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
3cd49db4
...
...
@@ -280,7 +280,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
__func__
,
UE
->
rnti
);
int
r_pucch
=
nr_get_pucch_resource
(
sched_ctrl
->
coreset
,
sched_ctrl
->
active_ubwp
,
NULL
,
CCEIndex
);
int
r_pucch
=
nr_get_pucch_resource
(
sched_ctrl
->
coreset
,
UE
->
current_UL_BWP
.
pucch_Config
,
CCEIndex
);
const
int
alloc
=
nr_acknack_scheduling
(
module_id
,
UE
,
frame
,
slot
,
r_pucch
,
0
);
if
(
alloc
<
0
)
{
LOG_D
(
MAC
,
...
...
@@ -379,18 +379,13 @@ 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
;
uint8_t
num_dmrs_cdm_grps_no_data
=
1
;
if
((
target_ul_Nl
==
4
)
||
(
target_ul_Nl
==
3
))
num_dmrs_cdm_grps_no_data
=
2
;
/* we want to avoid a lengthy deduction of DMRS and other parameters in
* every TTI if we can save it, so check whether TDA, or
* num_dmrs_cdm_grps_no_data has changed and only then recompute */
NR_pusch_semi_static_t
*
ps
=
&
sched_ctrl
->
pusch_semi_static
;
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
nrOfLayers
!=
target_ul_Nl
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
nr_set_pusch_semi_static
(
BWP
,
scc
,
sched_ctrl
->
active_ubwp
,
NULL
,
tda
,
num_dmrs_cdm_grps_no_data
,
target_ul_Nl
,
ps
);
||
ps
->
nrOfLayers
!=
target_ul_Nl
)
nr_set_pusch_semi_static
(
BWP
,
scc
,
tda
,
target_ul_Nl
,
ps
);
uint16_t
rbStart
=
0
;
uint16_t
rbSize
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
3cd49db4
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
3cd49db4
...
...
@@ -80,21 +80,13 @@ static void nr_fill_nfapi_pucch(gNB_MAC_INST *nrmac,
pucch
->
resource_indicator
);
NR_COMMON_channels_t
*
common_ch
=
nrmac
->
common_channels
;
NR_ServingCellConfigCommon_t
*
scc
=
common_ch
->
ServingCellConfigCommon
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
LOG_D
(
NR_MAC
,
"%4d.%2d Calling nr_configure_pucch (pucch_Config %p,r_pucch %d) pucch to be scheduled in %4d.%2d
\n
"
,
frame
,
slot
,
UE
->
current_UL_BWP
.
pucch_Config
,
pucch
->
r_pucch
,
pucch
->
frame
,
pucch
->
ul_slot
);
LOG_D
(
NR_MAC
,
"%4d.%2d Calling nr_configure_pucch (ubwpd %p,r_pucch %d) pucch to be scheduled in %4d.%2d
\n
"
,
frame
,
slot
,
ubwpd
,
pucch
->
r_pucch
,
pucch
->
frame
,
pucch
->
ul_slot
);
const
NR_SIB1_t
*
sib1
=
common_ch
->
sib1
?
common_ch
->
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
nr_configure_pucch
(
sib1
,
pucch_pdu
,
nr_configure_pucch
(
pucch_pdu
,
scc
,
UE
,
ubwpd
,
pucch
->
resource_indicator
,
pucch
->
csi_bits
,
pucch
->
dai_c
,
...
...
@@ -708,17 +700,7 @@ void nr_csi_meas_reporting(int Mod_idP,
const
NR_CSI_MeasConfig_t
*
csi_measconfig
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
AssertFatal
(
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
>
0
,
"NO CSI report configuration available"
);
NR_PUCCH_Config_t
*
pucch_Config
=
NULL
;
if
(
sched_ctrl
->
active_ubwp
)
{
pucch_Config
=
sched_ctrl
->
active_ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
}
else
if
(
CellGroup
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
)
{
pucch_Config
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
;
}
NR_PUCCH_Config_t
*
pucch_Config
=
UL_BWP
->
pucch_Config
;
for
(
int
csi_report_id
=
0
;
csi_report_id
<
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
count
;
csi_report_id
++
){
NR_CSI_ReportConfig_t
*
csirep
=
csi_measconfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
];
...
...
@@ -1617,18 +1599,7 @@ int nr_acknack_scheduling(int mod_id,
* later)
* * each UE has dedicated PUCCH Format 0 resources, and we use index 0! */
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_PUCCH_Config_t
*
pucch_Config
=
NULL
;
if
(
sched_ctrl
->
active_ubwp
)
{
pucch_Config
=
sched_ctrl
->
active_ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
}
else
if
(
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
)
{
pucch_Config
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
;
}
NR_PUCCH_Config_t
*
pucch_Config
=
BWP
->
pucch_Config
;
int
bwp_start
=
BWP
->
BWPStart
;
int
bwp_size
=
BWP
->
BWPSize
;
...
...
@@ -1881,21 +1852,10 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
NR_UE_UL_BWP_t
*
BWP
=
&
UE
->
current_UL_BWP
;
const
int
n_slots_frame
=
nr_slots_per_frame
[
BWP
->
scs
];
if
(
sched_ctrl
->
ul_failure
==
1
)
continue
;
NR_PUCCH_Config_t
*
pucch_Config
=
NULL
;
if
(
sched_ctrl
->
active_ubwp
)
{
pucch_Config
=
sched_ctrl
->
active_ubwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
}
else
if
(
UE
->
CellGroup
&&
UE
->
CellGroup
->
spCellConfig
&&
UE
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
UE
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
UE
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
&&
UE
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
)
{
pucch_Config
=
UE
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
;
}
NR_PUCCH_Config_t
*
pucch_Config
=
BWP
->
pucch_Config
;
else
continue
;
if
(
!
pucch_Config
->
schedulingRequestResourceToAddModList
)
continue
;
if
(
!
pucch_Config
||
!
pucch_Config
->
schedulingRequestResourceToAddModList
)
continue
;
AssertFatal
(
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
.
count
>
0
,
"NO SR configuration available"
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
3cd49db4
...
...
@@ -822,32 +822,22 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
const
int
CC_id
=
0
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_sched_pusch_t
*
retInfo
=
&
sched_ctrl
->
ul_harq_processes
[
harq_pid
].
sched_pusch
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
int
rbStart
=
0
;
// wrt BWP start
const
uint16_t
bwpSize
=
UE
->
current_UL_BWP
.
BWPSize
;
const
uint8_t
nrOfLayers
=
1
;
const
uint8_t
num_dmrs_cdm_grps_no_data
=
(
sched_ctrl
->
active_ubwp
||
ubwpd
)
?
1
:
2
;
LOG_D
(
NR_MAC
,
"retInfo->time_domain_allocation = %d, tda = %d
\n
"
,
retInfo
->
time_domain_allocation
,
tda
);
LOG_D
(
NR_MAC
,
"
num_dmrs_cdm_grps_no_data %d, tbs %d
\n
"
,
num_dmrs_cdm_grps_no_data
,
retInfo
->
tb_size
);
LOG_D
(
NR_MAC
,
"
tbs %d
\n
"
,
retInfo
->
tb_size
);
if
(
tda
==
retInfo
->
time_domain_allocation
)
{
/* check whether we need to switch the TDA allocation since tha last
* (re-)transmission */
NR_pusch_semi_static_t
*
ps
=
&
sched_ctrl
->
pusch_semi_static
;
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
nrOfLayers
!=
nrOfLayers
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
{
||
ps
->
nrOfLayers
!=
nrOfLayers
)
{
nr_set_pusch_semi_static
(
&
UE
->
current_UL_BWP
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
tda
,
num_dmrs_cdm_grps_no_data
,
nrOfLayers
,
ps
);
}
...
...
@@ -865,10 +855,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
NR_pusch_semi_static_t
temp_ps
;
nr_set_pusch_semi_static
(
&
UE
->
current_UL_BWP
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
tda
,
num_dmrs_cdm_grps_no_data
,
nrOfLayers
,
&
temp_ps
);
/* the retransmission will use a different time domain allocation, check
...
...
@@ -1016,10 +1003,6 @@ void pf_ul(module_id_t module_id,
NR_UE_UL_BWP_t
*
BWP
=
&
UE
->
current_UL_BWP
;
int
rbStart
=
0
;
// wrt BWP start
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
const
uint16_t
bwpSize
=
BWP
->
BWPSize
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
...
...
@@ -1106,17 +1089,12 @@ void pf_ul(module_id_t module_id,
* every TTI if we can save it, so check whether TDA, or
* num_dmrs_cdm_grps_no_data has changed and only then recompute */
const
uint8_t
nrOfLayers
=
1
;
const
uint8_t
num_dmrs_cdm_grps_no_data
=
(
sched_ctrl
->
active_ubwp
||
ubwpd
)
?
1
:
2
;
const
int
tda
=
get_ul_tda
(
nrmac
,
scc
,
sched_pusch
->
slot
);
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
nrOfLayers
!=
nrOfLayers
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
{
||
ps
->
nrOfLayers
!=
nrOfLayers
)
{
nr_set_pusch_semi_static
(
BWP
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
tda
,
num_dmrs_cdm_grps_no_data
,
nrOfLayers
,
ps
);
}
...
...
@@ -1209,13 +1187,7 @@ void pf_ul(module_id_t module_id,
else
LOG_D
(
NR_MAC
,
"%4d.%2d free CCE for UL DCI UE %04x
\n
"
,
frame
,
slot
,
iterator
->
UE
->
rnti
);
NR_UE_UL_BWP_t
*
BWP
=
&
iterator
->
UE
->
current_UL_BWP
;
NR_CellGroupConfig_t
*
cg
=
iterator
->
UE
->
CellGroup
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
int
rbStart
=
sched_ctrl
->
active_ubwp
?
BWP
->
BWPStart
:
0
;
const
uint16_t
bwpSize
=
BWP
->
BWPSize
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
NR_pusch_semi_static_t
*
ps
=
&
sched_ctrl
->
pusch_semi_static
;
...
...
@@ -1225,22 +1197,18 @@ void pf_ul(module_id_t module_id,
* every TTI if we can save it, so check whether TDA, or
* num_dmrs_cdm_grps_no_data has changed and only then recompute */
const
uint8_t
nrOfLayers
=
1
;
const
uint8_t
num_dmrs_cdm_grps_no_data
=
(
sched_ctrl
->
active_ubwp
||
ubwpd
)
?
1
:
2
;
const
int
tda
=
get_ul_tda
(
nrmac
,
scc
,
sched_pusch
->
slot
);
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
nrOfLayers
!=
nrOfLayers
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
{
||
ps
->
nrOfLayers
!=
nrOfLayers
)
{
nr_set_pusch_semi_static
(
BWP
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
tda
,
num_dmrs_cdm_grps_no_data
,
nrOfLayers
,
ps
);
}
update_ul_ue_R_Qm
(
sched_pusch
,
BWP
->
pusch_Config
,
BWP
->
mcs_table
);
int
rbStart
=
0
;
const
uint16_t
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
...
...
@@ -1340,7 +1308,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
is_xlsch_in_slot
(
nr_mac
->
ulsch_slot_bitmap
[
sched_slot
/
64
],
sched_slot
);
// FIXME: Avoid mixed slots for initialUplinkBWP
if
(
sched_ctrl
->
active_ubwp
==
NULL
&&
is_mixed_slot
)
if
(
BWP
->
bwp_id
==
0
&&
is_mixed_slot
)
return
false
;
// Avoid slots with the SRS
...
...
@@ -1473,10 +1441,6 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_UE_UL_BWP_t
*
current_BWP
=
&
UE
->
current_UL_BWP
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
UE
->
mac_stats
.
ul
.
current_bytes
=
0
;
/* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in
...
...
@@ -1744,24 +1708,13 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
dci_pdu_rel15_t
uldci_payload
;
memset
(
&
uldci_payload
,
0
,
sizeof
(
uldci_payload
));
int
n_ubwp
=
1
;
if
(
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
)
{
n_ubwp
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
count
;
}
config_uldci
(
sib1
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
scc
,
pusch_pdu
,
&
uldci_payload
,
ps
->
time_domain_allocation
,
UE
->
UE_sched_ctrl
.
tpc0
,
n_ubwp
,
current_BWP
);
fill_dci_pdu_rel15
(
scc
,
cg
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
3cd49db4
...
...
@@ -134,7 +134,6 @@ int nr_allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t slo
void
nr_get_Msg3alloc
(
module_id_t
module_id
,
int
CC_id
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Uplink_t
*
ubwp
,
sub_frame_t
current_subframe
,
frame_t
current_frame
,
NR_RA_t
*
ra
,
...
...
@@ -192,14 +191,11 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
void
config_uldci
(
const
NR_SIB1_t
*
sib1
,
const
NR_BWP_Uplink_t
*
ubwp
,
const
NR_BWP_UplinkDedicated_t
*
ubwpd
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
nfapi_nr_pusch_pdu_t
*
pusch_pdu
,
dci_pdu_rel15_t
*
dci_pdu_rel15
,
int
time_domain_assignment
,
uint8_t
tpc
,
int
n_ubwp
,
NR_UE_UL_BWP_t
*
BWP
);
void
nr_schedule_pucch
(
gNB_MAC_INST
*
nrmac
,
...
...
@@ -249,15 +245,12 @@ int nr_is_dci_opportunity(nfapi_nr_search_space_t search_space,
*/
int
nr_get_pucch_resource
(
NR_ControlResourceSet_t
*
coreset
,
NR_BWP_Uplink_t
*
bwp
,
NR_BWP_UplinkDedicated_t
*
bwpd
,
NR_PUCCH_Config_t
*
pucch_Config
,
int
CCEIndex
);
void
nr_configure_pucch
(
const
NR_SIB1_t
*
sib1
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
void
nr_configure_pucch
(
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_UE_info_t
*
UE
,
NR_BWP_UplinkDedicated_t
*
bwpd
,
uint8_t
pucch_resource
,
uint16_t
O_csi
,
uint16_t
O_ack
,
...
...
@@ -346,10 +339,7 @@ void nr_set_pdsch_semi_static(const NR_UE_DL_BWP_t *BWP,
void
nr_set_pusch_semi_static
(
const
NR_UE_UL_BWP_t
*
BWP
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_BWP_Uplink_t
*
ubwp
,
const
NR_BWP_UplinkDedicated_t
*
ubwpd
,
int
tda
,
uint8_t
num_dmrs_cdm_grps_no_data
,
uint8_t
nrOfLayers
,
NR_pusch_semi_static_t
*
ps
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
3cd49db4
...
...
@@ -105,12 +105,15 @@ typedef struct NR_UE_DL_BWP {
typedef
struct
NR_UE_UL_BWP
{
NR_BWP_Id_t
bwp_id
;
int
n_ul_bwp
;
int
scs
;
long
*
cyclicprefix
;
uint16_t
BWPSize
;
uint16_t
BWPStart
;
NR_PUSCH_TimeDomainResourceAllocationList_t
*
tdaList
;
NR_PUSCH_Config_t
*
pusch_Config
;
NR_PUCCH_Config_t
*
pucch_Config
;
NR_PUCCH_ConfigCommon_t
*
pucch_ConfigCommon
;
uint8_t
transform_precoding
;
uint8_t
mcs_table
;
nr_dci_format_t
dci_format
;
...
...
@@ -581,9 +584,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 UL
NR_BWP_Uplink_t
*
active_ubwp
;
/// the next active BWP ID in DL
NR_BWP_Id_t
next_dl_bwp_id
;
/// the next active BWP ID in UL
...
...
@@ -598,8 +598,6 @@ typedef struct {
/// corresponding to the sched_pusch/sched_pdsch structures below
int
cce_index
;
uint8_t
aggregation_level
;
/// maximum aggregation level for UE, can be used to select level
int
maxL
;
/// PUCCH scheduling information. Array of two: HARQ+SR in the first field,
/// CSI in second. This order is important for nr_acknack_scheduling()!
NR_sched_pucch_t
sched_pucch
[
2
];
...
...
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