Commit b6b4374d authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: Added manual input of ELMA connection date to all test scripts

parent fb3b71dd
......@@ -39,10 +39,17 @@ import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -61,6 +68,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Clear channel
testelma.write(slot, 0x0c, 0)
testelma.write(slot, 0x10, 0)
......
......@@ -40,10 +40,16 @@ import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -62,6 +68,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Send magic sequence
testelma.write(slot, 0x8, 0xde << 2)
testelma.write(slot, 0x8, 0xad << 2)
......
......@@ -40,10 +40,16 @@ import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -62,6 +68,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Print channel counter values, close and exit
print("CH1: %d" % testelma.read(slot, 0x0c))
print("CH2: %d" % testelma.read(slot, 0x10))
......
......@@ -45,10 +45,16 @@ import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -67,6 +73,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Get status register value, set and re-print
v = testelma.read(slot, 0x4)
print("SR (pre-set) : 0x%08x" % v)
......
......@@ -221,10 +221,16 @@ if __name__ == "__main__":
FAMILY_CODE = 0x28
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
elma = EI2C(ip, user, pwd)
elma.open()
......@@ -243,11 +249,13 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = elma.get_bid(slot)
# CONV-TTL-BLO gateware changed memory map in v3.0 and golden v0.2
boardid = elma.read(slot,0x00)
gwvers = elma.read(slot, 0x04) & 0xff
baseaddr = 0x200
if (boardid == 0x54424c4f):
if (bid == "TBLO"):
if ((gwvers >= 0x10) and (gwvers <= 0x22)):
baseaddr = 0x080
......
......@@ -39,10 +39,16 @@ import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -61,6 +67,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Get and print latest timestamps
addr = 0x40
for i in range(6):
......
......@@ -38,10 +38,16 @@ import math
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -60,6 +66,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Output to file?
while 1:
try:
......
......@@ -36,10 +36,17 @@ from ei2c import *
import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -58,6 +65,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
tail = testelma.read(slot, 0x24)
taih = testelma.read(slot, 0x28)
......
......@@ -39,10 +39,16 @@ import ei2cdefine
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
testelma = EI2C(ip, user, pwd)
testelma.open()
......@@ -61,6 +67,9 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = testelma.get_bid(slot)
# Set time stamp, close and exit
s = int(raw_input("Number of seconds: "))
testelma.write(slot, 0x24, s & 0xffffffff)
......
......@@ -15,8 +15,9 @@ To run it:
%> ./multiboot.py
Crate IP or hostname: <give IP or hostname of crate with CONV-TTL-BLO>
Username: <give crate username for Telnet login>
Password: <give password for Telnet login>
ELMA crate IP or hostname : <give crate username for Telnet login>
ELMA crate user name : <give user name for Telnet login>
ELMA crate password : <give password for Telnet login>
Slot no.: <give slot number of CONV-TTL-BLO card here>
Read config reg? (y/n) <'y' to read configuration registers>
Read first page? (y/n) <'y' to read the first page from the MultiBoot address
......@@ -41,4 +42,4 @@ The update can only be done one card per crate and one crate at a time.
For details on how to use it, run the help on it:
%> ./mass-multiboot.py --help
\ No newline at end of file
%> ./mass-multiboot.py --help
......@@ -66,10 +66,16 @@ def get_gw_list(path):
# MAIN "FUNCTION"
if __name__ == "__main__":
# Get the IP, user and password for the ELMA crate from ei2cdefine.py
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
# Get the IP, user and password for the ELMA crate from either user input,
# or ei2cdefine.py
if (ei2cdefine.ENABLED):
ip = ei2cdefine.HNAME
user = ei2cdefine.USER
pwd = ei2cdefine.PWD
else:
ip = raw_input("ELMA crate IP or hostname : ")
user = raw_input("ELMA crate user name : ")
pwd = raw_input("ELMA crate password : ")
elma = EI2C(ip, user, pwd)
elma.open()
......@@ -90,13 +96,15 @@ if __name__ == "__main__":
except:
print("Unexpected error: ", sys.exc_info()[0])
# Print which board is detected in the selected slot
bid = elma.get_bid(slot)
# For blocking boads:
# The PULSETEST bitstream has the MultiBoot module starting at address 0x300
# Gateware versions < 3.0, or golden <0.2 have it starting at address 0x040
boardid = elma.read(slot,0x00)
gwvers = elma.read(slot, 0x04) & 0xff
baseaddr = 0x100
if (boardid == 0x54424c4f):
if (bid == "TBLO"):
if (gwvers == 0xff):
baseaddr = 0x300
elif ((gwvers >= 0x10) and (gwvers <= 0x22)) or \
......
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