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
67075ccc
Commit
67075ccc
authored
Mar 13, 2013
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test17: Fix data retreive range, change bitstream to load (release v1.0).
parent
d570e70e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
test17.py
test/fmcadc100m14b4cha/python/test17.py
+4
-16
No files found.
test/fmcadc100m14b4cha/python/test17.py
View file @
67075ccc
...
@@ -59,7 +59,7 @@ ACQ_TIMEOUT = 10
...
@@ -59,7 +59,7 @@ ACQ_TIMEOUT = 10
MAX_FIRMWARE_RELOAD
=
10
MAX_FIRMWARE_RELOAD
=
10
PRE_TRIG_SAMPLES
=
1
000
PRE_TRIG_SAMPLES
=
2
000
POST_TRIG_SAMPLES
=
50000
POST_TRIG_SAMPLES
=
50000
NB_SHOTS
=
1
NB_SHOTS
=
1
...
@@ -71,19 +71,6 @@ DAC_NBITS = 16
...
@@ -71,19 +71,6 @@ DAC_NBITS = 16
DAC_FS
=
10
# DAC full scale range is 10V
DAC_FS
=
10
# DAC full scale range is 10V
def
load_firmware
(
default_directory
):
print
(
'Load firmware to FPGA'
)
path_fpga_loader
=
'../../../gnurabbit/user/fpga_loader'
;
path_firmware
=
'../firmwares/spec_fmcadc100m14b4cha.bin'
;
firmware_loader
=
os
.
path
.
join
(
default_directory
,
path_fpga_loader
)
bitstream
=
os
.
path
.
join
(
default_directory
,
path_firmware
)
print
firmware_loader
+
' '
+
bitstream
os
.
system
(
firmware_loader
+
' '
+
bitstream
)
time
.
sleep
(
2
);
def
disconnect_channels
(
fmc
):
def
disconnect_channels
(
fmc
):
for
i
in
range
(
1
,
NB_CHANNELS
+
1
):
for
i
in
range
(
1
,
NB_CHANNELS
+
1
):
fmc
.
set_ssr
(
i
,
0x00
)
fmc
.
set_ssr
(
i
,
0x00
)
...
@@ -137,7 +124,7 @@ def acquisition_all(fmc, spec_fmc):
...
@@ -137,7 +124,7 @@ def acquisition_all(fmc, spec_fmc):
# Retrieve data trough DMA
# Retrieve data trough DMA
trig_pos
=
fmc
.
get_trig_pos
()
trig_pos
=
fmc
.
get_trig_pos
()
print
(
'Trigger position; 0x
%
X'
)
%
(
trig_pos
)
print
(
'Trigger position; 0x
%
X'
)
%
(
trig_pos
)
channels_data
=
spec_fmc
.
get_data
((
trig_pos
<<
3
),
ACQ_LENGTH
*
8
)
channels_data
=
spec_fmc
.
get_data
((
(
trig_pos
-
PRE_TRIG_SAMPLES
)
<<
3
),
(
PRE_TRIG_SAMPLES
+
POST_TRIG_SAMPLES
)
*
8
)
return
channels_data
return
channels_data
...
@@ -154,6 +141,7 @@ def plot_all(data, mean, ylimit):
...
@@ -154,6 +141,7 @@ def plot_all(data, mean, ylimit):
plot
(
sample
,
[
mean
[
2
]]
*
len
(
sample
),
'r'
)
plot
(
sample
,
[
mean
[
2
]]
*
len
(
sample
),
'r'
)
plot
(
sample
,
[
mean
[
3
]]
*
len
(
sample
),
'r'
)
plot
(
sample
,
[
mean
[
3
]]
*
len
(
sample
),
'r'
)
ylim
(
-
ylimit
-
(
ylimit
/
10.0
),
ylimit
+
(
ylimit
/
10.0
))
ylim
(
-
ylimit
-
(
ylimit
/
10.0
),
ylimit
+
(
ylimit
/
10.0
))
xlim
(
0
,
len
(
sample
))
grid
(
which
=
'both'
)
grid
(
which
=
'both'
)
legend
()
legend
()
draw
()
draw
()
...
@@ -204,7 +192,7 @@ def main (default_directory = '.'):
...
@@ -204,7 +192,7 @@ def main (default_directory = '.'):
# Constants declaration
# Constants declaration
TEST_NB
=
19
TEST_NB
=
19
EXPECTED_BITSTREAM_TYPE
=
0x1
EXPECTED_BITSTREAM_TYPE
=
0x1
FMC_ADC_BITSTREAM
=
'../firmwares/spec
_fmcadc100m14b4cha
.bin'
FMC_ADC_BITSTREAM
=
'../firmwares/spec
-fmc-adc-v1.0
.bin'
FMC_ADC_BITSTREAM
=
os
.
path
.
join
(
default_directory
,
FMC_ADC_BITSTREAM
)
FMC_ADC_BITSTREAM
=
os
.
path
.
join
(
default_directory
,
FMC_ADC_BITSTREAM
)
# Objects declaration
# Objects declaration
...
...
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