Merge remote-tracking branch 'origin/searchspace0_with_2_occasion_per_slot' into integration_2025_w33 (!3567)

Workaround for handling 2 SS0 occasions per slot

Search Space 0 monitoring might depend on SSB. In !3332 this dependence
was removed by moving the configuration of SS0 earlier in a workaround
to avoid a segfault in handover. Now, a new workaround is needed to
handle 2 search space occasions per slot.
This commit is contained in:
Robert Schmidt
2025-08-12 09:41:50 +02:00
2 changed files with 19 additions and 23 deletions
@@ -147,7 +147,7 @@ static bool nr_pbch_detection(const UE_nr_rxtx_proc_t *proc,
1, 1,
1); 1);
} }
LOG_I(PHY, "Initial sync: pbch decoded sucessfully, ssb index %d\n", *ssb_index); LOG_A(PHY, "Initial sync: pbch decoded sucessfully, ssb index %d\n", *ssb_index);
return true; return true;
} }
} }
@@ -429,32 +429,28 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
NR_ControlResourceSet_t *coreset, NR_ControlResourceSet_t *coreset,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
NR_BWP_t *bwp, NR_BWP_t *bwp,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) { NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config)
{
int sps;
NR_sched_pdcch_t pdcch;
AssertFatal(*ss->controlResourceSetId == coreset->controlResourceSetId, AssertFatal(*ss->controlResourceSetId == coreset->controlResourceSetId,
"coreset id in SS %ld does not correspond to the one in coreset %ld", "coreset id in SS %ld does not correspond to the one in coreset %ld",
*ss->controlResourceSetId, coreset->controlResourceSetId); *ss->controlResourceSetId, coreset->controlResourceSetId);
int sps;
NR_sched_pdcch_t pdcch;
if (bwp) { // This is not for SIB1 if (bwp) { // This is not for SIB1
if(coreset->controlResourceSetId == 0){ if(coreset->controlResourceSetId == 0) {
pdcch.BWPSize = gNB_mac->cset0_bwp_size; pdcch.BWPSize = gNB_mac->cset0_bwp_size;
pdcch.BWPStart = gNB_mac->cset0_bwp_start; pdcch.BWPStart = gNB_mac->cset0_bwp_start;
} } else {
else { pdcch.BWPSize = NRRIV2BW(bwp->locationAndBandwidth, MAX_BWP_SIZE);
pdcch.BWPSize = NRRIV2BW(bwp->locationAndBandwidth, MAX_BWP_SIZE);
pdcch.BWPStart = NRRIV2PRBOFFSET(bwp->locationAndBandwidth, MAX_BWP_SIZE); pdcch.BWPStart = NRRIV2PRBOFFSET(bwp->locationAndBandwidth, MAX_BWP_SIZE);
} }
pdcch.SubcarrierSpacing = bwp->subcarrierSpacing; pdcch.SubcarrierSpacing = bwp->subcarrierSpacing;
pdcch.CyclicPrefix = (bwp->cyclicPrefix==NULL) ? 0 : *bwp->cyclicPrefix; pdcch.CyclicPrefix = (bwp->cyclicPrefix == NULL) ? 0 : *bwp->cyclicPrefix;
//AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored"); //AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored");
sps = bwp->cyclicPrefix == NULL ? 14 : 12; sps = bwp->cyclicPrefix == NULL ? 14 : 12;
} } else {
else { AssertFatal(type0_PDCCH_CSS_config != NULL, "type0_PDCCH_CSS_config is null,bwp %p\n", bwp);
AssertFatal(type0_PDCCH_CSS_config!=NULL,"type0_PDCCH_CSS_config is null,bwp %p\n",bwp);
pdcch.BWPSize = type0_PDCCH_CSS_config->num_rbs; pdcch.BWPSize = type0_PDCCH_CSS_config->num_rbs;
pdcch.BWPStart = type0_PDCCH_CSS_config->cset_start_rb; pdcch.BWPStart = type0_PDCCH_CSS_config->cset_start_rb;
pdcch.SubcarrierSpacing = type0_PDCCH_CSS_config->scs_pdcch; pdcch.SubcarrierSpacing = type0_PDCCH_CSS_config->scs_pdcch;
@@ -462,16 +458,16 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
sps = 14; sps = 14;
} }
AssertFatal(ss->monitoringSymbolsWithinSlot!=NULL,"ss->monitoringSymbolsWithinSlot is null\n"); AssertFatal(ss->monitoringSymbolsWithinSlot != NULL, "ss->monitoringSymbolsWithinSlot is null\n");
AssertFatal(ss->monitoringSymbolsWithinSlot->buf!=NULL,"ss->monitoringSymbolsWithinSlot->buf is null\n"); BIT_STRING_t *symbolsInSlot = ss->monitoringSymbolsWithinSlot;
AssertFatal(symbolsInSlot->buf != NULL, "ss->monitoringSymbolsWithinSlot->buf is null\n");
// for SPS=14 8 MSBs in positions 13 downto 6 // for SPS=14 8 MSBs in positions 13 downto 6
uint16_t monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | int monitoringSymbolsWithinSlot = (symbolsInSlot->buf[0] << (sps - 8)) | (symbolsInSlot->buf[1] >> (16 - sps));
(ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps));
for (int i=0; i<sps; i++) { for (int i = 0; i < sps; i++) {
if ((monitoringSymbolsWithinSlot>>(sps-1-i))&1) { if ((monitoringSymbolsWithinSlot >> (sps - 1 - i)) & 1) {
pdcch.StartSymbolIndex=i; pdcch.StartSymbolIndex = ss->searchSpaceId == 0 ? i + type0_PDCCH_CSS_config->first_symbol_index : i;
break; break;
} }
} }