UserDir = '2020.07.30-Autolevel' freqArry = [28e9] pwrArry = range(-50,10,2) #Power Array comment = '-Autolevel' ############################################################################### ### Overhead ############################################################################### from rssd.VSG.NR5G_K144 import VSG from rssd.VSA.NR5G_K144 import VSA from rssd.FileIO import FileIO from rssd.RSI.time import timer OFile = FileIO().makeFile(__file__) TMR = timer() SMW = VSG().jav_Open(SMW_IP,OFile) #Create SMW Object SMW.debug = 0 FSW = VSA().jav_Open(FSW_IP,OFile) #Create FSW Object FSW.debug = 0 class dataClass(): def __init__(self): # self.Direction = 'UL' # self.CellID = 1 # # self.FreqRng = 'HIGH' # self.ChBW = 100 # self.TF = 'ON' # self.SubSp = 120 # self.RB = 60 # self.RBO = 0 # self.Ch_RB = 60
class vari: def __init__(self): self.NR_ChBW = 0 self.NR_SubSp = 0 self.NR_RB = 0 self.NR_Mod = '' self.NR_TF = "off" NR5G = vari() ######################################################################## ### Code Start ######################################################################## CMP = RCT() SMW = VSG() CMP.jav_Open(CMP_IP, OFile) SMW.jav_Open(SMW_IP, OFile) CMP.query('*IDN?') CMP.write('ROUT:NRMM:MEAS:SCEN:SAL RF1C,RX1') CMP.Set_5GNR_Freq(28000) CMP.Set_5GNR_ExpPwr(0) CMP.Set_5GNR_UserMargin(11.5) CMP.Set_5GNR_ExtAttn(0) CMP.Set_5GNR_MixerOff(0) CMP.Set_5GNR_BWP_SubSpace(120) CMP.Set_5GNR_ChannelBW(100) CMP.Set_5GNR_PhaseComp('OFF', 2.8e10) CMP.Set_5GNR_Periodicity(1) CMP.write('CONF:NRMM:MEAS:ULDL:PATT S120K,0,0,8,0')
### Title : SCPI Commands Example ### Author : mclim ### Date : 2018.10.26 ### ############################################################################### ### User Entry ############################################################################### SMW_IP = '192.168.1.114' ############################################################################### ### Code Overhead: Import and create objects ############################################################################### from rssd.VSG.NR5G_K144 import VSG #pylint: disable=E0611,E0401 from rssd.FileIO import FileIO #pylint: disable=E0611,E0401 SMW = VSG().jav_Open(SMW_IP) #Create SMW Object ############################################################################### ### Code Start ############################################################################### SMW.Set_5GNR_Direction('DOWN') cat = SMW.Get_5GNR_TM_Cat() print(len(cat)) SMW.Set_5GNR_BBState('OFF') for file in cat: print(file) SMW.Set_5GNR_TM(file) SMW.Set_5GNR_savesetting(f'TM/{file}') ###############################################################################
############################################################################### ### Code Overhead: Import and create objects ############################################################################### from rssd.VSG.NR5G_K144 import VSG SMW = VSG().jav_Open('10.0.0.10') #Create SMW Object ############################################################################### ### User Entry ############################################################################### SlotDir = 'DDDSU' #Frame Pattern Entities = [1, 2, 3, 4] RVPatt = [0, 2, 3, 1] SlotNum = 8 #Num of Slots per Subframe SubFNum = 10 #Num of SubFrame per Frame currSlot = 0 RVIi = 0 FrameInfo = [] numAlloc = [0] * SubFNum #Num Alloc per SubFrame for SubF in range(SubFNum): # Loop through all slots in Frame individually numAlloc[SubF] = 0 # Start Each Frame w/ 0 allocations FrameInfo.append([]) # Blank Slot Definition for Slot in range(SlotNum): UDdir = currSlot % len( SlotDir) # Retrieve Uplink/Downlink Direction from UDdir if 'U' in SlotDir[UDdir]: # If this slot is U numAlloc[SubF] += 1 # - Add Allocation RVI = RVPatt[RVIi % len(RVPatt)] # - Identify next RVI in RVPatt FrameInfo[SubF].append([ SubF, Slot, RVI
# 60kHz NaN 11 18 24 31 38 51 65 79 107 121 135 ########################################################## ### User Entry ########################################################## SMW_IP = '192.168.1.114' cat_FR1 = {'FR1A11','FR1A12','FR1A13','FR1A14','FR1A15','FR1A16','FR1A17','FR1A18','FR1A19','FR1A21','FR1A22','FR1A23','FR1A24','FR1A25','FR1A26','FR1A31','FR1A310','FR1A311','FR1A312','FR1A313','FR1A314','FR1A315','FR1A316','FR1A317','FR1A318','FR1A319','FR1A32','FR1A320','FR1A321','FR1A322','FR1A323','FR1A324','FR1A325','FR1A326','FR1A327','FR1A328','FR1A329','FR1A33','FR1A330','FR1A331','FR1A332','FR1A34','FR1A35','FR1A36','FR1A37','FR1A38','FR1A39','FR1A41','FR1A410','FR1A411','FR1A412','FR1A413','FR1A414','FR1A415','FR1A416','FR1A417','FR1A418','FR1A419','FR1A42','FR1A420','FR1A421','FR1A422','FR1A423','FR1A424','FR1A425','FR1A426','FR1A427','FR1A428','FR1A43','FR1A44','FR1A45','FR1A46','FR1A47','FR1A48','FR1A49','FR1A51','FR1A510','FR1A511','FR1A512','FR1A513','FR1A514','FR1A52','FR1A53','FR1A54','FR1A55','FR1A56','FR1A57','FR1A58','FR1A59'} cat_FR2_120 = {'FR2A12','FR2A13','FR2A15','FR2A310','FR2A312','FR2A33','FR2A34','FR2A35','FR2A38','FR2A39','FR2A410','FR2A43','FR2A44','FR2A45','FR2A48','FR2A49','FR2A53','FR2A54','FR2A55'} cat_FR2_60 = {'FR2A11','FR2A14','FR2A31','FR2A311','FR2A32','FR2A36','FR2A37','FR2A41','FR2A42','FR2A46','FR2A47','FR2A51','FR2A52'} # cat = cat_FR2 ########################################################## ### Code Overhead: Import and create objects ########################################################## from rssd.VSG.NR5G_K144 import VSG from rssd.FileIO import FileIO SMW = VSG().jav_Open(SMW_IP) #Create SMW Object ########################################################## ### Code Start ########################################################## SMW.Set_5GNR_Direction('UP') SMW.write(f'SOUR1:BB:NR5G:UBWP:USER0:USCH:CCOD:STAT 1') SMW.Set_5GNR_FRC_State('ON') SMW.Set_5GNR_BBState('OFF') SMW.Set_5GNR_FreqRange(2) SMW.Set_5GNR_ChannelBW(400) SMW.Set_5GNR_BWP_SubSpace(120) SMW.Set_5GNR_BWP_ResBlock(264) for file in cat_FR2_120: SMW.write(f'SOUR1:BB:NR5G:UBWP:USER0:CELL0:UL:BWP0:FRC:TYPE {file}')
### Date : 2018.10.26 ### ############################################################################### ### User Entry ############################################################################### FSW_IP = '192.168.1.109' ############################################################################### ### Code Overhead: Import and create objects ############################################################################### from rssd.VSA.NR5G_K144 import VSA #pylint: disable=E0611,E0401 from rssd.VSG.NR5G_K144 import VSG #pylint: disable=E0611,E0401 # from rssd.FileIO import FileIO #pylint: disable=E0611,E0401 FSW = VSA().jav_Open(FSW_IP) #Create FSW Object SMW = VSG().jav_Open('192.168.1.114') #Create SMW Object ############################################################################### ### Code Start ############################################################################### FSW.Set_5GNR_Direction('DL') cat = SMW.Get_5GNR_TM_Cat() print(len(cat)) FSW.Set_SweepCont(0) for file in cat: print(file) FSW.Set_5GNR_TM(file) FSW.Set_5GNR_savesetting(file) # FSW.query(f'MMEM:STOR:DEM:CC1 "TM\{file}.allocation";*OPC?')
def jav_OpenTest(self,SMW_IP,FSW_IP): self.SMW = VSG().jav_OpenTest(SMW_IP) #Create SMW Object self.FSW = VSA().jav_OpenTest(FSW_IP) #Create FSW Object return self
Freq = 39e9 Pwr = -10 NumCC = 1 NR_Dir = 'UP' CCSpace = 99.96e6 CCStart = (1 - NumCC) * (CCSpace / 2) ############################################################################### ### Code Overhead: Import and create objects ############################################################################### import timeit from rssd.VSG.NR5G_K144 import VSG #pylint: disable=E0611,E0401 from rssd.VSA.NR5G_K144 import VSA #pylint: disable=E0611,E0401 # from rssd.FileIO import FileIO #pylint: disable=E0611,E0401 if VSG_ON: SMW = VSG().jav_Open(SMW_IP) #Create SMW Object FSW = VSA().jav_Open(FSW_IP) #Create FSW Object ############################################################################### ### Code Start ############################################################################### if VSG_ON: SMW.Get_SysC_All() SMW.Set_Freq(Freq) # SMW Freq --> BB Center SMW.Set_5GNR_BBState('OFF') SMW.Set_5GNR_Direction(NR_Dir) SMW.Set_5GNR_CC_Num(NumCC) SMW.Set_5GNR_PhaseCompensate('OFF') SMW.Set_RFPwr(Pwr) SMW.Set_RFState(1)
class VST(object): """ Rohde & Schwarz Vector Signal Transciever 5GNR Object """ def __init__(self): self.Freq = 19e9 self.SWM_Out = 0 self.NR_Dir = 'UL' self.NR_Deploy = 'HIGH' #LOW|MIDD|HIGH self.NR_PhaseC = 'OFF' #ON|OFF self.NR_ChBW = 100 #MHz self.NR_SubSp = 120 #kHz self.NR_RB = 66 #RB self.NR_RBO = 0 #RB Offset self.NR_Mod = 'QAM64' #QPSK; QAM16; QAM64; QAM256; PITB self.NR_CC = 1 self.NR_TF = 'OFF' def Get_5GNR_All(self): #pylint: disable=R0915 DMRS = 1 PTRS = 1 self.SMW.cc = self.NR_CC - 1 self.FSW.cc = self.NR_CC odata = [[] for i in range(3)] odata[0].append("[[Parameter]] ") odata[0].append("Center Freq ") odata[0].append("Direction ") odata[0].append("FreqRange ") odata[0].append("RefA,MHz ") odata[0].append("Ch BW ") odata[0].append("TransPrecoding ") odata[0].append("Phase Compensat") odata[0].append("====SS/PBCH====") odata[0].append("SubSpacing ") odata[0].append("===User/BWP====") odata[0].append("SubSpacing ") odata[0].append("Num BWP ") odata[0].append("BWP_RB ") odata[0].append("BWP_RBoff ") odata[0].append("====Channel====") odata[0].append("User_BWP_Mod ") odata[0].append("User_BWP_RB ") odata[0].append("User_BWP_RBOff ") odata[0].append("User_BWP_SymNum") odata[0].append("User_BWP_SymOff") odata[0].append("User_BWP_Cntr ") if DMRS: odata[0].append("=====DMRS======") odata[0].append("DMRS Mapping ") odata[0].append("DMRS FirstSym ") odata[0].append("DMRS Config ") odata[0].append("DMRS Add Positn") odata[0].append("DMRS Length ") odata[0].append("DMRS SeqGenMeth") odata[0].append("DMRS SeqGenSeed") odata[0].append("DMRS Rel Power ") if PTRS: odata[0].append("=====PTRS======") odata[0].append("PTRS State ") odata[0].append("Time L_PTRS ") odata[0].append("Freq K_PTRS ") odata[0].append("PTRS Rel Power ") odata[0].append("UL-PTRS-RE-offs") try: # self.SMW.Set_5GNR_Parameters(self.NR_Dir) odata[1].append("[-SMW-]") odata[1].append(self.SMW.Get_5GNR_CC_Freq()) odata[1].append(self.SMW.Get_5GNR_Direction()) odata[1].append(self.SMW.Get_5GNR_FreqRange()) odata[1].append(self.SMW.Get_5GNR_RefA()/1e6) odata[1].append(self.SMW.Get_5GNR_ChannelBW()) odata[1].append(self.SMW.Get_5GNR_TransPrecoding()) odata[1].append(self.SMW.Get_5GNR_PhaseCompensate()) odata[1].append("=SSB==") odata[1].append(self.SMW.Get_5GNR_SSB_SubSpace()) odata[1].append("=User="******"==Ch==") odata[1].append(self.SMW.Get_5GNR_BWP_Ch_Modulation()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_ResBlock()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_ResBlockOffset()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_SymbNum()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_SymbOff()) odata[1].append(self.SMW.Get_5GNR_BWP_Center()/1e6) if DMRS: odata[1].append("=DMRS=") odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_Mapping()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_1stDMRSSym()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_Config()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_AddPosition()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_MSymbLen()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_SeqGenMeth()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_SeqGenSeed()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_DMRS_RelPwr()) if PTRS: odata[1].append("=PTRS=") odata[1].append(self.SMW.Get_5GNR_BWP_Ch_PTRS_State()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_PTRS_L()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_PTRS_K()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_PTRS_Pow()) odata[1].append(self.SMW.Get_5GNR_BWP_Ch_PTRS_RE_Offset()) except: pass try: self.FSW.Init_5GNR() odata[2].append("[-FSW-]") odata[2].append(self.FSW.Get_5GNR_CC_Freq()) odata[2].append(self.FSW.Get_5GNR_Direction()) odata[2].append(self.FSW.Get_5GNR_FreqRange()) odata[2].append(self.FSW.Get_5GNR_RefA()/1e6) odata[2].append(self.FSW.Get_5GNR_ChannelBW()) odata[2].append(self.FSW.Get_5GNR_TransPrecoding()) odata[2].append(self.FSW.Get_5GNR_PhaseCompensate()) odata[2].append("=SSB==") odata[2].append(self.FSW.Get_5GNR_SSB_SubSpace()) odata[2].append("=User="******"==Ch==") odata[2].append(self.FSW.Get_5GNR_BWP_Ch_Modulation()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_ResBlock()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_ResBlockOffset()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_SymbNum()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_SymbOff()) odata[2].append(self.FSW.Get_5GNR_BWP_Center()/1e6) if DMRS: odata[2].append("=DMRS=") odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_Mapping()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_1stDMRSSym()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_Config()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_AddPosition()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_MSymbLen()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_SeqGenMeth()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_SeqGenSeed()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_DMRS_RelPwr()) if PTRS: odata[2].append("=PTRS=") odata[2].append(self.FSW.Get_5GNR_BWP_Ch_PTRS_State()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_PTRS_L()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_PTRS_K()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_PTRS_Pow()) odata[2].append(self.FSW.Get_5GNR_BWP_Ch_PTRS_RE_Offset()) except: pass print('SMW/FSW Values: %d %d'%(len(odata[2]),len(odata[2]))) return odata def Get_5GNR_All_print(self): data = self.Get_5GNR_All() for i in range(len(data[0])): try: print(f"{data[0][i]}\t{data[1][i]}\t{data[2][i]}") except: # try: # print("%s\t%s\t%s"%(data[0][i],data[1][i],'<notRead>')) # except: # print("%s\t%s\t%s"%(data[0][i],'<notRead>',data[2][i])) pass def jav_Open(self,SMW_IP,FSW_IP,OFile=''): self.SMW = VSG().jav_Open(SMW_IP,OFile) #Create SMW Object self.FSW = VSA().jav_Open(FSW_IP,OFile) #Create FSW Object return self def jav_OpenTest(self,SMW_IP,FSW_IP): self.SMW = VSG().jav_OpenTest(SMW_IP) #Create SMW Object self.FSW = VSA().jav_OpenTest(FSW_IP) #Create FSW Object return self def jav_Close(self): self.SMW.jav_Close() self.FSW.jav_Close() def jav_Clear(self): self.SMW.jav_Clear() self.FSW.jav_Clear() def Set_5GNR_All(self): try: ### SMW Settings self.SMW.cc = self.NR_CC - 1 self.SMW.Set_Freq(self.Freq) self.SMW.Set_5GNR_BBState('OFF') self.SMW.Set_5GNR_Direction(self.NR_Dir) self.SMW.Set_5GNR_TransPrecoding(self.NR_TF) self.SMW.Set_5GNR_PhaseCompensate(self.NR_PhaseC) self.SMW.Set_5GNR_FreqRange(self.NR_Deploy) self.SMW.Set_5GNR_ChannelBW(self.NR_ChBW) self.SMW.Set_5GNR_BWP_SubSpace(self.NR_SubSp) self.SMW.Set_5GNR_BWP_ResBlock(self.NR_RB) self.SMW.Set_5GNR_BWP_ResBlockOffset(self.NR_RBO) self.SMW.Set_5GNR_BWP_Ch_ResBlock(self.NR_RB) self.SMW.Set_5GNR_BWP_Corset_ResBlock(self.NR_RB) #self.SMW.Set_5GNR_BWP_Ch_ResBlockOffset(NR_RBO) self.SMW.Set_5GNR_BWP_Ch_Modulation(self.NR_Mod) self.SMW.Set_5GNR_SSB() self.SMW.Set_5GNR_BBState('ON') self.SMW.Set_RFState('ON') #Turn RF Output on self.SMW.Set_RFPwr(self.SWM_Out) #Output Power except: print("NR5G_SetSettings: SMW Error") try: ### FSW Setting # self.cc = self.NR_CC self.FSW.Init_5GNR() self.FSW.Set_Freq(self.Freq) self.FSW.Set_5GNR_Direction(self.NR_Dir) self.FSW.Set_5GNR_TransPrecoding(self.NR_TF) self.FSW.Set_5GNR_PhaseCompensate(self.NR_PhaseC) self.FSW.Set_5GNR_FreqRange(self.NR_Deploy) self.FSW.Set_5GNR_ChannelBW(self.NR_ChBW) self.FSW.Set_5GNR_BWP_SubSpace(self.NR_SubSp) self.FSW.Set_5GNR_BWP_ResBlock(self.NR_RB) self.FSW.Set_5GNR_BWP_ResBlockOffset(self.NR_RBO) self.FSW.Set_5GNR_BWP_Ch_ResBlock(self.NR_RB) self.FSW.Set_5GNR_BWP_Corset_ResBlock(self.NR_RB) #self.FSW.Set_5GNR_BWP_Ch_ResBlockOffset(self.NR_RBO) self.FSW.Set_5GNR_BWP_Ch_Modulation(self.NR_Mod) self.FSW.Set_SweepCont(1) self.FSW.Set_InitImm() except: print("NR5G_SetSettings: FSW Error") return 0
def jav_Open(self,SMW_IP,FSW_IP,OFile=''): self.SMW = VSG().jav_Open(SMW_IP,OFile) #Create SMW Object self.FSW = VSA().jav_Open(FSW_IP,OFile) #Create FSW Object return self
############################################################################### ### Rohde & Schwarz Automation for demonstration use. ### Date : mclim.2020.05.12 ############################################################################### SMW_IP = '192.168.1.114' UserDir = '2020.05.12-CMPEval' ############################################################################### from rssd.VSG.NR5G_K144 import VSG # from rssd.FileIO import FileIO SMW = VSG().jav_Open(SMW_IP) #Create SMW Object ############################################################################### ### Code Start ############################################################################### SMW.Set_OS_Dir(UserDir) fileList = SMW.Get_OS_DirList() for file in fileList: filename = file[0] if filename.find('.savrcltxt') > 0: SMW.Set_Setting(f'{UserDir}/{filename}') # SMW.Set_Setting(f'{filename}') SMW.Set_5GNR_GenerateWv(filename)
############################################################################### ### Rohde & Schwarz Automation for demonstration use. #pylint: disable=E0611,E0401 ############################################################################### SMW_IP = '192.168.58.114' freqArry = [28e9] ############################################################################### ### Overhead ############################################################################### from rssd.VSG.NR5G_K144 import VSG SMW = VSG().jav_Open(SMW_IP) #Create SMW Object SMW.debug = 0 ############################################################################### ### Code Start ############################################################################### SMW.Set_Freq(3.5e9) SMW.Set_5GNR_BBState('OFF') SMW.Set_5GNR_Direction('UL') # SMW.Set_5GNR_BWP_CellID(1024) SMW.write(':SOUR1:BB:NR5G:UBWP:USER0:UEID 1024') SMW.Set_5GNR_FreqRange('LOW') SMW.Set_5GNR_ChannelBW(100) SMW.Set_5GNR_BWP_Users(50) for ch in range(0, 44): ## Frame Configuration SMW.write( f':SOUR1:BB:NR5G:SCH:CELL0:SUBF0:USER{ch}:BWP0:NALL 1') # Add User
def setUp(self): #run before each test self.SMW = VSG().jav_OpenTest(host)
class TestGeneral(unittest.TestCase): def setUp(self): #run before each test self.SMW = VSG().jav_OpenTest(host) def tearDown(self): #Run after each test self.assertEqual(self.SMW.jav_Error()[0], '0') self.SMW.jav_Close() ############################################################################### ### <Test> ############################################################################### def test_SMW_5GNR_BWP_Sub(self): self.SMW.Get_5GNR_BWP_SubSpaceTotal() def test_SMW_5GNR_Direction(self): self.SMW.Set_5GNR_Direction('UL') getVal = self.SMW.Get_5GNR_Direction() if self.SMW.connected: self.assertEqual(getVal, 'UL') self.SMW.Set_5GNR_Direction('DL') getVal = self.SMW.Get_5GNR_Direction() if self.SMW.connected: self.assertEqual(getVal, 'DL') def test_SMW_5GNR_FreqRange(self): self.SMW.Set_5GNR_FreqRange('LOW') getVal = self.SMW.Get_5GNR_FreqRange() if self.SMW.connected: self.assertEqual(getVal, 'LOW') self.SMW.Set_5GNR_FreqRange('MIDD') getVal = self.SMW.Get_5GNR_FreqRange() if self.SMW.connected: self.assertEqual(getVal, 'MIDD') self.SMW.Set_5GNR_FreqRange('HIGH') getVal = self.SMW.Get_5GNR_FreqRange() if self.SMW.connected: self.assertEqual(getVal, 'HIGH') def test_SMW_5GNR_Get_DL(self): self.SMW.Set_5GNR_Direction('DL') self.SMW.Set_5GNR_BBState(0) nullVal = self.SMW.Get_5GNR_CC_Freq() nullVal = self.SMW.Get_5GNR_Direction() nullVal = self.SMW.Get_5GNR_FreqRange() nullVal = self.SMW.Get_5GNR_RefA() nullVal = self.SMW.Get_5GNR_ChannelBW() nullVal = self.SMW.Get_5GNR_TransPrecoding() nullVal = self.SMW.Get_5GNR_PhaseCompensate() nullVal = self.SMW.Get_5GNR_SSB_SubSpace() nullVal = self.SMW.Get_5GNR_BWP_SubSpace() nullVal = self.SMW.Get_5GNR_BWP_Count() nullVal = self.SMW.Get_5GNR_BWP_ResBlock() nullVal = self.SMW.Get_5GNR_BWP_ResBlockOffset() nullVal = self.SMW.Get_5GNR_BWP_Ch_Modulation() nullVal = self.SMW.Get_5GNR_BWP_Ch_ResBlock() nullVal = self.SMW.Get_5GNR_BWP_Ch_ResBlockOffset() nullVal = self.SMW.Get_5GNR_BWP_Ch_SymbNum() nullVal = self.SMW.Get_5GNR_BWP_Ch_SymbOff() nullVal = self.SMW.Get_5GNR_BWP_Center() ### "=DMRS=" nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_Config() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_Mapping() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_1stDMRSSym() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_AddPosition() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_MSymbLen() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_SeqGenMeth() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_SeqGenSeed() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_RelPwr() ### "=PTRS=") nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_State() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_L() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_K() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_Pow() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_RE_Offset() def test_SMW_5GNR_Get_RBMax(self): nullVal = self.SMW.Get_5GNR_RBMax() def test_SMW_5GNR_Get_TMCat(self): nullVal = self.SMW.Get_5GNR_TM_Cat() def test_SMW_5GNR_Get_UL(self): self.SMW.Set_5GNR_Direction('UL') self.SMW.Set_5GNR_BBState(0) nullVal = self.SMW.Get_5GNR_CC_Freq() nullVal = self.SMW.Get_5GNR_Direction() nullVal = self.SMW.Get_5GNR_FreqRange() nullVal = self.SMW.Get_5GNR_RefA() nullVal = self.SMW.Get_5GNR_ChannelBW() nullVal = self.SMW.Get_5GNR_TransPrecoding() nullVal = self.SMW.Get_5GNR_PhaseCompensate() nullVal = self.SMW.Get_5GNR_SSB_SubSpace() ### "=User="******"==Ch==" nullVal = self.SMW.Get_5GNR_BWP_Ch_Modulation() nullVal = self.SMW.Get_5GNR_BWP_Ch_ResBlock() nullVal = self.SMW.Get_5GNR_BWP_Ch_ResBlockOffset() nullVal = self.SMW.Get_5GNR_BWP_Ch_SymbNum() nullVal = self.SMW.Get_5GNR_BWP_Ch_SymbOff() nullVal = self.SMW.Get_5GNR_BWP_Center() ### "=DMRS=" nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_Config() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_Mapping() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_1stDMRSSym() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_AddPosition() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_MSymbLen() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_SeqGenMeth() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_SeqGenSeed() nullVal = self.SMW.Get_5GNR_BWP_Ch_DMRS_RelPwr() ### "=PTRS=") nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_State() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_L() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_K() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_Pow() nullVal = self.SMW.Get_5GNR_BWP_Ch_PTRS_RE_Offset() self.assertEqual(self.SMW.jav_Error()[0], '0') def test_SMW_5GNR_Set_CC(self): self.SMW.Set_5GNR_CC_Num(2) self.SMW.Set_5GNR_CC_Offset(100e6) self.assertEqual(self.SMW.jav_Error()[0], '0') def test_SMW_5GNR_Set_DL(self): self.SMW.Set_5GNR_BBState('OFF') # Baseband OFF self.SMW.Set_5GNR_Direction('DL') self.SMW.Set_5GNR_CC_Num(1) self.SMW.Set_5GNR_TransPrecoding('OFF') self.SMW.Set_5GNR_PhaseCompensate('ON') self.SMW.Set_5GNR_PhaseCompensate_Freq(1e6) self.SMW.Set_5GNR_FreqRange('HIGH') self.SMW.Set_5GNR_ChannelBW(100) self.SMW.Set_5GNR_BWP_SubSpace(120) self.SMW.Set_5GNR_BWP_ResBlock(66) self.SMW.Set_5GNR_BWP_ResBlockOffset(0) self.SMW.Set_5GNR_BWP_Ch_ResBlock(66) self.SMW.Set_5GNR_BWP_Corset_ResBlock(66) self.SMW.Set_5GNR_BWP_Ch_ResBlockOffset(0) self.SMW.Set_5GNR_BWP_Ch_Modulation('QPSK') self.SMW.Set_5GNR_SSB() # self.SMW.Set_5GNR_BBState('ON') self.assertEqual(self.SMW.jav_Error()[0], '0') def test_SMW_5GNR_Set_SubSpace(self): self.SMW.Set_5GNR_FreqRange('LOW') self.SMW.Set_5GNR_ChannelBW(20) self.SMW.Set_5GNR_BWP_SubSpace(15) self.SMW.Set_5GNR_ChannelBW(100) self.SMW.Set_5GNR_FreqRange('MIDD') self.SMW.Set_5GNR_BWP_SubSpace(30) self.SMW.Set_5GNR_FreqRange('HIGH') self.SMW.Set_5GNR_BWP_SubSpace(60) self.SMW.Set_5GNR_BWP_SubSpace(120) def test_SMW_5GNR_Set_FRC_State(self): self.SMW.Set_5GNR_FRC_State('ON') self.SMW.Set_5GNR_FRC_State('OFF') def test_SMW_5GNR_Set_UL(self): self.SMW.Set_5GNR_BBState('OFF') # Baseband OFF self.SMW.Set_5GNR_Direction('UL') self.SMW.Set_5GNR_CC_Num(1) self.SMW.Set_5GNR_TransPrecoding('OFF') self.SMW.Set_5GNR_PhaseCompensate('OFF') self.SMW.Set_5GNR_FreqRange('HIGH') self.SMW.Set_5GNR_ChannelBW(100) self.SMW.Set_5GNR_BWP_SubSpace(120) self.SMW.Set_5GNR_BWP_ResBlock(66) self.SMW.Set_5GNR_BWP_ResBlockOffset(0) self.SMW.Set_5GNR_BWP_Ch_ResBlock(66) self.SMW.Set_5GNR_BWP_Corset_ResBlock(66) #self.SMW.Set_5GNR_BWP_Ch_ResBlockOffset(NR_RBO) self.SMW.Set_5GNR_BWP_Ch_Modulation('QPSK') self.SMW.Set_5GNR_SSB()
'FR2A35', 'FR2A38', 'FR2A39', 'FR2A410', 'FR2A43', 'FR2A44', 'FR2A45', 'FR2A48', 'FR2A49', 'FR2A53', 'FR2A54', 'FR2A55' } cat_FR2_60 = { 'FR2A11', 'FR2A14', 'FR2A31', 'FR2A311', 'FR2A32', 'FR2A36', 'FR2A37', 'FR2A41', 'FR2A42', 'FR2A46', 'FR2A47', 'FR2A51', 'FR2A52' } # cat = cat_FR2 mode_arry = [[1, 50, 15, 60, cat_FR1a_15], [1, 100, 30, 273, cat_FR1b_30], [1, 100, 60, 135, cat_FR1b_60], [2, 200, 60, 264, cat_FR2_60], [2, 400, 120, 264, cat_FR2_120]] ########################################################## ### Code Overhead: Import and create objects ########################################################## from rssd.VSG.NR5G_K144 import VSG SMW = VSG().jav_Open(SMW_IP) #Create SMW Object ########################################################## ### Code Start ########################################################## SMW.Set_5GNR_Direction('UP') SMW.write('SOUR1:BB:NR5G:UBWP:USER0:USCH:CCOD:STAT 1') SMW.Set_5GNR_FRC_State('ON') SMW.Set_5GNR_BBState('OFF') for mode in mode_arry: SMW.Set_5GNR_FreqRange(mode[0]) SMW.Set_5GNR_ChannelBW(mode[1]) SMW.Set_5GNR_BWP_SubSpace(mode[2]) SMW.Set_5GNR_BWP_ResBlock([mode[3]]) for file in mode[4]: