Get the status of the fpga configuration, Chapter 4 – Measurement Computing DAQFlex User Manual
Page 9
9
Chapter 4
Updating the FPGA configuration bitfile on a
non-Windows system
For devices that support DEV:FPGACFG, a configuration bitfile must be loaded onto the device's FPGA
before DAQ commands will work with the device.
The FPGA is configured automatically on a Windows operating system, and no action is required by the
user. On Mac OS X and Linux systems, perform the procedure below to load or update the FPGA
configuration bitfile on a device.
Get the status of the FPGA configuration
You can determine whether the device FPGA is configured by sending the "?DEV:FPGACFG" message.
The device returns one of the following messages:
"DEV:FPGA=CONFIGMODE" indicates that the FPGA is not configured,
Perform the procedure below to load the FPGA configuration file onto the device.
"DEV:FPGA=CONFIGURED" indicates that the device FPGA is currently configured.
Perform the procedure below only when you want to update the configuration file.
Loading a FPGA configuration file onto the device (Linux and
Mac OS X)
An FPGA configuration file has an
.rbf
extension and includes the name of the device. For example, the
FPGA configuration file for the USB-1608G device is named USB_1608g.rbf.
FPGA configuration files are installed to the following location:
Mac OS X: the FPGA configuration file is installed to
/usr/lib
.
Linux: the FPGA configuration file is installed to
/usr/lib/daqflex
.
To load or update the FPGA configuration file on a device, complete the following steps:
1.
Send "DEV:FPGACFG=<unlock_code>" to the device to put the device into FPGA Configuration
Mode. The device response is "DEV:FPGACFG".
Note: The <unlock_code> is device-specific. Refer to the DEV:FPGACFG message in the hardware-
specific topics to determine the unlock code to set for a device. For example, to put the USB-1608G
into FPGA configuration mode, send the message "DEV:FPGACFG=0XAD"
2.
Stream the bitfile down to the device through endpoint 0:
3.
Send the firmware command
FPGA_DATA
(0x51) to the device with 64 bytes from the FPGA bitfile.
Specify the number of bytes to write with the
wLength
field.
Repeat until the entire FPGA bitfile has been sent. The FPGA bitfile is streamed down to the device
through Endpoint 0.
The device automatically exits Configuration Mode after the FPGA image file is successfully downloaded.