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
9b737d09
Commit
9b737d09
authored
Mar 14, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ternary operators to outside of functions input parameters
parent
b2316f04
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
34 deletions
+48
-34
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+14
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+6
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+6
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+16
-12
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+4
-4
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
9b737d09
...
...
@@ -869,7 +869,8 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
dci_pdu_rel15_t
uldci_payload
;
memset
(
&
uldci_payload
,
0
,
sizeof
(
uldci_payload
));
config_uldci
(
nr_mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
const
NR_SIB1_t
*
sib1
=
cc
->
sib1
?
cc
->
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
config_uldci
(
sib1
,
ubwp
,
ubwpd
,
scc
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
9b737d09
...
...
@@ -86,7 +86,8 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *
else
{
target_ss
=
NR_SearchSpace__searchSpaceType_PR_common
;
}
NR_SearchSpace_t
*
search_space
=
get_searchspace
(
nrmac
->
common_channels
[
0
].
sib1
?
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
const
NR_SIB1_t
*
sib1
=
nrmac
->
common_channels
[
0
].
sib1
?
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_SearchSpace_t
*
search_space
=
get_searchspace
(
sib1
,
scc
,
bwp
?
bwp
->
bwp_Dedicated
:
NULL
,
target_ss
);
...
...
@@ -97,7 +98,7 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *
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
);
sib1
);
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 */
...
...
@@ -577,9 +578,10 @@ 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
;
NR_BWP_t
*
genericParameters
=
get_dl_bwp_genericParameters
(
sched_ctrl
->
active_bwp
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
const
int
coresetid
=
(
sched_ctrl
->
active_bwp
||
bwpd
)
?
sched_ctrl
->
coreset
->
controlResourceSetId
:
RC
.
nrmac
[
module_id
]
->
sched_ctrlCommon
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_size
:
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -610,7 +612,7 @@ 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
||
sched_ctrl
->
update_pdsch_ps
)
{
nr_set_pdsch_semi_static
(
nr_mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pdsch_semi_static
(
sib1
,
scc
,
cg
,
sched_ctrl
->
active_bwp
,
...
...
@@ -626,7 +628,7 @@ 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
(
nr_mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pdsch_semi_static
(
sib1
,
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
...
...
@@ -843,10 +845,11 @@ void pf_dl(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
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_BWP_t
*
genericParameters
=
get_dl_bwp_genericParameters
(
sched_ctrl
->
active_bwp
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
const
int
coresetid
=
(
sched_ctrl
->
active_bwp
||
bwpd
)
?
sched_ctrl
->
coreset
->
controlResourceSetId
:
RC
.
nrmac
[
module_id
]
->
sched_ctrlCommon
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_size
:
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -920,7 +923,7 @@ void pf_dl(module_id_t module_id,
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
if
(
ps
->
nrOfLayers
!=
layers
[
UE_id
]
||
ps
->
time_domain_allocation
!=
tda
||
sched_ctrl
->
update_pdsch_ps
)
{
nr_set_pdsch_semi_static
(
mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pdsch_semi_static
(
sib1
,
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
...
...
@@ -995,9 +998,10 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
const
int
startSymbolAndLength
=
tdaList
->
list
.
array
[
tda
]
->
startSymbolAndLength
;
SLIV2SL
(
startSymbolAndLength
,
&
startSymbolIndex
,
&
nrOfSymbols
);
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_BWP_t
*
genericParameters
=
get_dl_bwp_genericParameters
(
sched_ctrl
->
active_bwp
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
NR_BWP_DownlinkDedicated_t
*
bwpd
=
UE_info
->
CellGroup
[
UE_id
]
&&
...
...
@@ -1172,9 +1176,10 @@ void nr_schedule_ue_spec(module_id_t module_id,
sched_ctrl
->
tpc1
);
NR_BWP_Downlink_t
*
bwp
=
sched_ctrl
->
active_bwp
;
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_BWP_t
*
genericParameters
=
get_dl_bwp_genericParameters
(
bwp
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
NR_SearchSpace_t
*
ss
=
(
bwp
||
bwpd
)
?
sched_ctrl
->
search_space
:
gNB_mac
->
sched_ctrlCommon
->
search_space
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
9b737d09
...
...
@@ -228,7 +228,7 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
NR_BWP_t
*
get_dl_bwp_genericParameters
(
NR_BWP_Downlink_t
*
active_bwp
,
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
NR_SIB1_t
*
sib1
)
{
const
NR_SIB1_t
*
sib1
)
{
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
active_bwp
)
{
genericParameters
=
&
active_bwp
->
bwp_Common
->
genericParameters
;
...
...
@@ -242,7 +242,7 @@ NR_BWP_t *get_dl_bwp_genericParameters(NR_BWP_Downlink_t *active_bwp,
NR_BWP_t
*
get_ul_bwp_genericParameters
(
NR_BWP_Uplink_t
*
active_ubwp
,
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
NR_SIB1_t
*
sib1
)
{
const
NR_SIB1_t
*
sib1
)
{
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
active_ubwp
)
{
genericParameters
=
&
active_ubwp
->
bwp_Common
->
genericParameters
;
...
...
@@ -305,7 +305,7 @@ NR_ControlResourceSet_t *get_coreset(module_id_t module_idP,
}
}
NR_SearchSpace_t
*
get_searchspace
(
NR_SIB1_t
*
sib1
,
NR_SearchSpace_t
*
get_searchspace
(
const
NR_SIB1_t
*
sib1
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_DownlinkDedicated_t
*
bwp_Dedicated
,
NR_SearchSpace__searchSpaceType_PR
target_ss
)
{
...
...
@@ -1096,7 +1096,7 @@ int nr_get_pucch_resource(NR_ControlResourceSet_t *coreset,
}
// This function configures pucch pdu fapi structure
void
nr_configure_pucch
(
NR_SIB1_t
*
sib1
,
void
nr_configure_pucch
(
const
NR_SIB1_t
*
sib1
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_CellGroupConfig_t
*
CellGroup
,
...
...
@@ -2309,7 +2309,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
:
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
const
int
target_ss
=
sched_ctrl
->
active_bwp
?
NR_SearchSpace__searchSpaceType_PR_ue_Specific
:
NR_SearchSpace__searchSpaceType_PR_common
;
sched_ctrl
->
search_space
=
get_searchspace
(
nr_mac
->
common_channels
[
0
].
sib1
?
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
const
NR_SIB1_t
*
sib1
=
nr_mac
->
common_channels
[
0
].
sib1
?
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
sched_ctrl
->
search_space
=
get_searchspace
(
sib1
,
scc
,
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Dedicated
:
NULL
,
target_ss
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
9b737d09
...
...
@@ -82,7 +82,8 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
LOG_D
(
NR_MAC
,
"pucch_acknak: %d.%d Calling nr_configure_pucch (ubwpd %p,r_pucch %d) pucch in %d.%d
\n
"
,
frame
,
slot
,
ubwpd
,
pucch
->
r_pucch
,
pucch
->
frame
,
pucch
->
ul_slot
);
nr_configure_pucch
(
nr_mac
->
common_channels
[
0
].
sib1
?
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
const
NR_SIB1_t
*
sib1
=
nr_mac
->
common_channels
[
0
].
sib1
?
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
nr_configure_pucch
(
sib1
,
pucch_pdu
,
scc
,
UE_info
->
CellGroup
[
UE_id
],
...
...
@@ -743,9 +744,10 @@ void nr_csi_meas_reporting(int Mod_idP,
curr_pucch
->
csi_bits
+=
nr_get_csi_bitlen
(
Mod_idP
,
UE_id
,
csi_report_id
);
const
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
int
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -1757,9 +1759,10 @@ int nr_acknack_scheduling(int mod_id,
pucch_Config
=
RC
.
nrmac
[
mod_id
]
->
UE_info
.
CellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
;
}
const
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
mod_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
mod_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
(
NR_ServingCellConfigCommon_t
*
)
scc
,
RC
.
nrmac
[
mod_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
mod_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
int
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
9b737d09
...
...
@@ -991,9 +991,10 @@ bool allocate_ul_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
;
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
(
NR_ServingCellConfigCommon_t
*
)
scc
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
int
rbStart
=
0
;
// wrt BWP start
const
uint16_t
bwpSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -1020,7 +1021,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
||
sched_ctrl
->
update_pusch_ps
)
{
nr_set_pusch_semi_static
(
nr_mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pusch_semi_static
(
sib1
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
...
...
@@ -1041,7 +1042,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
rbSize
++
;
NR_pusch_semi_static_t
temp_ps
;
int
dci_format
=
get_dci_format
(
sched_ctrl
);
nr_set_pusch_semi_static
(
nr_mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pusch_semi_static
(
sib1
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
...
...
@@ -1161,6 +1162,7 @@ void pf_ul(module_id_t module_id,
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
module_id
];
NR_ServingCellConfigCommon_t
*
scc
=
nrmac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
NR_UE_info_t
*
UE_info
=
&
nrmac
->
UE_info
;
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
min_rb
=
5
;
float
coeff_ue
[
MAX_MOBILES_PER_GNB
];
// UEs that could be scheduled
...
...
@@ -1177,7 +1179,7 @@ void pf_ul(module_id_t module_id,
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
int
rbStart
=
0
;
// wrt BWP start
NR_CellGroupConfig_t
*
cg
=
UE_info
->
CellGroup
[
UE_id
];
...
...
@@ -1281,7 +1283,7 @@ void pf_ul(module_id_t module_id,
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
||
sched_ctrl
->
update_pusch_ps
)
{
nr_set_pusch_semi_static
(
nrmac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pusch_semi_static
(
sib1
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
...
...
@@ -1383,7 +1385,7 @@ void pf_ul(module_id_t module_id,
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
int
rbStart
=
sched_ctrl
->
active_ubwp
?
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
)
:
0
;
const
uint16_t
bwpSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -1414,7 +1416,7 @@ void pf_ul(module_id_t module_id,
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
||
sched_ctrl
->
update_pusch_ps
)
{
nr_set_pusch_semi_static
(
nrmac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
nr_set_pusch_semi_static
(
sib1
,
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
...
...
@@ -1465,8 +1467,9 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
module_id
];
NR_COMMON_channels_t
*
cc
=
nr_mac
->
common_channels
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_ServingCellConfigCommonSIB_t
*
scc_sib1
=
get_softmodem_params
()
->
sa
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
->
servingCellConfigCommon
:
NULL
;
const
NR_SIB1_t
*
sib1
=
get_softmodem_params
()
->
sa
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_ServingCellConfigCommonSIB_t
*
scc_sib1
=
get_softmodem_params
()
->
sa
?
sib1
->
servingCellConfigCommon
:
NULL
;
AssertFatal
(
scc
!=
NULL
||
scc_sib1
!=
NULL
,
"We need one serving cell config common
\n
"
);
...
...
@@ -1535,7 +1538,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
const
uint16_t
bwpSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
const
uint16_t
bwpStart
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -1646,6 +1649,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
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
NR_list_t
*
UE_list
=
&
UE_info
->
list
;
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
...
...
@@ -1779,7 +1783,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
/* FAPI: BWP */
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
?
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
);
sib1
);
pusch_pdu
->
bwp_size
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
pusch_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -1930,7 +1934,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
n_ubwp
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
count
;
}
config_uldci
(
nr_mac
->
common_channels
[
0
].
sib1
?
(
const
NR_SIB1_t
*
)
nr_mac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
,
config_uldci
(
sib1
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
scc
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
9b737d09
...
...
@@ -242,7 +242,7 @@ int nr_get_pucch_resource(NR_ControlResourceSet_t *coreset,
NR_BWP_UplinkDedicated_t
*
bwpd
,
int
CCEIndex
);
void
nr_configure_pucch
(
NR_SIB1_t
*
sib1
,
void
nr_configure_pucch
(
const
NR_SIB1_t
*
sib1
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_CellGroupConfig_t
*
CellGroup
,
...
...
@@ -302,11 +302,11 @@ void prepare_dci(const NR_CellGroupConfig_t *CellGroup,
NR_BWP_t
*
get_dl_bwp_genericParameters
(
NR_BWP_Downlink_t
*
active_bwp
,
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
NR_SIB1_t
*
sib1
);
const
NR_SIB1_t
*
sib1
);
NR_BWP_t
*
get_ul_bwp_genericParameters
(
NR_BWP_Uplink_t
*
active_ubwp
,
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
NR_SIB1_t
*
sib1
);
const
NR_SIB1_t
*
sib1
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
get_pdsch_TimeDomainAllocationList
(
const
NR_BWP_Downlink_t
*
active_bwp
,
const
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
...
...
@@ -320,7 +320,7 @@ NR_ControlResourceSet_t *get_coreset(module_id_t module_idP,
NR_SearchSpace__searchSpaceType_PR
ss_type
);
/* find a search space within a BWP */
NR_SearchSpace_t
*
get_searchspace
(
NR_SIB1_t
*
sib1
,
NR_SearchSpace_t
*
get_searchspace
(
const
NR_SIB1_t
*
sib1
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_DownlinkDedicated_t
*
bwp_Dedicated
,
NR_SearchSpace__searchSpaceType_PR
target_ss
);
...
...
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