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
9d14c910
Commit
9d14c910
authored
Feb 17, 2017
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software: modified scripts to use SLOT parameter from ei2cdefine
parent
ffa923c7
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
45 additions
and
243 deletions
+45
-243
clrchxpcr.py
software/diag/clrchxpcr.py
+3
-15
clrerr.py
software/diag/clrerr.py
+3
-15
getsr.py
software/diag/getsr.py
+3
-15
mantrig.py
software/diag/mantrig.py
+3
-15
rdchxpcr.py
software/diag/rdchxpcr.py
+3
-0
seterr.py
software/diag/seterr.py
+3
-15
therm.py
software/diag/therm.py
+3
-15
getlatestts.py
software/diag/timetag/getlatestts.py
+3
-15
rdtb.py
software/diag/timetag/rdtb.py
+3
-15
tsget.py
software/diag/timetag/tsget.py
+3
-15
tsset.py
software/diag/timetag/tsset.py
+3
-15
multiboot.py
software/multiboot/multiboot.py
+3
-17
clrchcnt.py
software/pulsetest/clrchcnt.py
+1
-15
pulsetest.py
software/pulsetest/pulsetest.py
+2
-15
rdchcnt.py
software/pulsetest/rdchcnt.py
+1
-15
regtest.py
software/regtest/regtest.py
+3
-16
regupdate.py
software/regupdate/regupdate.py
+2
-15
No files found.
software/diag/clrchxpcr.py
View file @
9d14c910
...
...
@@ -29,6 +29,7 @@
#===============================================================================
# last changes:
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -50,28 +51,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/clrerr.py
View file @
9d14c910
...
...
@@ -36,6 +36,7 @@
# 2014-05-02 Theodor Stana File created
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware,
# renamed from setsr.py to seterr.py
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -57,28 +58,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/getsr.py
View file @
9d14c910
...
...
@@ -31,6 +31,7 @@
# 2014-05-02 Theodor Stana Changed to print the bits of the SR
# in turn.
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -49,28 +50,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/mantrig.py
View file @
9d14c910
...
...
@@ -29,6 +29,7 @@
#===============================================================================
# last changes:
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -50,28 +51,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/rdchxpcr.py
View file @
9d14c910
...
...
@@ -29,6 +29,7 @@
#===============================================================================
# last changes:
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -50,10 +51,12 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
...
...
software/diag/seterr.py
View file @
9d14c910
...
...
@@ -36,6 +36,7 @@
# 2014-05-02 Theodor Stana File created
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware,
# renamed from setsr.py to seterr.py
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -57,28 +58,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/therm.py
View file @
9d14c910
...
...
@@ -31,6 +31,7 @@
# last changes:
# 2017-02-02 M. Suminski Updated to work with gateware v4
# (read regs storing UID & temperature)
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -56,28 +57,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/timetag/getlatestts.py
View file @
9d14c910
...
...
@@ -30,6 +30,7 @@
# last changes:
# 2014-08-18 Theodor Stana File created
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -48,28 +49,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/timetag/rdtb.py
View file @
9d14c910
...
...
@@ -29,6 +29,7 @@
#===============================================================================
# last changes:
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -48,28 +49,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/timetag/tsget.py
View file @
9d14c910
...
...
@@ -28,6 +28,7 @@
#===============================================================================
# last changes:
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -47,28 +48,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/diag/timetag/tsset.py
View file @
9d14c910
...
...
@@ -29,6 +29,7 @@
#===============================================================================
# last changes:
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -49,28 +50,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
testelma
.
get_bid
(
slot
)
...
...
software/multiboot/multiboot.py
View file @
9d14c910
...
...
@@ -42,6 +42,7 @@
#===============================================================================
# last changes:
# 2013-08-13 Theodor Stana File created
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -72,30 +73,15 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
else
:
ip
=
raw_input
(
"ELMA crate IP or hostname : "
)
user
=
raw_input
(
"ELMA crate user name : "
)
pwd
=
raw_input
(
"ELMA crate password : "
)
slot
=
int
(
raw_input
(
"ELMA crate slot number : "
))
elma
=
EI2C
(
ip
,
user
,
pwd
)
elma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
ValueError
as
e
:
print
(
"
%
s is not a valid integer."
%
e
.
args
[
0
]
.
split
(
": "
)[
1
])
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Print which board is detected in the selected slot
bid
=
elma
.
get_bid
(
slot
)
...
...
software/pulsetest/clrchcnt.py
View file @
9d14c910
...
...
@@ -12,24 +12,10 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Get board ID and gateware version, fail if incorrect
bloid
=
testelma
.
read
(
slot
,
0x00
)
fwvers
=
testelma
.
read
(
slot
,
0x04
)
&
0xFF
...
...
software/pulsetest/pulsetest.py
View file @
9d14c910
...
...
@@ -29,6 +29,7 @@
# last changes:
# 2014-07-02 Theodor Stana Setting the frequency to 0 Hz does not
# enable the channel
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -85,24 +86,10 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Get board ID and gateware version, fail if incorrect
bloid
=
testelma
.
read
(
slot
,
0x00
)
fwvers
=
testelma
.
read
(
slot
,
0x04
)
&
0xFF
...
...
software/pulsetest/rdchcnt.py
View file @
9d14c910
...
...
@@ -12,24 +12,10 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Get board ID and gateware version, fail if incorrect
bloid
=
testelma
.
read
(
slot
,
0x00
)
fwvers
=
testelma
.
read
(
slot
,
0x04
)
&
0xFF
...
...
software/regtest/regtest.py
View file @
9d14c910
...
...
@@ -37,6 +37,7 @@
# last changes:
# 2013-08-13 Theodor Stana File created
# 2014-03-06 Theodor Stana Added description above
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: -
#===============================================================================
...
...
@@ -58,24 +59,10 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
testelma
=
EI2C
(
ip
,
user
,
pwd
)
testelma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Ask how long to run the test
print
"How long would you like to run the test?"
while
1
:
...
...
@@ -130,7 +117,7 @@ if __name__ == "__main__":
f
.
write
(
"Nr. slots:
%
d
\n
"
%
nrslots
)
f
.
write
(
"Runtime:
%
d hrs,
%
d mins,
%
d s
\n
"
%
(
hrs
,
mins
,
secs
))
f
.
write
(
"------------------------------------------------------------
\r\n
"
)
f
.
write
(
"
%
s: starting test
\r\n
"
%
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
Hh
%
Mm
%
Ss"
,
time
.
localtime
()))
f
.
write
(
"
%
s: starting test
\r\n
"
%
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
Hh
%
Mm
%
Ss"
,
time
.
localtime
()))
print
"
%
s: starting test"
%
time
.
strftime
(
"
%
Y-
%
m-
%
d-
%
Hh
%
Mm
%
Ss"
,
time
.
localtime
())
f
.
write
(
"------------------------------------------------------------
\r\n
"
)
...
...
software/regupdate/regupdate.py
View file @
9d14c910
...
...
@@ -31,6 +31,7 @@
# last changes:
# 2014-08-25 Theodor Stana File created
# 2017-02-02 M. Suminski Updated mem map to match v4 gateware
# 2017-02-17 M. Suminski Use SLOT configuration from ei2cdefine
#===============================================================================
# TODO: - It was not tested with gateware v4, there are now separate counters
# for TTL and blocking pulses. Blocking pulse counters are not handled.
...
...
@@ -50,24 +51,10 @@ if __name__ == "__main__":
ip
=
ei2cdefine
.
HNAME
user
=
ei2cdefine
.
USER
pwd
=
ei2cdefine
.
PWD
slot
=
ei2cdefine
.
SLOT
elma
=
EI2C
(
ip
,
user
,
pwd
)
elma
.
open
()
# Ask for slot number
while
1
:
try
:
slot
=
raw_input
(
"Slot no.: "
)
slot
=
int
(
slot
)
break
except
TypeError
as
e
:
print
(
"Please input a decimal slot number."
)
except
SlotError
as
e
:
print
(
e
.
strerror
)
except
KeyboardInterrupt
:
sys
.
exit
();
except
:
print
(
"Unexpected error: "
,
sys
.
exc_info
()[
0
])
# Ask how long to run the test
print
(
""
)
print
(
"How long would you like to run the test?"
)
...
...
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