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
70240917
Commit
70240917
authored
Jan 09, 2014
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svec test30,34: Fix bugs, remove useless code.
parent
d794f86c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
svec_test30.py
test/fmcadc100m14b4cha/python/svec_test30.py
+0
-4
svec_test34.py
test/fmcadc100m14b4cha/python/svec_test34.py
+12
-9
No files found.
test/fmcadc100m14b4cha/python/svec_test30.py
View file @
70240917
...
@@ -98,12 +98,8 @@ def acq_channels(fmc, carrier, adc_fs, pause):
...
@@ -98,12 +98,8 @@ def acq_channels(fmc, carrier, adc_fs, pause):
return
1
return
1
# Retrieve data trough DMA
# Retrieve data trough DMA
trig_pos
=
fmc
.
get_trig_pos
()
trig_pos
=
fmc
.
get_trig_pos
()
# Enable "DMA done" iinterrupt
carrier
.
set_irq_en_mask
(
0x1
)
# Read ACQ_LENGTH samples after the trigger for all channels
# Read ACQ_LENGTH samples after the trigger for all channels
channels_data
=
fmc
.
get_data
(
trig_pos
,
ACQ_LENGTH
*
8
)
channels_data
=
fmc
.
get_data
(
trig_pos
,
ACQ_LENGTH
*
8
)
# Disable "DMA done" iinterrupt
carrier
.
set_irq_en_mask
(
0x0
)
channels_data
=
[
hex2signed
(
item
)
for
item
in
channels_data
]
channels_data
=
[
hex2signed
(
item
)
for
item
in
channels_data
]
channels_data
=
[
digital2volt
(
item
,
adc_fs
,
16
)
for
item
in
channels_data
]
channels_data
=
[
digital2volt
(
item
,
adc_fs
,
16
)
for
item
in
channels_data
]
return
channels_data
return
channels_data
...
...
test/fmcadc100m14b4cha/python/svec_test34.py
View file @
70240917
...
@@ -40,16 +40,15 @@ def main (default_directory='.'):
...
@@ -40,16 +40,15 @@ def main (default_directory='.'):
FMC_ADC_BITSTREAM
=
os
.
path
.
join
(
default_directory
,
FMC_ADC_BITSTREAM
)
FMC_ADC_BITSTREAM
=
os
.
path
.
join
(
default_directory
,
FMC_ADC_BITSTREAM
)
EXPECTED_BITSTREAM_TYPE
=
0x0
EXPECTED_BITSTREAM_TYPE
=
0x0
NB_CHANNELS
=
4
NB_CHANNELS
=
4
EEPROM_ADDR
=
0x50
SI570_ADDR
=
0x55
TEST_PATTERN
=
0x6A1
start_test_time
=
time
.
time
()
start_test_time
=
time
.
time
()
print
"
\n
================================================================================"
print
"
\n
================================================================================"
print
"==> [SVEC] Test
%02
d start
\n
"
%
TEST_NB
print
"==> [SVEC] Test
%02
d start
\n
"
%
TEST_NB
print
(
"WARNING: interrupt timeout must be extended to 5000ms using vmeiotest!"
)
print
(
"
\n
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
)
print
(
"WARNING: interrupt timeout must be extended to 5000ms using vmeiotest."
)
print
(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\n
"
)
# SVEC object declaration
# SVEC object declaration
print
"Loading hardware access library and opening device.
\n
"
print
"Loading hardware access library and opening device.
\n
"
...
@@ -101,7 +100,6 @@ def main (default_directory='.'):
...
@@ -101,7 +100,6 @@ def main (default_directory='.'):
except
FmcAdc100mOperationError
as
e
:
except
FmcAdc100mOperationError
as
e
:
raise
PtsCritical
(
"Mezzanine
%
d init failed, test stopped:
%
s"
%
(
i
+
1
,
e
))
raise
PtsCritical
(
"Mezzanine
%
d init failed, test stopped:
%
s"
%
(
i
+
1
,
e
))
carrier
.
vic
.
print_regs
()
carrier
.
vic
.
print_regs
()
# Test mezzanines peripherals
# Test mezzanines peripherals
...
@@ -111,25 +109,30 @@ def main (default_directory='.'):
...
@@ -111,25 +109,30 @@ def main (default_directory='.'):
print
(
'
\n
-------------------------------------------------------------'
)
print
(
'
\n
-------------------------------------------------------------'
)
print
(
'[FMC slot
%
d]'
%
(
i
+
1
))
print
(
'[FMC slot
%
d]'
%
(
i
+
1
))
# hw trig, rising edge, external, sw disable, no delay
print
(
''
)
print
(
''
)
for
j
in
range
(
100
):
for
j
in
range
(
1
):
print
(
'Enable trigger interrupt'
)
print
(
'Enable trigger interrupt'
)
fmc
[
i
]
.
enable_trig_irq
()
fmc
[
i
]
.
enable_trig_irq
()
fmc
[
i
]
.
print_eic_regs
()
fmc
[
i
]
.
print_eic_regs
()
fmc
[
i
]
.
set_trig_config
(
1
,
0
,
1
,
1
,
1
,
0
,
0
)
fmc
[
i
]
.
set_ext_trig
(
0
)
fmc
[
i
]
.
print_trig_config
()
fmc
[
i
]
.
set_pre_trig_samples
(
500
)
fmc
[
i
]
.
set_pre_trig_samples
(
500
)
fmc
[
i
]
.
set_post_trig_samples
(
500
)
fmc
[
i
]
.
set_post_trig_samples
(
500
)
fmc
[
i
]
.
set_shots
(
1
)
fmc
[
i
]
.
set_shots
(
1
)
fmc
[
i
]
.
stop_acq
()
fmc
[
i
]
.
stop_acq
()
if
fmc
[
i
]
.
get_acq_config_ok
():
print
(
"Acquisition config OK."
)
else
:
raise
FmcAdc100mSvecOperationError
(
"Acquisition config NOT OK."
)
#fmc[i].fmc_adc_csr.print_reg_map()
#fmc[i].fmc_adc_csr.print_reg_map()
print
"
%
d: Acquisition FSM state :
%
s (should be IDLE)"
%
(
j
,
fmc
[
i
]
.
get_acq_fsm_state
())
print
"
%
d: Acquisition FSM state :
%
s (should be IDLE)"
%
(
j
,
fmc
[
i
]
.
get_acq_fsm_state
())
fmc
[
i
]
.
start_acq
()
fmc
[
i
]
.
start_acq
()
time
.
sleep
(
0.001
)
time
.
sleep
(
0.001
)
print
"
%
d: Acquisition FSM state :
%
s
"
%
(
j
,
fmc
[
i
]
.
get_acq_fsm_state
())
print
"
%
d: Acquisition FSM state :
%
s
(should be WAIT_TRIG)"
%
(
j
,
fmc
[
i
]
.
get_acq_fsm_state
())
print
"Wait for trigger."
print
"Wait for trigger."
...
...
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