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
23641667
Commit
23641667
authored
Feb 07, 2012
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused fmcadc stuff.
parent
f2f7e0ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
66 deletions
+2
-66
test18.py
test/fmcadc100m14b4cha/python/test18.py
+2
-66
No files found.
test/fmcadc100m14b4cha/python/test18.py
View file @
23641667
...
...
@@ -15,8 +15,6 @@ from pylab import *
from
ptsexcept
import
*
import
spec_fmc_adc
import
fmc_adc
import
calibr_box
import
find_usb_tty
from
PAGE.Agilent33250A
import
*
...
...
@@ -36,58 +34,12 @@ BOX_USB_DEVICE_ID = 0xea60 # CP210x Composite Device
# Agilent AWG serial access vendor and device IDs
AWG_USB_VENDOR_ID
=
0x0403
# Future Technology Devices International, Ltd
AWG_USB_DEVICE_ID
=
0x6001
# FT232 USB-Serial (UART) IC
RS232_BAUD
=
57600
NB_CHANNELS
=
4
AWG_SET_SLEEP
=
0.3
SSR_SET_SLEEP
=
0.05
ACQ_TIMEOUT
=
10
MAX_FIRMWARE_RELOAD
=
10
PRE_TRIG_SAMPLES
=
10
POST_TRIG_SAMPLES
=
1000
NB_SHOTS
=
1
ACQ_LENGTH
=
1
# in samples
DMA_LENGTH
=
4096
# in bytes
def
load_firmware
(
default_directory
):
print
(
'Load firmware to FPGA'
)
path_fpga_loader
=
'../../../gnurabbit/user/fpga_loader'
;
path_firmware
=
'../firmwares/spec_fmcadc100m14b4cha_test.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
):
for
i
in
range
(
1
,
NB_CHANNELS
+
1
):
fmc
.
set_input_range
(
i
,
'OPEN'
)
time
.
sleep
(
SSR_SET_SLEEP
)
def
fmc_adc_init
(
spec
,
fmc
):
print
(
'Initialise FMC board.'
)
fmc
.
__init__
(
spec
)
# Reset offset DACs
fmc
.
dc_offset_reset
()
# Make sure all switches are OFF
disconnect_channels
(
fmc
)
# Set trigger
fmc
.
set_soft_trig
()
# Set acquisition
fmc
.
set_pre_trig_samples
(
PRE_TRIG_SAMPLES
)
fmc
.
set_post_trig_samples
(
POST_TRIG_SAMPLES
)
fmc
.
set_shots
(
NB_SHOTS
)
# Print configuration
#fmc.print_adc_core_config()
def
set_awg_freq
(
gen
,
sine
,
freq
):
...
...
@@ -99,13 +51,7 @@ def set_awg_freq(gen, sine, freq):
def
main
(
default_directory
=
'.'
):
# Load firmware to FPGA
#load_firmware(default_directory)
# Objects declaration
#spec = rr.Gennum() # bind to the SPEC board
#spec_fmc = spec_fmc_adc.CSpecFmcAdc100Ms(spec)
#fmc = fmc_adc.CFmcAdc100Ms(spec)
usb_tty
=
find_usb_tty
.
CttyUSB
()
awg_tty
=
usb_tty
.
find_usb_tty
(
AWG_USB_VENDOR_ID
,
AWG_USB_DEVICE_ID
)
box_tty
=
usb_tty
.
find_usb_tty
(
BOX_USB_VENDOR_ID
,
BOX_USB_DEVICE_ID
)
...
...
@@ -113,16 +59,6 @@ def main (default_directory = '.'):
sine
=
SineWaveform
()
box
=
calibr_box
.
CCalibr_box
(
box_tty
[
0
])
# Enable "DMA finished" IRQ
#spec_fmc.set_irq_en_mask(0x1)
# Initialise fmc adc
#fmc_adc_init(spec, fmc)
# Disconnect all inputs
#disconnect_channels(fmc)
# Calibration box version 2
for
i
in
range
(
NB_CHANNELS
):
box
.
select_output_ch
(
i
+
1
,
'10V'
)
...
...
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