Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
FMC ADC 100M 14b 4cha - Testing
Commits
0a180751
Commit
0a180751
authored
Jun 04, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move exception raise after end of test and time print.
parent
b8c38bb0
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
54 additions
and
30 deletions
+54
-30
test02.py
test/fmcadc100m14b4cha/python/test02.py
+8
-4
test03.py
test/fmcadc100m14b4cha/python/test03.py
+4
-1
test04.py
test/fmcadc100m14b4cha/python/test04.py
+8
-1
test05.py
test/fmcadc100m14b4cha/python/test05.py
+4
-2
test06.py
test/fmcadc100m14b4cha/python/test06.py
+4
-1
test07.py
test/fmcadc100m14b4cha/python/test07.py
+4
-4
test08.py
test/fmcadc100m14b4cha/python/test08.py
+5
-4
test09.py
test/fmcadc100m14b4cha/python/test09.py
+4
-4
test19.py
test/fmcadc100m14b4cha/python/test19.py
+4
-4
test20.py
test/fmcadc100m14b4cha/python/test20.py
+4
-4
test23.py
test/fmcadc100m14b4cha/python/test23.py
+5
-1
No files found.
test/fmcadc100m14b4cha/python/test02.py
View file @
0a180751
...
@@ -87,13 +87,14 @@ def main (default_directory='.'):
...
@@ -87,13 +87,14 @@ def main (default_directory='.'):
periph_addr
=
fmc
.
sys_i2c_scan
()
periph_addr
=
fmc
.
sys_i2c_scan
()
print
""
print
""
error
=
""
# Check that the EEPROM is detected on the I2C bus
# Check that the EEPROM is detected on the I2C bus
if
(
0
==
len
(
periph_addr
)):
if
(
0
==
len
(
periph_addr
)):
raise
PtsError
(
"No peripheral detected on system management I2C bus"
)
error
=
"No peripheral detected on system management I2C bus"
if
(
1
!=
len
(
periph_addr
)):
if
(
1
!=
len
(
periph_addr
)):
raise
PtsError
(
"Signal integrity problem detected on system management I2C bus,
%
d devices detected instead of 1"
%
len
(
periph_addr
)
)
error
=
"Signal integrity problem detected on system management I2C bus,
%
d devices detected instead of 1"
%
len
(
periph_addr
)
if
(
EEPROM_ADDR
!=
periph_addr
[
0
]):
if
(
EEPROM_ADDR
!=
periph_addr
[
0
]):
raise
PtsError
(
"Wrong device mounted on system management I2C bus or soldering issues, address is:0x
%.2
X expected:0x
%.2
X"
%
(
periph_addr
[
0
],
EEPROM_ADDR
)
)
error
=
"Wrong device mounted on system management I2C bus or soldering issues, address is:0x
%.2
X expected:0x
%.2
X"
%
(
periph_addr
[
0
],
EEPROM_ADDR
)
# Write, read back and compare two different patterns
# Write, read back and compare two different patterns
try
:
try
:
...
@@ -104,7 +105,7 @@ def main (default_directory='.'):
...
@@ -104,7 +105,7 @@ def main (default_directory='.'):
raise
PtsError
(
"EEPROM write/read/compare test failed:
%
s"
%
e
)
raise
PtsError
(
"EEPROM write/read/compare test failed:
%
s"
%
e
)
if
(
mismatch
!=
0
):
if
(
mismatch
!=
0
):
raise
PtsError
(
"EEPROM data comparison mismatch!"
)
error
=
"EEPROM data comparison mismatch!"
else
:
else
:
print
(
'Data comparison OK.'
)
print
(
'Data comparison OK.'
)
...
@@ -115,6 +116,9 @@ def main (default_directory='.'):
...
@@ -115,6 +116,9 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
if
(
error
!=
""
):
raise
PtsError
(
error
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test03.py
View file @
0a180751
...
@@ -118,7 +118,6 @@ def main (default_directory='.'):
...
@@ -118,7 +118,6 @@ def main (default_directory='.'):
print
(
"One or both LEDs not switching ON. Check for soldering or connection problem, grounded control line."
)
print
(
"One or both LEDs not switching ON. Check for soldering or connection problem, grounded control line."
)
if
(
error
[
1
]
!=
0
):
if
(
error
[
1
]
!=
0
):
print
(
"One or both LEDs not switching OFF. Check for short-cut."
)
print
(
"One or both LEDs not switching OFF. Check for short-cut."
)
raise
PtsError
(
'An error occured during LEDs test, check log for details.'
)
else
:
else
:
print
(
'LEDs are working ok.'
)
print
(
'LEDs are working ok.'
)
...
@@ -131,6 +130,10 @@ def main (default_directory='.'):
...
@@ -131,6 +130,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during LED test
if
(
error
!=
[
0
]
*
2
):
raise
PtsError
(
'An error occured during LEDs test, check log for details.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test04.py
View file @
0a180751
...
@@ -97,6 +97,7 @@ def main (default_directory='.'):
...
@@ -97,6 +97,7 @@ def main (default_directory='.'):
print
"FOUT_MAX :
%3.3
f"
%
f_out_max
print
"FOUT_MAX :
%3.3
f"
%
f_out_max
# Check that output frequency is within the limits
# Check that output frequency is within the limits
error
=
0
f_out_limit_min
=
SI570_FOUT
-
SI570_FOUT_TOL
f_out_limit_min
=
SI570_FOUT
-
SI570_FOUT_TOL
f_out_limit_max
=
SI570_FOUT
+
SI570_FOUT_TOL
f_out_limit_max
=
SI570_FOUT
+
SI570_FOUT_TOL
print
"FOUT_LIMIT_MIN :
%3.3
f"
%
f_out_limit_min
print
"FOUT_LIMIT_MIN :
%3.3
f"
%
f_out_limit_min
...
@@ -107,7 +108,9 @@ def main (default_directory='.'):
...
@@ -107,7 +108,9 @@ def main (default_directory='.'):
print
"Si570 frequency output is within tolerance"
print
"Si570 frequency output is within tolerance"
else
:
else
:
print
"FAILED"
print
"FAILED"
raise
PtsError
(
'Si570 frequency output is outside of the tolerance'
)
error
+=
1
except
FmcAdc100mOperationError
as
e
:
except
FmcAdc100mOperationError
as
e
:
raise
PtsError
(
"Test failed:
%
s"
%
e
)
raise
PtsError
(
"Test failed:
%
s"
%
e
)
...
@@ -118,6 +121,10 @@ def main (default_directory='.'):
...
@@ -118,6 +121,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Raise an exception if Si570 frequency is outside the tolerance
if
(
error
!=
0
):
raise
PtsError
(
'Si570 frequency output is outside of the tolerance.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test05.py
View file @
0a180751
...
@@ -91,8 +91,6 @@ def main (default_directory='.'):
...
@@ -91,8 +91,6 @@ def main (default_directory='.'):
if
((
TEST_PATTERN
<<
2
)
!=
adc_value
):
if
((
TEST_PATTERN
<<
2
)
!=
adc_value
):
print
(
'Error: value mismatch!'
)
print
(
'Error: value mismatch!'
)
error
+=
1
error
+=
1
if
(
error
!=
0
):
raise
PtsError
(
'Data read from LTC2174 ADC are wrong for one or more channels.'
)
except
FmcAdc100mOperationError
as
e
:
except
FmcAdc100mOperationError
as
e
:
raise
PtsError
(
"Test failed:
%
s"
%
e
)
raise
PtsError
(
"Test failed:
%
s"
%
e
)
...
@@ -104,6 +102,10 @@ def main (default_directory='.'):
...
@@ -104,6 +102,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during LTC2174 ADC test
if
(
error
!=
0
):
raise
PtsError
(
'Data read from LTC2174 ADC are wrong for one or more channels.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test06.py
View file @
0a180751
...
@@ -114,7 +114,6 @@ def main (default_directory='.'):
...
@@ -114,7 +114,6 @@ def main (default_directory='.'):
# Check if the trigger has been received
# Check if the trigger has been received
if
(
'WAIT_TRIG'
==
fmc
.
get_acq_fsm_state
()):
if
(
'WAIT_TRIG'
==
fmc
.
get_acq_fsm_state
()):
print
"Acquisition FSM state :
%
s"
%
fmc
.
get_acq_fsm_state
()
print
"Acquisition FSM state :
%
s"
%
fmc
.
get_acq_fsm_state
()
raise
PtsError
(
'External trigger input is not working.'
)
else
:
else
:
print
"The external trigger input is working fine."
print
"The external trigger input is working fine."
...
@@ -128,6 +127,10 @@ def main (default_directory='.'):
...
@@ -128,6 +127,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Raise excepetion if the trigger hasn't been received
if
(
'WAIT_TRIG'
==
fmc
.
get_acq_fsm_state
()):
raise
PtsError
(
'External trigger input is not working.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test07.py
View file @
0a180751
...
@@ -211,10 +211,6 @@ def main (default_directory='.'):
...
@@ -211,10 +211,6 @@ def main (default_directory='.'):
fmc
.
dc_offset_reset
()
fmc
.
dc_offset_reset
()
time
.
sleep
(
DAC_SET_SLEEP
)
time
.
sleep
(
DAC_SET_SLEEP
)
# Check if an error occured during offset DAC test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during offset DAC test, check log for details.'
)
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
)
as
e
:
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
)
as
e
:
raise
PtsError
(
"Test failed:
%
s"
%
e
)
raise
PtsError
(
"Test failed:
%
s"
%
e
)
...
@@ -225,6 +221,10 @@ def main (default_directory='.'):
...
@@ -225,6 +221,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during offset DAC test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during offset DAC test, check log for details.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test08.py
View file @
0a180751
...
@@ -273,10 +273,7 @@ def main (default_directory='.'):
...
@@ -273,10 +273,7 @@ def main (default_directory='.'):
gen
.
output
=
False
gen
.
output
=
False
gen
.
close
()
gen
.
close
()
# Check if an error occured during switches test
if
(
error
==
0
):
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during switches test, check log for details.'
)
else
:
print
"
\n
All switches are working fine!"
print
"
\n
All switches are working fine!"
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
CalibrBoxOperationError
)
as
e
:
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
CalibrBoxOperationError
)
as
e
:
...
@@ -289,6 +286,10 @@ def main (default_directory='.'):
...
@@ -289,6 +286,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during switches test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during switches test, check log for details.'
)
# Following commented code scan all SSR configurations to find good ones for testing switches
# Following commented code scan all SSR configurations to find good ones for testing switches
"""
"""
...
...
test/fmcadc100m14b4cha/python/test09.py
View file @
0a180751
...
@@ -307,10 +307,6 @@ def main (default_directory='.'):
...
@@ -307,10 +307,6 @@ def main (default_directory='.'):
gen
.
output
=
False
gen
.
output
=
False
gen
.
close
()
gen
.
close
()
# Check if an error occured during frequency response test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during frequency response test, check log for details.'
)
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
CalibrBoxOperationError
)
as
e
:
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
CalibrBoxOperationError
)
as
e
:
raise
PtsError
(
"Test failed:
%
s"
%
e
)
raise
PtsError
(
"Test failed:
%
s"
%
e
)
...
@@ -321,6 +317,10 @@ def main (default_directory='.'):
...
@@ -321,6 +317,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during frequency response test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during frequency response test, check log for details.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test19.py
View file @
0a180751
...
@@ -471,10 +471,6 @@ def main (default_directory = '.'):
...
@@ -471,10 +471,6 @@ def main (default_directory = '.'):
# Close AWG
# Close AWG
gen
.
close
()
gen
.
close
()
# Check if an error occured during frequency response test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during calibration, check log for details.'
)
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
CalibrBoxOperationError
,
CP210xEepromOperationError
)
as
e
:
CalibrBoxOperationError
,
CP210xEepromOperationError
)
as
e
:
...
@@ -487,6 +483,10 @@ def main (default_directory = '.'):
...
@@ -487,6 +483,10 @@ def main (default_directory = '.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during calibration
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during calibration (unstable voltage), check log for details.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test20.py
View file @
0a180751
...
@@ -505,10 +505,6 @@ def main (default_directory = '.'):
...
@@ -505,10 +505,6 @@ def main (default_directory = '.'):
# Close AWG
# Close AWG
gen
.
close
()
gen
.
close
()
# Check if an error occured during frequency response test
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during calibration verification, check log for details.'
)
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
except
(
FmcAdc100mSpecOperationError
,
FmcAdc100mOperationError
,
CalibrBoxOperationError
,
CP210xEepromOperationError
)
as
e
:
CalibrBoxOperationError
,
CP210xEepromOperationError
)
as
e
:
raise
PtsError
(
"Test failed:
%
s"
%
e
)
raise
PtsError
(
"Test failed:
%
s"
%
e
)
...
@@ -520,6 +516,10 @@ def main (default_directory = '.'):
...
@@ -520,6 +516,10 @@ def main (default_directory = '.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during calibration verification
if
(
error
!=
0
):
raise
PtsError
(
'An error occured during calibration verification, check log for details.'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
test/fmcadc100m14b4cha/python/test23.py
View file @
0a180751
...
@@ -221,7 +221,6 @@ def main (default_directory='.'):
...
@@ -221,7 +221,6 @@ def main (default_directory='.'):
print
"OK"
print
"OK"
else
:
else
:
print
"FAILED"
print
"FAILED"
raise
PtsError
(
"EEPROM comparison failed:
%
d mismatch found."
%
mismatch
)
except
FmcAdc100mOperationError
as
e
:
except
FmcAdc100mOperationError
as
e
:
raise
PtsError
(
"Test failed:
%
s"
%
e
)
raise
PtsError
(
"Test failed:
%
s"
%
e
)
...
@@ -234,5 +233,10 @@ def main (default_directory='.'):
...
@@ -234,5 +233,10 @@ def main (default_directory='.'):
end_test_time
=
time
.
time
()
end_test_time
=
time
.
time
()
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
print
"Test
%02
d elapsed time:
%.2
f seconds
\n
"
%
(
TEST_NB
,
end_test_time
-
start_test_time
)
# Check if an error occured during EEPROM verification
if
(
mismatch
!=
0
):
raise
PtsError
(
"EEPROM comparison failed:
%
d mismatch found. Check log for details."
%
mismatch
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
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