Using the QuickUSB Library
FPGA Configuration
The QuickUSB Plug-In module can configure SRAM-based FPGA devices over the
USB. The default FPGATYPE is Passive Serial. For more information on
changing the FPGA type, see the
setting of the ‘Settings’
section of this document.
You must convert your FPGA configuration file to binary image format for use
with QuickUSB. Altera binary files are of type RBF and Xilinx are of type BIT. If
you are configuring multiple devices, they must be daisy-chained and the
configuration files combined in the conversion process into a single binary file.
To configure an FPGA, follow these steps:
1.
Call QuickUsbStartFpgaConfiguration. This resets the FPGA and starts the
configuration process.
2.
Open the binary FPGA configuration file and read a block into a buffer.
3.
Call QuickUsbWriteFpgaData and pass in the data from the file. Repeat
this process until the entire file is sent. Of course, the last block will
probably be less than the maximum block size. In addition, if you need to
restart the configuration process for some reason, you can call restart at
step 1 at any time. Be sure to close the binary FPGA configuration file
when you are done.
4.
Call QuickUsbIsFpgaConfigured. If the ‘isConfigured’ parameter gets set to
‘1’, the FPGA was correctly configured. If not, try again starting at step 1.
QuickUsbStartFpgaConfiguration
Purpose
Start the process of FPGA configuration. If the FPGA is in the process of
being configured, the process will restart. If the FPGA is already
configured, it will be reset and reconfigured.
Parameters
hDevice: A HANDLE that was returned from a call to QuickUsbOpen.
Returns
A LONG that is non-zero on success, zero (0) on failure.
Notes
None
FPGA
Configuration
53