Exemple #1
0
parser.add_option("--rd", type="int", dest="reset_daq",
                  help="reset daq", metavar="reset_daq", default=-1)
parser.add_option("--l1a_block", action="store_true", dest="l1a_block",
                  help="Inhibit the L1As at the TTC backplane link", metavar="l1a_block")
parser.add_option("--full", action="store_true", dest="full",
                  help="Show extended information", metavar="full")
parser.add_option("--invertTX", type="string", dest="invertTX",default="",
                  help="Flip polarity for SFPs in list", metavar="invertTX")
parser.add_option("--user", action="store_true", dest="userOnly",
                  help="print user information only", metavar="userOnly")
parser.add_option("--ngtx", type="int", dest="ngtx", default=2,
                  help="Number of GTX links supported in the firmware (default is 2)", metavar="ngtx")
parser.add_option("--ttc", type="int", dest="gemttc", default=2,
                  help="choose the TTC encoding (gem/csc=0, amc13=1,default=2 meaning no modification)", metavar="gemttc")

(options, args) = parser.parse_args()

gemlogger = getGEMLogger(__name__)
gemlogger.setLevel(logging.INFO)

uhal.setLogLevelTo( uhal.LogLevel.FATAL )

amc = getAMCObject(options.slot,options.shelf,options.debug)

print
print "--=======================================--"
print "  Opening AMC with ID", amc
print "--=======================================--"
print

# # set all links to un-inverted
from gempython.utils.nesteddict import nesteddict
from gempython.utils.standardopts import parser

parser.add_option("-z", "--sleep", action="store_true", dest="sleepAll",
		  help="set all chips into sleep mode", metavar="sleepAll")
parser.add_option("--bias", action="store_true", dest="biasAll",
		  help="set all chips with default bias parameters", metavar="biasAll")
parser.add_option("--enable", type="string", dest="enabledChips",
		  help="list of chips to enable, comma separated", metavar="enabledChips", default=[])
parser.add_option("--testi2c", type="int", dest="testi2c", default=-1,
		  help="Testing the I2C lines (select I2C line 0-5, or 6 for all", metavar="testi2c")
parser.add_option("--testsingle", action="store_true", dest="testsingle",
		  help="Testing single VFAT transactions (turn on every other VFAT)", metavar="testsingle")

(options, args) = parser.parse_args()

gemlogger = getGEMLogger(__name__)
gemlogger.setLevel(logging.INFO)

uhal.setLogLevelTo( uhal.LogLevel.FATAL )

amc     = getAMCObject(options.slot,options.shelf,options.debug)
ohboard = getOHObject(options.slot,options.gtx,options.shelf,options.debug)
setOHLogLevel(logging.INFO)
setOHLogLevel(logging.INFO)
setAMCLogLevel(logging.INFO)
setVFATLogLevel(logging.INFO)

v3regs = [
    "CFG_PULSE_STRETCH",