UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 3017

FPGA Configuration - Dynamic Re-ordering of Daisy-Chain configurations.

Description

For applications that need to choose the order of a daisy-chain configuration "on-the-fly", or reduce the amount of memory space needed to hold mutiple daisy-chain configuration streams, some manual intervention may be applied so that each FPGA configuration need only be stored once.

For example:

A daisy-chain of six devices and multiple designs per device is demonstrated below:

Lead / Slaves...

Device1 -> Device2 -> Device3 -> Device4 -> Device5 -> Device6

Design1 Design2 Design4 Design7 Design10 Design12

Design3 Design5 Design8 Design11

Design6 Design9

To store all combinations of the above daisy-chains would result in the same designs being stored in multiple memory locations.

解决方案

This solution record assumes basic knowledge of FPGA configuration and file generation. Please consult the Development System Reference Guide for information on using the BITGEN and PROMGEN utilities.

A daisy-chain configuration stream can be realized as multiple separate files on a per device basis. However, some limitations apply. The configuration file for a lead device in the chain may not be used to program a slave device, and vice-versa.

Procedure:

1. Create a bitstream (.bit) file for each design/device combination. The same bitstream may not be used for different device architectures.

2. Create an ASCII-HEX (.hex) file for each bitstream.

3. For all .hex files, except those intended for Lead Devices, remove the first 10 hex characters. These represent the 40-bit header of the configuration data.

4. Calculate the number of configuration bits remaining in each file. One way to accomplish this is:

bits = (Bytes_per_file - number_of_lines) x 4 bits_per_character

5. Adjust file size to match the standard "Program Data" value in the Databook plus eight. Every file will have some padding at the end of the file in the form of "F"s hex. Adding an "F" to the end of the file will increase its size by four configuration bits. Removing an "F" will decrease the number of configuration bits by four. All bit files intended for the same device must be equal in length.

Lead device files should be 40 bits larger than slave device files because of the configuration data header.

6. Calculate the LengthCount for the daisy-chain.

The LengthCount number is the total number of configuration bits for the chain of devices chosen minus seven:

LengthCount = Total Configuration bits - 7

The total number of configuration bits is the sum of configuration bits per device, where bits per device is Program Data + 8.

7. Replace original LengthCount value in all Lead configuration files with new value.

The hex files will most likely be "byte-swapped." The first five bytes must be unswapped to extract the old LengthCount number,

replace it with the new one, and re-swap the bytes before inserting them into the file. For example:

The original header may look like: FF043C89F9

Unswapping this would yield: FF203C919F

The LengthCount is the 24-bit word succeeding the preamble "FF2," which in this case would be 03C919. If our calculated

lengthcount from step 6 was 0F4099, then replacing the lengthcount and re-swapping would yield:

FF20F4099F (Unswapped)

FF042F90F9 (Swapped)

This would replace the first five bytes in each of the Lead device configuration files.

8. Convert the hex files to the desired format for memory storage.

The Xilinx web site contains a utility for converting hex files to prom files:

http://www.xilinx.com/txpatches/pub/utilities/prom/pconfig.zip

AR# 3017
创建日期 08/21/2007
Last Updated 12/15/2012
状态 Active
Type 综合文章