ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data
Prototype
ADMXRC_STATUS ADMXRC_FindImageOffset( ADMXRC_FPGA_TYPE FpgaType, ADMXRC_IMAGE Image, ULONG Size, ULONG* Offset);
Arguments
Argument | Type | Purpose |
FPGAType | In | The FPGA device expected in the bitstream |
Image | In | A buffer containing the bitstream file, loaded into memory |
Size | In | The length of the bitstream file, in bytes |
Offset | In/out | Filled in with the offset of the SelectMap data |
Return value
Value | Meaning |
ADMXRC_SUCCESS | The offset of the SelectMap data was returned successfully |
ADMXRC_INVALID_FILE | The bitstream appears not to be valid |
ADMXRC_FPGA_MISMATCH | The bitstream does not target the expected device |
Description
This function scans a bitstream file that has been loaded into memory and determines the offset, from the beginning of the buffer, of the SelectMap data.
The FPGAType parameter, of the enumerated type ADMXRC_FPGA_TYPE, should be the FPGA that the bitstream targets. Typically, the value used is obtained from the FPGAType member of the ADMXRC_CARD_INFO structure.
The Image parameter should point to a variable of type ADMXRC_IMAGE which was obtained from an earlier call to ADMXRC_LoadFpgaFile.
The Length parameter should be the length of the bitstream file, returned by an earlier call to ADMXRC_LoadFpgaFile.
The Offset parameter must point to a ULONG variable, which receives the byte offset within Image at which the SelectMap data begins.