Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv TTL Blocking
Commits
b6b4374d
Commit
b6b4374d
authored
Jan 26, 2015
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: Added manual input of ELMA connection date to all test scripts
parent
fb3b71dd
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
138 additions
and
47 deletions
+138
-47
clrchxpcr.py
software/diag/clrchxpcr.py
+14
-4
mantrig.py
software/diag/mantrig.py
+13
-4
rdchxpcr.py
software/diag/rdchxpcr.py
+13
-4
setsr.py
software/diag/setsr.py
+13
-4
therm.py
software/diag/therm.py
+14
-6
getlatestts.py
software/diag/timetag/getlatestts.py
+13
-4
rdtb.py
software/diag/timetag/rdtb.py
+13
-4
tsget.py
software/diag/timetag/tsget.py
+14
-4
tsset.py
software/diag/timetag/tsset.py
+13
-4
README
software/multiboot/README
+4
-3
multiboot.py
software/multiboot/multiboot.py
+14
-6
No files found.
software/diag/clrchxpcr.py
View file @
b6b4374d
...
...
@@ -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
)
...
...
software/diag/mantrig.py
View file @
b6b4374d
...
...
@@ -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
)
...
...
software/diag/rdchxpcr.py
View file @
b6b4374d
...
...
@@ -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
))
...
...
software/diag/setsr.py
View file @
b6b4374d
...
...
@@ -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
%08
x"
%
v
)
...
...
software/diag/therm.py
View file @
b6b4374d
...
...
@@ -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
(
b
oardid
==
0x54424c4f
):
if
(
b
id
==
"TBLO"
):
if
((
gwvers
>=
0x10
)
and
(
gwvers
<=
0x22
)):
baseaddr
=
0x080
...
...
software/diag/timetag/getlatestts.py
View file @
b6b4374d
...
...
@@ -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
):
...
...
software/diag/timetag/rdtb.py
View file @
b6b4374d
...
...
@@ -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
:
...
...
software/diag/timetag/tsget.py
View file @
b6b4374d
...
...
@@ -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
)
...
...
software/diag/timetag/tsset.py
View file @
b6b4374d
...
...
@@ -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
)
...
...
software/multiboot/README
View file @
b6b4374d
...
...
@@ -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
software/multiboot/multiboot.py
View file @
b6b4374d
...
...
@@ -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
(
b
oardid
==
0x54424c4f
):
if
(
b
id
==
"TBLO"
):
if
(
gwvers
==
0xff
):
baseaddr
=
0x300
elif
((
gwvers
>=
0x10
)
and
(
gwvers
<=
0x22
))
or
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment