@@ -189,46 +189,20 @@ void ue_cell::handle_csi_report(const csi_report_data& csi_report)
189189 }
190190}
191191
192- template <typename FilterSearchSpace, typename DciRntiType >
192+ template <typename FilterSearchSpace>
193193static static_vector<const search_space_info*, MAX_NOF_SEARCH_SPACE_PER_BWP>
194- get_prioritized_search_spaces (const ue_cell& ue_cc,
195- FilterSearchSpace filter,
196- bool is_dl,
197- optional<DciRntiType> dci_type)
194+ get_prioritized_search_spaces (const ue_cell& ue_cc, FilterSearchSpace filter, bool is_dl)
198195{
199196 static_vector<const search_space_info*, MAX_NOF_SEARCH_SPACE_PER_BWP> active_search_spaces;
200197
201198 // Get all Search Spaces configured in PDCCH-Config for active BWP.
202- // See TS 38.213, A UE monitors PDCCH candidates in one or more of the following search spaces sets:
203- // - a Type3-PDCCH CSS set configured by SearchSpace in PDCCH-Config with searchSpaceType = common for DCI formats
204- // with CRC scrambled by INT-RNTI, SFI-RNTI, TPC-PUSCH-RNTI, TPC-PUCCH-RNTI, or TPC-SRS-RNTI and, only for the
205- // primary cell, C-RNTI, MCS-C-RNTI, or CS-RNTI(s).
206- // - a USS set configured by SearchSpace in PDCCH-Config with searchSpaceType = ue-Specific for DCI formats
207- // with CRC scrambled by C-RNTI, MCS-C-RNTI, SP-CSI-RNTI, or CS-RNTI(s).
208- const auto & bwp_ss_lst = ue_cc.cfg ().bwp (ue_cc.active_bwp_id ()).dl_ded ->pdcch_cfg ->search_spaces ;
209- for (const search_space_configuration& ss : bwp_ss_lst) {
210- const search_space_info* search_space = &ue_cc.cfg ().search_space (ss.get_id ());
199+ const auto & bwp_ss_lst = ue_cc.cfg ().bwp (ue_cc.active_bwp_id ()).search_spaces ;
200+ for (const search_space_info* search_space : bwp_ss_lst) {
211201 if (filter (*search_space)) {
212202 active_search_spaces.push_back (search_space);
213203 }
214204 }
215205
216- // As per TS 38.213, the UE monitors PDCCH candidates for DCI format 0_0 and DCI format 1_0 with CRC scrambled by the
217- // C-RNTI, the MCS-C-RNTI, or the CS-RNTI in the one or more search space sets in a slot where the UE monitors PDCCH
218- // candidates for at least a DCI format 0_0 or a DCI format 1_0 with CRC scrambled by SI-RNTI, RA-RNTI or P-RNTI.
219- // [Implementation-defined] We exclude SearchSpace#0 to avoid the complexity of computing the SearchSpace#0 PDCCH
220- // candidates monitoring occasions associated with a SS/PBCH block as mentioned in TS 38.213, clause 10.1.
221- if (ue_cc.cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .ra_search_space_id != to_search_space_id (0 )) {
222- active_search_spaces.push_back (&ue_cc.cfg ().search_space (
223- ue_cc.cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .ra_search_space_id ));
224- }
225- if (ue_cc.cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .has_value () and
226- ue_cc.cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .value () !=
227- to_search_space_id (0 )) {
228- active_search_spaces.push_back (&ue_cc.cfg ().search_space (
229- ue_cc.cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .value ()));
230- }
231-
232206 // Sort search spaces by priority.
233207 auto sort_ss = [&ue_cc, is_dl](const search_space_info* lhs, const search_space_info* rhs) {
234208 // NOTE: It does not matter whether we use lhs or rhs SearchSpace to get the aggregation level as we are sorting not
@@ -268,6 +242,40 @@ ue_cell::get_active_dl_search_spaces(slot_point pdcch_slo
268242 }
269243
270244 auto filter_ss = [this , pdcch_slot, required_dci_rnti_type](const search_space_info& ss) {
245+ // See TS 38.213, A UE monitors PDCCH candidates in one or more of the following search spaces sets:
246+ // - a Type3-PDCCH CSS set configured by SearchSpace in PDCCH-Config with searchSpaceType = common for DCI formats
247+ // with CRC scrambled by INT-RNTI, SFI-RNTI, TPC-PUSCH-RNTI, TPC-PUCCH-RNTI, or TPC-SRS-RNTI and, only for the
248+ // primary cell, C-RNTI, MCS-C-RNTI, or CS-RNTI(s).
249+ // - a USS set configured by SearchSpace in PDCCH-Config with searchSpaceType = ue-Specific for DCI formats
250+ // with CRC scrambled by C-RNTI, MCS-C-RNTI, SP-CSI-RNTI, or CS-RNTI(s).
251+ //
252+ // As per TS 38.213, the UE monitors PDCCH candidates for DCI format 0_0 and DCI format 1_0 with CRC scrambled by
253+ // the C-RNTI, the MCS-C-RNTI, or the CS-RNTI in the one or more search space sets in a slot where the UE monitors
254+ // PDCCH candidates for at least a DCI format 0_0 or a DCI format 1_0 with CRC scrambled by SI-RNTI, RA-RNTI or
255+ // P-RNTI.
256+ if (ss.cfg ->is_common_search_space ()) {
257+ const auto & pdcch_config_ss_lst = cfg ().bwp (active_bwp_id ()).dl_ded ->pdcch_cfg ->search_spaces ;
258+ const bool is_type3_css = std::find_if (pdcch_config_ss_lst.begin (),
259+ pdcch_config_ss_lst.end (),
260+ [&ss](const search_space_configuration& ss_cfg) {
261+ return ss.cfg ->get_id () == ss_cfg.get_id ();
262+ }) != pdcch_config_ss_lst.end ();
263+
264+ const bool is_ss_for_ra =
265+ ss.cfg ->get_id () == cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .ra_search_space_id ;
266+ const bool is_ss_for_paging =
267+ not cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .has_value () or
268+ ss.cfg ->get_id () ==
269+ cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .value ();
270+
271+ // [Implementation-defined] We exclude SearchSpace#0 to avoid the complexity of computing the SearchSpace#0 PDCCH
272+ // candidates monitoring occasions associated with a SS/PBCH block as mentioned in TS 38.213, clause 10.1.
273+ if (ss.cfg ->get_id () == to_search_space_id (0 ) or
274+ (not is_ss_for_ra and not is_ss_for_paging and not is_type3_css)) {
275+ return false ;
276+ }
277+ }
278+
271279 if (ss.get_pdcch_candidates (get_aggregation_level (channel_state_manager ().get_wideband_cqi (), ss, true ), pdcch_slot)
272280 .empty ()) {
273281 return false ;
@@ -278,7 +286,7 @@ ue_cell::get_active_dl_search_spaces(slot_point pdcch_slo
278286 }
279287 return true ;
280288 };
281- return get_prioritized_search_spaces (*this , filter_ss, true , required_dci_rnti_type );
289+ return get_prioritized_search_spaces (*this , filter_ss, true );
282290}
283291
284292static_vector<const search_space_info*, MAX_NOF_SEARCH_SPACE_PER_BWP>
@@ -299,6 +307,40 @@ ue_cell::get_active_ul_search_spaces(slot_point pdcch_slo
299307 }
300308
301309 auto filter_ss = [this , pdcch_slot, required_dci_rnti_type](const search_space_info& ss) {
310+ // See TS 38.213, A UE monitors PDCCH candidates in one or more of the following search spaces sets:
311+ // - a Type3-PDCCH CSS set configured by SearchSpace in PDCCH-Config with searchSpaceType = common for DCI formats
312+ // with CRC scrambled by INT-RNTI, SFI-RNTI, TPC-PUSCH-RNTI, TPC-PUCCH-RNTI, or TPC-SRS-RNTI and, only for the
313+ // primary cell, C-RNTI, MCS-C-RNTI, or CS-RNTI(s).
314+ // - a USS set configured by SearchSpace in PDCCH-Config with searchSpaceType = ue-Specific for DCI formats
315+ // with CRC scrambled by C-RNTI, MCS-C-RNTI, SP-CSI-RNTI, or CS-RNTI(s).
316+ //
317+ // As per TS 38.213, the UE monitors PDCCH candidates for DCI format 0_0 and DCI format 1_0 with CRC scrambled by
318+ // the C-RNTI, the MCS-C-RNTI, or the CS-RNTI in the one or more search space sets in a slot where the UE monitors
319+ // PDCCH candidates for at least a DCI format 0_0 or a DCI format 1_0 with CRC scrambled by SI-RNTI, RA-RNTI or
320+ // P-RNTI.
321+ if (ss.cfg ->is_common_search_space ()) {
322+ const auto & pdcch_config_ss_lst = cfg ().bwp (active_bwp_id ()).dl_ded ->pdcch_cfg ->search_spaces ;
323+ const bool is_type3_css = std::find_if (pdcch_config_ss_lst.begin (),
324+ pdcch_config_ss_lst.end (),
325+ [&ss](const search_space_configuration& ss_cfg) {
326+ return ss.cfg ->get_id () == ss_cfg.get_id ();
327+ }) != pdcch_config_ss_lst.end ();
328+
329+ const bool is_ss_for_ra =
330+ ss.cfg ->get_id () == cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .ra_search_space_id ;
331+ const bool is_ss_for_paging =
332+ not cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .has_value () or
333+ ss.cfg ->get_id () ==
334+ cfg ().cell_cfg_common .dl_cfg_common .init_dl_bwp .pdcch_common .paging_search_space_id .value ();
335+
336+ // [Implementation-defined] We exclude SearchSpace#0 to avoid the complexity of computing the SearchSpace#0 PDCCH
337+ // candidates monitoring occasions associated with a SS/PBCH block as mentioned in TS 38.213, clause 10.1.
338+ if (ss.cfg ->get_id () == to_search_space_id (0 ) or
339+ (not is_ss_for_ra and not is_ss_for_paging and not is_type3_css)) {
340+ return false ;
341+ }
342+ }
343+
302344 if (ss.get_pdcch_candidates (get_aggregation_level (channel_state_manager ().get_wideband_cqi (), ss, false ),
303345 pdcch_slot)
304346 .empty ()) {
@@ -309,7 +351,7 @@ ue_cell::get_active_ul_search_spaces(slot_point pdcch_slo
309351 ? dci_ul_rnti_config_type::c_rnti_f0_0
310352 : dci_ul_rnti_config_type::c_rnti_f0_1));
311353 };
312- return get_prioritized_search_spaces (*this , filter_ss, false , required_dci_rnti_type );
354+ return get_prioritized_search_spaces (*this , filter_ss, false );
313355}
314356
315357// / \brief Get recommended aggregation level for PDCCH given reported CQI.
0 commit comments