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
0166cd05
Commit
0166cd05
authored
Feb 02, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
To use ServingCellConfigCommonSIB when ServingCellConfigCommon is NULL
parent
20e767d7
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
378 additions
and
150 deletions
+378
-150
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+3
-2
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+13
-11
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
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
+72
-26
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+103
-48
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+25
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+140
-42
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+16
-7
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
0166cd05
...
...
@@ -261,7 +261,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
/* 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
);
sched_ctrl
->
search_space
=
get_searchspace
(
module_id
,
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
,
...
...
@@ -276,7 +276,8 @@ void nr_dlsim_preprocessor(module_id_t module_id,
int
dci_format
=
sched_ctrl
->
search_space
&&
sched_ctrl
->
search_space
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
?
NR_DL_DCI_FORMAT_1_1
:
NR_DL_DCI_FORMAT_1_0
;
nr_set_pdsch_semi_static
(
scc
,
nr_set_pdsch_semi_static
(
module_id
,
scc
,
UE_info
->
CellGroup
[
0
],
sched_ctrl
->
active_bwp
,
NULL
,
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
0166cd05
...
...
@@ -2536,8 +2536,8 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
const
NR_CellGroupConfig_t
*
cg
,
dci_pdu_rel15_t
*
dci_pdu
,
nr_dci_format_t
format
,
nr_rnti_type_t
rnti_type
,
uint16_t
N_RB
,
nr_rnti_type_t
rnti_type
,
uint16_t
N_RB
,
int
bwp_id
)
{
uint16_t
size
=
0
;
...
...
@@ -2568,15 +2568,17 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
srs_config
=
(
ubwpd
->
srs_Config
)
?
ubwpd
->
srs_Config
->
choice
.
setup
:
NULL
;
}
else
if
(
cg
){
bwpd
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
;
bwpc
=
initialDownlinkBWP
;
ubwpd
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
;
ubwpc
=
initialUplinkBWP
;
pdsch_Config
=
(
bwpd
->
pdsch_Config
)
?
bwpd
->
pdsch_Config
->
choice
.
setup
:
NULL
;
pdcch_Config
=
(
bwpd
->
pdcch_Config
)
?
bwpd
->
pdcch_Config
->
choice
.
setup
:
NULL
;
pucch_Config
=
(
ubwpd
->
pucch_Config
)
?
ubwpd
->
pucch_Config
->
choice
.
setup
:
NULL
;
pusch_Config
=
(
ubwpd
->
pusch_Config
)
?
ubwpd
->
pusch_Config
->
choice
.
setup
:
NULL
;
srs_config
=
(
ubwpd
->
srs_Config
)
?
ubwpd
->
srs_Config
->
choice
.
setup
:
NULL
;
bwpc
=
initialDownlinkBWP
;
ubwpc
=
initialUplinkBWP
;
bwpd
=
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
ubwpd
=
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
pdsch_Config
=
(
bwpd
&&
bwpd
->
pdsch_Config
)
?
bwpd
->
pdsch_Config
->
choice
.
setup
:
NULL
;
pdcch_Config
=
(
bwpd
&&
bwpd
->
pdcch_Config
)
?
bwpd
->
pdcch_Config
->
choice
.
setup
:
NULL
;
pucch_Config
=
(
ubwpd
&&
ubwpd
->
pucch_Config
)
?
ubwpd
->
pucch_Config
->
choice
.
setup
:
NULL
;
pusch_Config
=
(
ubwpd
&&
ubwpd
->
pusch_Config
)
?
ubwpd
->
pusch_Config
->
choice
.
setup
:
NULL
;
srs_config
=
(
ubwpd
&&
ubwpd
->
srs_Config
)
?
ubwpd
->
srs_Config
->
choice
.
setup
:
NULL
;
}
int
n_ul_bwp
=
1
,
n_dl_bwp
=
1
;
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
0166cd05
...
...
@@ -641,7 +641,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
bwpd
=
(
void
*
)
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
;
}
sched_ctrl
->
search_space
=
get_searchspace
(
scc
,
bwpd
,
target_ss
);
sched_ctrl
->
search_space
=
get_searchspace
(
Mod_idP
,
scc
,
bwpd
,
target_ss
);
sched_ctrl
->
coreset
=
get_coreset
(
Mod_idP
,
scc
,
bwpd
,
sched_ctrl
->
search_space
,
target_ss
);
sched_ctrl
->
maxL
=
2
;
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
0166cd05
...
...
@@ -827,7 +827,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
(
ubwp
,
config_uldci
(
module_idP
,
ubwp
,
ubwpd
,
scc
,
pusch_pdu
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0166cd05
...
...
@@ -73,15 +73,22 @@ 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
(
scc
,
bwp
?
bwp
->
bwp_Dedicated
:
NULL
,
target_ss
);
NR_SearchSpace_t
*
search_space
=
get_searchspace
(
module_id
,
scc
,
bwp
?
bwp
->
bwp_Dedicated
:
NULL
,
target_ss
);
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
module_id
,
scc
,
bwp
?
bwp
->
bwp_Dedicated
:
NULL
,
search_space
,
target_ss
);
// 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 */
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
bwp
?
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
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
;
}
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
];
AssertFatal
(
!
tdaP_DL
->
k0
||
*
tdaP_DL
->
k0
==
0
,
...
...
@@ -541,12 +548,22 @@ bool allocate_dl_retransmission(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_sched_pdsch_t
*
retInfo
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
].
sched_pdsch
;
NR_CellGroupConfig_t
*
cg
=
UE_info
->
CellGroup
[
UE_id
];
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_BWP_t
*
genericParameters
=
sched_ctrl
->
active_bwp
?
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
:
&
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
sched_ctrl
->
active_bwp
)
{
genericParameters
=
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
;
}
else
if
(
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
)
{
genericParameters
=
&
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
genericParameters
=
&
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
const
uint16_t
bwpSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
rbStart
=
0
;
// start wrt BWPstart
...
...
@@ -575,7 +592,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
)
nr_set_pdsch_semi_static
(
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
f
,
ps
);
nr_set_pdsch_semi_static
(
module_id
,
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
f
,
ps
);
}
else
{
/* the retransmission will use a different time domain allocation, check
* that we have enough resources */
...
...
@@ -585,7 +602,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
rbSize
++
;
NR_pdsch_semi_static_t
temp_ps
;
temp_ps
.
nrOfLayers
=
1
;
nr_set_pdsch_semi_static
(
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
f
,
&
temp_ps
);
nr_set_pdsch_semi_static
(
module_id
,
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
f
,
&
temp_ps
);
uint32_t
new_tbs
;
uint16_t
new_rbSize
;
bool
success
=
nr_find_nb_rb
(
retInfo
->
Qm
,
...
...
@@ -731,14 +748,26 @@ void pf_dl(module_id_t module_id,
*
max
=
UE_sched
.
next
[
*
max
];
*
p
=
-
1
;
NR_CellGroupConfig_t
*
cg
=
UE_info
->
CellGroup
[
UE_id
];
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
int
bwp_Id
=
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Id
:
0
;
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
NR_BWP_t
*
genericParameters
=
sched_ctrl
->
active_bwp
?
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
:
&
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
sched_ctrl
->
active_bwp
)
{
genericParameters
=
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
;
}
else
if
(
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
)
{
genericParameters
=
&
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
genericParameters
=
&
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
const
uint16_t
bwpSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
rbStart
=
0
;
// start wrt BWPstart
...
...
@@ -794,7 +823,7 @@ void pf_dl(module_id_t module_id,
sched_ctrl
->
search_space
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
)
?
sched_ctrl
->
search_space
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
:
0
;
if
(
ps
->
time_domain_allocation
!=
tda
)
nr_set_pdsch_semi_static
(
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
f
,
ps
);
nr_set_pdsch_semi_static
(
module_id
,
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
f
,
ps
);
sched_pdsch
->
Qm
=
nr_get_Qm_dl
(
sched_pdsch
->
mcs
,
ps
->
mcsTableIdx
);
sched_pdsch
->
R
=
nr_get_code_rate_dl
(
sched_pdsch
->
mcs
,
ps
->
mcsTableIdx
);
sched_pdsch
->
pucch_allocation
=
alloc
;
...
...
@@ -833,14 +862,18 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
int
UE_id
=
UE_info
->
list
.
head
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
const
uint16_t
BWPStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
:
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
sched_ctrl
->
active_bwp
)
{
genericParameters
=
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
;
}
else
if
(
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
)
{
genericParameters
=
&
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
genericParameters
=
&
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
const
uint16_t
bwpSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
const
uint16_t
BWPStart
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
uint16_t
*
vrb_map
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
vrb_map
;
uint8_t
rballoc_mask
[
bwpSize
];
...
...
@@ -916,7 +949,12 @@ void nr_schedule_ue_spec(module_id_t module_id,
NR_sched_pdsch_t
*
sched_pdsch
=
&
sched_ctrl
->
sched_pdsch
;
UE_info
->
mac_stats
[
UE_id
].
dlsch_current_bytes
=
0
;
NR_CellGroupConfig_t
*
cg
=
UE_info
->
CellGroup
[
UE_id
];
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
/* update TA and set ta_apply every 10 frames.
* Possible improvement: take the periodicity from input file.
...
...
@@ -1000,7 +1038,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
* exist, create it */
// BWP
NR_BWP_t
*
genericParameters
=
bwp
?
&
bwp
->
bwp_Common
->
genericParameters
:
&
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
bwp
)
{
genericParameters
=
&
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
;
}
else
if
(
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
ServingCellConfigCommon
)
{
genericParameters
=
&
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
genericParameters
=
&
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
const
int
bwpid
=
bwp
?
bwp
->
bwp_Id
:
0
;
const
int
coresetid
=
(
bwp
||
bwpd
)
?
sched_ctrl
->
coreset
->
controlResourceSetId
:
gNB_mac
->
sched_ctrlCommon
->
coreset
->
controlResourceSetId
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
0166cd05
...
...
@@ -381,7 +381,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
ps
->
nrOfLayers
=
target_dl_Nl
;
if
(
ps
->
time_domain_allocation
!=
tda
)
nr_set_pdsch_semi_static
(
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
NULL
,
tda
,
f
,
ps
);
module_id
,
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
NULL
,
tda
,
f
,
ps
);
sched_pdsch
->
mcs
=
target_dl_mcs
;
sched_pdsch
->
Qm
=
nr_get_Qm_dl
(
sched_pdsch
->
mcs
,
ps
->
mcsTableIdx
);
...
...
@@ -438,7 +438,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
"time domain assignment %d >= %d
\n
"
,
tda
,
tdaList
->
list
.
count
);
int
K2
=
get_K2
(
scc
,
sched_ctrl
->
active_ubwp
,
tda
,
mu
);
int
K2
=
get_K2
(
scc
,
NULL
,
sched_ctrl
->
active_ubwp
,
tda
,
mu
);
const
int
sched_frame
=
frame
+
(
slot
+
K2
>=
nr_slots_per_frame
[
mu
]);
const
int
sched_slot
=
(
slot
+
K2
)
%
nr_slots_per_frame
[
mu
];
/* check if slot is UL, and that slot is 8 (assuming K2=6 because of UE
...
...
@@ -459,7 +459,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
nr_set_pusch_semi_static
(
scc
,
sched_ctrl
->
active_ubwp
,
NULL
,
dci_format
,
tda
,
num_dmrs_cdm_grps_no_data
,
ps
);
nr_set_pusch_semi_static
(
module_id
,
scc
,
sched_ctrl
->
active_ubwp
,
NULL
,
dci_format
,
tda
,
num_dmrs_cdm_grps_no_data
,
ps
);
uint16_t
rbStart
=
0
;
uint16_t
rbSize
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
0166cd05
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
0166cd05
...
...
@@ -75,11 +75,13 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
NR_CellGroupConfig_t
*
cg
=
UE_info
->
CellGroup
[
UE_id
];
NR_BWP_UplinkDedicated_t
*
ubwpd
;
ubwpd
=
cg
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
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
,
"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
(
pucch_pdu
,
nr_configure_pucch
(
mod_id
,
pucch_pdu
,
scc
,
UE_info
->
CellGroup
[
UE_id
],
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_ubwp
,
...
...
@@ -521,9 +523,16 @@ void nr_csi_meas_reporting(int Mod_idP,
curr_pucch
->
csi_bits
+=
nr_get_csi_bitlen
(
Mod_idP
,
UE_id
,
csi_report_id
);
NR_BWP_t
*
genericParameters
=
sched_ctrl
->
active_ubwp
?
&
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
:
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
sched_ctrl
->
active_ubwp
)
{
genericParameters
=
&
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
;
}
else
if
(
scc
)
{
genericParameters
=
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
genericParameters
=
&
sib1
->
servingCellConfigCommon
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
;
}
int
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
// going through the list of PUCCH resources to find the one indexed by resource_id
...
...
@@ -1411,9 +1420,16 @@ 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
;
}
NR_BWP_t
*
genericParameters
=
sched_ctrl
->
active_ubwp
?
&
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
:
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
NR_BWP_t
*
genericParameters
=
NULL
;
if
(
sched_ctrl
->
active_ubwp
)
{
genericParameters
=
&
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
;
}
else
if
(
scc
)
{
genericParameters
=
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
}
else
{
NR_SIB1_t
*
sib1
=
RC
.
nrmac
[
mod_id
]
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
;
genericParameters
=
&
sib1
->
servingCellConfigCommon
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
;
}
int
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
/* verify that at that slot and symbol, resources are free. We only do this
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
0166cd05
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
0166cd05
...
...
@@ -176,7 +176,8 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
);
void
config_uldci
(
const
NR_BWP_Uplink_t
*
ubwp
,
void
config_uldci
(
module_id_t
module_id
,
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
,
...
...
@@ -233,7 +234,8 @@ int nr_is_dci_opportunity(nfapi_nr_search_space_t search_space,
nfapi_nr_config_request_scf_t cfg);
*/
void
nr_configure_pucch
(
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
void
nr_configure_pucch
(
module_id_t
module_id
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_CellGroupConfig_t
*
CellGroup
,
NR_BWP_Uplink_t
*
bwp
,
...
...
@@ -279,13 +281,19 @@ 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_ServingCellConfigCommon_t
*
scc
,
NR_SearchSpace_t
*
get_searchspace
(
module_id_t
module_id
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_DownlinkDedicated_t
*
bwp_Dedicated
,
NR_SearchSpace__searchSpaceType_PR
target_ss
);
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_ServingCellConfigCommonSIB_t
*
scc_sib1
,
NR_BWP_Uplink_t
*
ubwp
,
int
time_domain_assignment
,
int
mu
);
void
nr_set_pdsch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
void
nr_set_pdsch_semi_static
(
module_id_t
module_id
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_CellGroupConfig_t
*
secondaryCellGroup
,
const
NR_BWP_Downlink_t
*
bwp
,
const
NR_BWP_DownlinkDedicated_t
*
bwpd0
,
...
...
@@ -293,9 +301,10 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
const
long
dci_format
,
NR_pdsch_semi_static_t
*
ps
);
void
nr_set_pusch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
void
nr_set_pusch_semi_static
(
module_id_t
module_id
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_BWP_Uplink_t
*
ubwp
,
const
NR_BWP_UplinkDedicated_t
*
ubwpd
,
const
NR_BWP_UplinkDedicated_t
*
ubwpd
,
long
dci_format
,
int
tda
,
uint8_t
num_dmrs_cdm_grps_no_data
,
...
...
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