def connect(self, sn, verbosity): self.connection = "connection" + str( sn) + ".xml" # get connection file self.verbosity = verbosity self.device = amc13.AMC13(self.connection) # connect to amc13 #reset amc13 self.device.AMCInputEnable(0x0) self.reset()
def connect(self, cardname, verbosity): self.connection = os.getenv( "GEM_ADDRESS_TABLE_PATH") + "connections.xml" self.verbosity = verbosity self.device = amc13.AMC13( self.connection, cardname + ".T1", cardname + ".T2" ) # connect to amc13. Should work like this, but has to be tested #reset amc13 self.device.AMCInputEnable(0x0) self.reset()
import os if not inputOptionsValid(options, vfatBoard.parentOH.parentAMC.fwVersion): exit(os.EX_USAGE) # Configure the amc13 print("initializing amc13") import uhal if args.debug: uhal.setLogLevelTo(uhal.LogLevel.INFO) else: uhal.setLogLevelTo(uhal.LogLevel.ERROR) import amc13 connection_file = "%s/connections.xml" % ( os.getenv("GEM_ADDRESS_TABLE_PATH")) amc13base = "gem.shelf%02d.amc13" % (args.shelf) amc13board = amc13.AMC13(connection_file, "%s.T1" % (amc13base), "%s.T2" % (amc13base)) # Stop triggers from amc13 print("stopping triggers from amc13 and reseting counters") amc13board.enableLocalL1A(False) amc13board.resetCounters() print("stopping triggers to CTP7") vfatBoard.parentOH.parentAMC.blockL1A() # Get original optohybrid trigger mask and then overwrite it with the vfat mask origOhTrigMask = vfatBoard.parentOH.getSBitMask() vfatBoard.parentOH.setSBitMask(mask) # Configure local triggers? if args.amc13local: print("configuring the amc13 for local mode")
def __init__(self, t1, t2, **kwargs): self._amc13 = amc13.AMC13(t1, t2) self._cfg = kwargs
#!/bin/env python import uhal import amc13 import sys if __name__ == '__main__': usage = ''' Usage: %s <connection.xml> ''' if len(sys.argv) != 2: print usage % sys.argv[0] sys.exit(-1) uhal.setLogLevelTo(uhal.LogLevel.ERROR) device = amc13.AMC13(sys.argv[1]) print 'T1 firmware version', hex(device.read(device.Board.T1, 'STATUS.FIRMWARE_VERS')) print 'T2 firmware version', hex(device.read(device.Board.T2, 'STATUS.FIRMWARE_VERS'))
# pi = TCDSController( tcdsHost,tcdsPort, 506 ); # iCi = TCDSController( tcdsHost,tcdsPort, 306 ); pi.fedEnableMask_ = '0&0%' # sanitise the connection string conns = args.connections.split(';') for i, c in enumerate(conns): if re.match('^\w+://.*', c) is None: conns[i] = 'file://' + c print conns cm = uhal.ConnectionManager(';'.join(conns)) # Build the AMC13 a13 = amc13.AMC13(cm.getDevice('T1'), cm.getDevice('T2')) logging.notice('AMC13 Version: %s', a13.GetVersion()) # and then the MP7 mp7daq = mp7.MP7Controller(cm.getDevice('XE_SL9')) mp7daq.identify() mp7daq.slot = 9 t = DAQSimpleTester(a13, mp7daq, pi, iCi) if args.cmd == 'testtts': t.testTTS() elif args.cmd == 'stresstts': t.stressTTS() elif args.cmd == 'linkstatus': t.linkStatus()