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
225fa8d1
Commit
225fa8d1
authored
Oct 13, 2011
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a max limit of retry (reload firmware) in test09.
parent
c0fe7597
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
test09.py
test/fmcadc100m14b4cha/python/test09.py
+11
-1
No files found.
test/fmcadc100m14b4cha/python/test09.py
View file @
225fa8d1
...
...
@@ -38,6 +38,8 @@ SSR_SET_SLEEP = 0.05
ACQ_TIMEOUT
=
10
MAX_FIRMWARE_RELOAD
=
10
PRE_TRIG_SAMPLES
=
1000
POST_TRIG_SAMPLES
=
1000
NB_SHOTS
=
1
...
...
@@ -153,7 +155,7 @@ def acquisition(gnum, pages, fmc, channel_nb, channel_data):
page1_data
=
gnum
.
get_memory_page
(
1
)
page_zeros
=
[
0
]
*
len
(
page1_data
)
if
((
page1_data_before_dma
==
page1_data
)
or
(
page_zeros
==
page1_data
)):
print
(
'###
################# Acquisition or DMA error.
'
)
print
(
'###
Acquisition or DMA error. ###
'
)
#raise PtsWarning('Acquisition or DMA error.')
return
-
1
for
i
in
range
(
len
(
page1_data
)):
...
...
@@ -206,6 +208,7 @@ def main (default_directory='.'):
# Test frequency response of all channels
ch_diff
=
[]
j
=
0
error_cnt
=
0
while
(
j
<
len
(
points
)):
#print('begin loop j=%d')%(j)
set_awg_freq
(
gen
,
sine
,
points
[
j
][
0
])
...
...
@@ -214,7 +217,13 @@ def main (default_directory='.'):
time
.
sleep
(
SSR_SET_SLEEP
)
channel_data
=
[]
error
=
acquisition
(
gnum
,
pages
,
fmc
,
i
,
channel_data
)
if
(
j
==
1
):
error
-=
1
if
(
error
!=
0
):
error_cnt
+=
1
print
(
'RETRY:
%
d'
)
%
(
error_cnt
)
if
(
MAX_FIRMWARE_RELOAD
<
error_cnt
):
raise
PtsError
(
'Maximium of
%
d retry exceeded (channel:
%
d, freq:
%2.3
fMHz)'
%
(
MAX_FIRMWARE_RELOAD
,
i
,
points
[
j
][
0
]
/
1E6
))
load_firmware
(
default_directory
)
fmc_adc_init
(
spec
,
fmc
)
#time.sleep(2)
...
...
@@ -229,6 +238,7 @@ def main (default_directory='.'):
raise
PtsError
(
'Channel
%
d frequency response is out of range at freq:
%2.3
fMHz'
%
(
i
,
points
[
j
][
0
]
/
1E6
))
if
(
error
==
0
):
j
+=
1
error_cnt
=
0
#print('j++')
#print('end loop j=%d')%(j)
...
...
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