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