Commit c13e5363 authored by David Cussans's avatar David Cussans

test_aida_tlu_thresholds.py - minor tinkering

test_aida_tlu_trig_counter.py - changed to reflect new address map
parent a8cb830a
...@@ -23,17 +23,21 @@ boardId = boardi2c.get_serial_number() ...@@ -23,17 +23,21 @@ boardId = boardi2c.get_serial_number()
print "FMC-TLU serial number = " , boardId print "FMC-TLU serial number = " , boardId
#dacValue = 0x4100 #dacValue = 0x4100
dacValue = 0xFFFF #dacValue = 0xFFFF
print "Setting Vthreshold for all DACs. Code = ", dacValue #dacValue = 0x0000
boardi2c.set_dac(7,dacValue) #dacValue = 0x7FFF
#print "Setting Vthreshold for all DACs. Code = ", dacValue
#boardi2c.set_dac(7,dacValue)
time.sleep(2.0) #time.sleep(2.0)
dacValue = 0x6000 #dacValue = 0x6000
print "Setting Vthreshold for DAC 0. Code = ", dacValue #print "Setting Vthreshold for DAC 0. Code = ", dacValue
boardi2c.set_dac(0,dacValue) #boardi2c.set_dac(0,dacValue)
time.sleep(2.0) #time.sleep(2.0)
# set DACs to -5mV # set DACs to -100mV
boardi2c.set_threshold_voltage(7, -0.005) Vthresh = -0.10
print "Setting Vthreshold for all DACs. Voltage = " , Vthresh
boardi2c.set_threshold_voltage(7, Vthresh)
...@@ -25,11 +25,11 @@ boardId = boardi2c.get_serial_number() ...@@ -25,11 +25,11 @@ boardId = boardi2c.get_serial_number()
print "FMC-TLU serial number = " , boardId print "FMC-TLU serial number = " , boardId
resetClocks = 0 resetClocks = 0
resetSerdes = 1 resetSerdes = 0
# set DACs to -200mV # set DACs to -200mV
print "Setting all threshold DAC to -200mV " print "Setting all threshold DAC to -50mV "
boardi2c.set_threshold_voltage(7, -0.200) boardi2c.set_threshold_voltage(7, -0.050)
clockStatus = board.read("LogicClocksCSR") clockStatus = board.read("LogicClocksCSR")
print "Clock status = " , hex(clockStatus) print "Clock status = " , hex(clockStatus)
...@@ -47,7 +47,7 @@ if resetClocks: ...@@ -47,7 +47,7 @@ if resetClocks:
#print "Clock status = " , hex(clockStatus) #print "Clock status = " , hex(clockStatus)
inputStatus = board.read("SerdesRst") inputStatus = board.read("SerdesRstR")
print "Input status = " , hex(inputStatus) print "Input status = " , hex(inputStatus)
if resetSerdes: if resetSerdes:
...@@ -69,25 +69,38 @@ if resetSerdes: ...@@ -69,25 +69,38 @@ if resetSerdes:
# Look at status of input IODELAYs # Look at status of input IODELAYs
numLoops = 5 numLoops = 100
oldCount = [0,0,0,0]
sleepTime = 1.0
for iLoop in range(0,numLoops): for iLoop in range(0,numLoops):
inputStatus = board.read("SerdesRst") inputStatus = board.read("SerdesRstR")
print "Input status = " , hex(inputStatus) print "Input status = " , hex(inputStatus)
count0 = board.read("ThrCount0R") count0 = board.read("ThrCount0R")
print " Count 0 = " , count0 rate0 = (count0 - oldCount[0])/sleepTime
oldCount[0] = count0
print " Count , rate 0 = " , count0 , rate0
count1 = board.read("ThrCount1R") count1 = board.read("ThrCount1R")
print " Count 1 = " , count1 rate1 = (count1 - oldCount[1])/sleepTime
oldCount[1] = count1
print " Count , rate 1 = " , count1 , rate1
count2 = board.read("ThrCount2R") count2 = board.read("ThrCount2R")
print " Count 2 = " , count2 rate2 = (count2 - oldCount[2])/sleepTime
oldCount[2] = count2
print " Count , rate 2 = " , count2 ,rate2
count3 = board.read("ThrCount3R") count3 = board.read("ThrCount3R")
print " Count 3 = " , count3 rate3 = (count3 - oldCount[3])/sleepTime
oldCount[3] = count3
print " Count ,rate 3 = " , count3 ,rate3
print "\n\n"
time.sleep(1.0) time.sleep(sleepTime)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment