Appendix C
Multiple Configuration Setups
This appendix describes programming setups that you can use to support multiple applications in a system. Three possible scenarios are covered. These are described in the following sections.
NOTEFor information about Virtex configurations, see the Xilinx web page (http://www.xilinx.com).
|
Reconfiguring a Daisy Chain from a Serial PROM
You can download multiple applications to a single device or to a daisy chain of multiple devices in master serial mode from a serial PROM device. The master serial mode forces you to reconfigure your FPGAs with the applications in a fixed sequence (the sequence in which the data streams are saved in the serial PROM).
- Use the PROM File Formatter to build a PROM file that includes a separate data stream for each application that you wish to implement in the FPGA or daisy chain. Save it in serial PROM format. Each data stream will have its own header and length count, which the FPGA or daisy chain uses to determine when it has read in all the data for a particular application.
- Burn the PROM file into a serial PROM device using a PROM programmer.
- If you are configuring a daisy chain, build the daisy chain of devices, ensuring you connect the DOUT output of each slave device to the DIN input of the next device. Refer to the connections given in The Programmable Logic Data Book.
- If you want to configure a single device, connect the serial PROM directly to the FPGA; if you want to configure a daisy chain, connect the PROM to the master device of the daisy chain.
- Power up the daisy chain of devices.
The PROM's internal address counters are reset upon power-up. The FPGA or daisy chain reads the length count in the first data stream and clocks the serial PROM a length count number of times to configure the FPGA or daisy chain with the first application. At the end of the first configuration cycle, the PROM internal address pointer is left pointing to the end of the first data stream.
- Reconfigure the daisy chain by pulling the PROG pin of XC4000 and XC5200 devices Low for at least 300 ns; pull the D/!P pin of XC3000A devices Low for at least 6 µs (microseconds).
This action causes the FPGA or daisy chain to read the next data stream in the PROM.
If the PROM has been configured for active High Reset, you must tie the RESET/!OE pin to GND; if the PROM has been programmed for active Low Reset, tie the !RESET/OE pin to VCC.
NOTEDo not use this procedure if there is any chance that your system might be reset before you try to reprogram the FPGAs with the second configuration. Any accidental system resets can cause the PROM's internal address counter to be reset to 0 also, which makes it point back to the first data stream.
|
Reconfiguring a Single Device or Daisy Chain from a Parallel PROM
You can program a single device or daisy chain with multiple configurations loaded from a parallel PROM. This method allows you to select the desired application in any order by selecting the appropriate start address.
Planning the PROM Structure
- Use the PROM File Formatter to build a PROM file that includes one data stream for each daisy chain that needs to be configured.
- Look at the numbers in the PROM description area to determine the total number of bytes required for the largest data stream.
- Compute the number of address bits required to address this number of bytes. For example, if the size of the largest data stream is 25,000 bytes, then 15 address bits are needed to address them.
- Use the remaining high order bits as the external select bits to select the data stream for the desired application.
Setting the PROM Properties
- Select File
PROM Properties.
- In the Format tab of the PROM Properties dialog box, select Byte Wide in the Type field.
- In the Data Streams tab of the PROM Properties dialog box, enter the starting address for each data stream in the PROM file. Set the address such that the desired data stream can be selected out of 2n data streams by asserting n address bits.
For example, a single data bit can select two different applications. If the PROM file contains two data streams, select the starting addresses for the two applications such that they differ by only one address bit; this is typically the high order address bit.
- Save the PROM file.
Implementing the Setup
- Burn the PROM file into a parallel PROM device using a PROM programmer.
- Connect the components on your board as shown in The Programmable Logic Data Book.
- To control the n address bits, you can use either a microcontroller or a state machine implemented in an XC9500 CPLD.
- To reconfigure the daisy chain, pull the !PROG pin of XC4000 and XC5200 devices Low for at least 300 µs; pull the D/P pin of XC3000A devices Low for at least 6 µs.
ExampleThis example explains how to use a microcontroller or CPLD device to configure a daisy chain for four separate functions using four data streams stored on the parallel PROM. The daisy chain is 12,500 bytes long.
Because the daisy chain requires 12,500 bytes of configuration bits, 14 address bits are required to address the data (214=16,384 bytes). You must use two external selection bits to select each of the four data streams individually. Use the two high order bits of each data stream starting address for this purpose (bits 14 and 15).
Table C_1 Data Stream Addressing - Single Device or Daisy Chain Example
Data Stream
| Select Bits
| Starting Address
| Ending Address
|
1
| 00
| 00 00000000000000
| 00 11111111111111
|
2
| 01
| 01 00000000000000
| 01 11111111111111
|
3
| 10
| 10 00000000000000
| 10 11111111111111
|
4
| 11
| 11 00000000000000
| 11 11111111111111
|
To configure the FPGA daisy chain on power-up with the first application, the microcontroller or CPLD must drive the two high order address bits to 00 to select data stream #1 for the first application. To reconfigure FPGA or daisy chain for application #4, drive the two high order address bits to 11 and assert the appropriate REPROGRAM signal.
Configuring Multiple Device Daisy Chains from One Parallel PROM
Some applications might require that you store the configuration data for multiple daisy chains of FPGAs on the same parallel PROM device. To implement such a setup, use additional logic to address the different daisy chains, to hold all unconfigured daisy chains in reset mode, and to tristate the configured daisy chains while another chain is being configured.
Planning the PROM Structure
- Use the PROM File Formatter to build a PROM file that includes one data stream for each daisy chain that needs to be configured.
- Determine the total number of bytes required for the largest data stream.
- Compute the number of address bits required to address this number of bytes. For example, if the size of the largest data stream is 25,000 bytes, then 15 address bits are needed to address them.
- Use the remaining high order bits as the external select bits to select the data stream for the desired application.
Setting the PROM Properties
- Select File
PROM Properties.
- In the Format tab of the PROM Properties dialog box, select Byte Wide in the Type field.
- In the Data Streams tab of the PROM Properties dialog box, enter the starting address for each data stream in the PROM file. Set the address such that the desired data stream can be selected out of 2n data streams by asserting n address bits.
For example, a single data bit can select two different applications. If the PROM file contains two data streams, select the starting addresses for the two applications such that they differ by only one address bit; this is typically the high order address bit.
- Save the PROM file.
Implementing the Setup
- Burn the PROM file into a parallel PROM device using a PROM programmer.
- Connect the components on your board as shown in The Programmable Logic Data Book.
- To control the n address bits, you can use either a microcontroller or a state machine implemented in an XC9500 CPLD.
- As each daisy chain is being configured, use the microcontroller or the state machine to hold unconfigured daisy chains in reset mode by pulling RESET/INIT Low and to tristate the address lines leading to all configured daisy chains.
- Use the microcontroller to hold the second daisy chain in reset mode while you configure the first daisy chain. Keep the second daisy chain in Reset mode until the DONE signal of the first daisy chain goes High. When the DONE signal goes High, the first daisy chain has completed configuration.
- When the DONE signal for the first device goes High, the address pins of the master device in the first daisy chain must be tristated while the second chain is allowed to configure. This step prevents contention with the active outputs of the first daisy chain.
ExampleThis example explains how to use a microcontroller or CPLD device to configure four daisy chains using four data streams stored on the parallel PROM. The size of the largest data stream is 12,500 bytes.
Because the largest of these daisy chains requires 12,500 bytes of configuration bits, 14 address bits are required to express the size of the data (214=16,384 bytes). You must use two external selection bits to select one out of the four data streams. Use the two high order bits of each data stream starting address for this purpose.
Table C_2 Data Stream Addressing - Multiple Daisy Chain Example
Data Stream
| Select Bits
| Starting Address
| Ending Address
|
1
| 00
| 00 00000000000000
| 00 11111111111111
|
2
| 01
| 01 00000000000000
| 01 11111111111111
|
3
| 10
| 10 00000000000000
| 10 11111111111111
|
4
| 11
| 11 00000000000000
| 11 11111111111111
|
- To configure daisy chain #1 on power-up, the microcontroller or CPLD must drive the two high order address bits to 00 to select data stream #1 for the first application.
- Use the microcontroller or CPLD to hold the other three unconfigured daisy chains in Reset mode by pulling RESET/INIT Low.
To hold an XC3000A device in Reset mode, hold the RESET pin Low; for the XC4000 and XC5200 devices, hold the INIT pin Low.
- When the DONE pin goes High on the first daisy chain, the daisy chain is configured. The microcontroller or CPLD must respond by tristating the address lines leading to the master device of the first daisy chain. The controller also drives the 01 value on the high-order address bits to select the second data stream, then releases RESET on the second daisy chain so that it can configure.
- Repeat the previous step for the third daisy chain after DONE goes High on the second daisy chain, this time tristating the address pins on both the first and second daisy chain, driving a value of 10 on the high order address bits, and releasing the RESET on the third daisy chain.
- For the fourth daisy chain, after DONE goes High on the third daisy chain, tristate the address pins on the first, second, and third daisy chains, drive a value of 11 on the high order address bits, and release RESET on the fourth daisy chain.