
Orange Tree Technologies
Page 26 of 57
9 Host Utilities
A number of utilities are provided with the ZestSC1 support library. These can be found
in the Utils sub-directory of the support package installation.
9.1 Bit2C
Bit2C.exe converts Xilinx .bit FPGA configuration files to C header files. The C header file
contains a static array definition with the raw data from the .bit file. This array can be
passed to the ZestSC1RegisterImage function to obtain a handle suitable for the
ZestSC1Configure function. In this way, .bit files can be linked into your application
executable to avoid having multiple files.
For example:
Bit2C config.bit array.c
This will convert the config.bit file generated by the Xilinx place and route tools into a
file called array.c which contains definitions of the variables arrayLength and
arrayImage. You can then configure the FPGA by calling the following functions:
extern void *arrayImage;
extern unsigned long arrayLength;
ZESTSC1_IMAGE Image;
ZESTSC1_HANDLE Handle;
/* Register the FPGA configuration image */
ZestSC1RegisterImage(arrayImage, arrayLength, &Image);
/* Open a card with ID of 1 */
ZestSC1OpenCard(1, &Handle);
/* Configure the FPGA from the image */
ZestSC1Configure(Handle, Image);
9.2 SetID
Each ZestSC1 card contains a non-volatile ID to allow identification of the card in a
system with multiple ZestSC1’s attached. The ID is passed to the ZestSC1OpenCard
function to obtain a handle to the card.
For example, a system may consist of a ZestSC1 card attached to a camera and a second
ZestSC1 connected to a monitor. Setting the ID of the first card to 1 and the second
card to 2 will allow the host program to distinguish between the two cards.
SetID.exe programs the ID of a card from the command line. Run SetID.exe from a
command prompt and follow the on-screen instructions.
Comentarios a estos manuales