2/9号完成fillSib2和fillSib3的coding。
2018-2-12:参照36.211和36.213规范,更新fillNbSib2和fillNbSib3。
举例说明NB-SIB2的mapping:
def fillNbSib2(self, hsfn, sfn):
dn = str(hsfn) + '_' + str(sfn)
if not dn in self.gridNbDl:
self.ngwin.logEdit.append('Call NgNbiotGrid.fillHostCrs at first to initialize NgNbiotGrid.gridNbDl!')
return
#from 36.331 5.2.1.2a
#The SI messages are transmitted within periodically occurring time domain windows (referred to as SI-windows) using scheduling information provided in SystemInformationBlockType1-NB. Each SI message is associated with a SI-window and the SI-windows of different SI messages do not overlap. That is, within one SI-window only the corresponding SI is transmitted. The length of the SI-window is common for all SI messages, and is configurable.
#
#Within the SI-window, the corresponding SI message can be transmitted a number of times over 2 or 8 consecutive NB-IoT downlink subframes depending on TBS. The UE acquires the detailed time/frequency domain scheduling information and other information, e.g. used transport format for the SI messages from schedulingInfoList field in SystemInformationBlockType1-NB. The UE is not required to accumulate several SI messages in parallel but may need to accumulate a SI message across multiple SI windows, depending on coverage condition.
#
#SI starting frame: (hsfn*1024+sfn) mod si_period = (n-1)*si_winLen/10 + si_offset
n = 1 #ascending order in NB-SIB1 schedulingInfoList
if (hsfn*1024+sfn)%self.args['nbSib2Period'] == (n-1)*self.args['nbSiWinLen']//10+self.args['nbSiRfOff']:
self.resetSib2Mapping(hsfn, sfn)
key = str(hsfn)+'_'+str(sfn)
if not key in self.sib2Map:
return
slots = []
for subf in self.sib2Map[key]:
slots.extend([2*subf, 2*subf+1])
for iap in range(self.args['nbDlAp']):
for islot in slots:
#2018-2-12 update
#from 36.211 10.2.3.4
#the index l in the first slot in a subframe fulfills l >= l_Data_Start where l_Data_Start is given by clause 16.4.1.4 of 3GPP TS 36.213 [4].
#from 36.213 16.4.1.4
#- if subframe k is a subframe used for receiving SIB1-NB
# - l_Data_Start = 3 the value of the higher layer parameter operationModeInfo is set to ’00’ or ‘01’
# - l_Data_Start = 0 otherwise
#- else
# - l_Data_Start is given by the higher layer parameter eutraControlRegionSize if the value of the higher layer parameter eutraControlRegionSize is present
# - l_Data_Start = 0 otherwise
for isymb in range(self.args['hostLteCfi'] if islot % 2 == 0 else 0, self.symbPerSlotNb):
#for isymb in range(self.symbPerSlotNb):
for isc in range(self.scNbDl):
if self.gridNbDl[dn][iap][isc][islot*self.symbPerSlotNb+isymb] == NbiotResType.NBIOT_RES_BLANK.value:
self.gridNbDl[dn][iap][isc][islot*self.symbPerSlotNb+isymb] = NbiotResType.NBIOT_RES_SIB2.value其中resetSib2Mapping用于构造SIB2 mapping字典
#data structure for SIB2/SIB3 mapping
self.sib2Map = OrderedDict() #key='hsfn_sfn', value=[list of subframes]
self.sib3Map = OrderedDict() #key='hsfn_sfn', value=[list of subframes]resetSib2Mapping中会用到validateDlSubf,用于校验当前子帧是否为DL subframe:
def validateDlSubf(self, sfn, subf):
#from 36.213 16.4
#A NB-IoT UE shall assume a subframe as a NB-IoT DL subframe if
#- the UE determines that the subframe does not contain NPSS/NSSS/NPBCH/NB-SIB1 transmission, and
#- the subframe is configured as NB-IoT DL subframe after the UE has obtained SystemInformationBlockType1-NB.
valid = True
if subf == 5: #NPSS
valid = False
if sfn % 2 == 0 and subf == 9: #NSSS
valid = False
if subf == 0: #NPBCH
valid = False
if sfn in self.sib1MapRf and subf == 4: #NB-SIB1
valid = False
if self.args['nbDlBitmap'][(sfn*self.subfPerRfNbDl+subf)%len(self.args['nbDlBitmap'])] == 0: #DL bitmap
valid = False
return valid

本文详细介绍了NB-IoT系统中SIB2消息的映射实现过程,包括根据3GPP规范定义的填充函数fillNbSib2的具体实现逻辑。文章深入探讨了SIB2消息在SI窗口内的传输机制,并通过具体代码示例展示了如何在指定的子帧内安排SIB2的传输。
6365

被折叠的 条评论
为什么被折叠?



