Procedures to determine Type-0 CSS(CORESET0) time/freq-domain position:
there are 3 multiplexing patterns for css0/coreset0:
*multiplexing pattern 1, which uses TDM only
*multiplexing pattern 2, which uses TDM/FDM
*multiplexing pattern 3, which uses FDM only
For pattern 1:
Note1: O2 means O*2, and M2 means M*2
Note2: SFN_C, n_C are all based on mibCommonScs.
O2, numSetsPerSlot, M2, firstSymbSet = css0OccasionsPat1Fr1[self.nrRmsiCss0] if self.args['freqBand']['freqRange'] == 'FR1' else css0OccasionsPat1Fr2[self.nrRmsiCss0]
issb = i % self.nrSsbMaxL
#determine pdcch monitoring occasion (sfnc + nc) for ssb with index issb
val = (O2 * 2 ** self.nrScs2Mu[self.nrMibCommonScs]) // 2 + math.floor(issb * M2 / 2)
valSfnc = math.floor(val / self.nrSlotPerRf[self.nrScs2Mu[self.nrMibCommonScs]])
if (valSfnc % 2 == 0 and sfn % 2 == 0) or (valSfnc % 2 == 1 and sfn % 2 == 1):
sfnc = sfn
else:
hsfn, sfn = self.incSfn(hsfn, sfn, 1)
self.recvSsb(hsfn, sfn)
sfnc = sfn
n0 = val % self.nrSlotPerRf[self.nrScs2Mu[self.nrMibCommonScs]]
nc = [n0, n0+1]
#determine first symbol of coreset0
if len(firstSymbSet) == 2:
firstSymbCoreset0 = firstSymbSet[0] if issb % 2 == 0 else firstSymbSet[1]
else:
firstSymbCoreset0 = firstSymbSet[0]
self.coreset0Occasions.append([hsfn, sfnc, nc, firstSymbCoreset0, ['OK', 'OK']])
For Pattern 2:
Note1: SFN_SSB, n_SSB and SFN_C, n_C are all based on mibCommonScs.
issb = i % self.nrSsbMaxL
#determine sfnSsb and nSsb which are based on commonScs
sfnSsb = sfn
scaleTd = self.baseScsTd // self.nrMibCommonScs
nSsb = math.floor(self.ssbFirstSymbInBaseScsTd[dn][i] / (self.nrSymbPerSlotNormCp * scaleTd))
#Table 13-13: PDCCH monitoring occasions for Type0-PDCCH CSS set - SS/PBCH block and CORESET multiplexing pattern 2 and {SS/PBCH block, PDCCH} SCS {120, 60} kHz
#Table 13-14: PDCCH monitoring occasions for Type0-PDCCH CSS set - SS/PBCH block and CORESET multiplexing pattern 2 and {SS/PBCH block, PDCCH} SCS {240, 120} kHz
if self.nrSsbScs == 120 and self.nrMibCommonScs == 60:
sfnc = sfnSsb
nc = [nSsb,]
firstSymbCoreset0 = (0, 1, 6, 7)[issb % 4]
elif self.nrSsbScs == 240 and self.nrMibCommonScs == 120:
issbMod8Set1 = (0, 1, 2, 3, 6, 7)
issbMod8Set2 = (4, 5)
if issb % 8 in issbMod8Set2:
sfnc = sfnSsb
nc = [nSsb - 1,]
firstSymbCoreset0 = (12, 13)[issbMod8Set2.index(issb % 8)]
else:
sfnc = sfnSsb
nc = [nSsb,]
firstSymbCoreset0 = (0, 1, 2, 3, 0, 1)[issbMod8Set1.index(issb % 8)]
self.coreset0Occasions.append([hsfn, sfnc, nc, firstSymbCoreset0, ['OK']])
For pattern 3:
Note1: SFN_SSB, n_SSB and SFN_C, n_C are all based on mibCommonScs.
issb = i % self.nrSsbMaxL
#determine sfnSsb and nSsb which are based on commonScs
sfnSsb = sfn
scaleTd = self.baseScsTd // self.nrMibCommonScs
nSsb = math.floor(self.ssbFirstSymbInBaseScsTd[dn][i] / (self.nrSymbPerSlotNormCp * scaleTd))
#Table 13-15: PDCCH monitoring occasions for Type0-PDCCH CSS set - SS/PBCH block and CORESET multiplexing pattern 3 and {SS/PBCH block, PDCCH} SCS {120, 120} kHz
if self.nrSsbScs == 120 and self.nrMibCommonScs == 120:
sfnc = sfnSsb
nc = [nSsb,]
firstSymbCoreset0 = (4, 8, 2, 6)[issb % 4]
self.coreset0Occasions.append([hsfn, sfnc, nc, firstSymbCoreset0, ['OK']])
According to 38.213, PDCCH occasions for Type-0 CSS and SSB shall not be overlapped:
*time-domain: first symbols of CSS0 shall not within the set of symbols for transmitted SSB if only TDM is used
*freq-domain:
Example of 'multiplexing pattern 1':
Note 1: PDCCH occasion, for examples, [0, 0, [0, 1], 0, ['OK', 'OK']], field definitions are:
*fake HSFN (there is no hsfn in NR, used only for convenience, always start from 0)
*SFN_C
*n_C: list with length 1 or 2
*first symbol in each slot:
*status of each slot: 'NOK' means invalid configurations
Configurations:
contents of ["freqBand"]: {'opBand': 'n77', 'duplexMode': 'TDD', 'maxDlFre