Beginning in Virtex-II, there is a configuration register called IDCODE. What is it, and how do I access it?
The IDCODE register is a configuration register that is separate from the JTAG register of the same name. A value is "written" to that register during the normal configuration process. This value is compared to an internal constant. If they are the same, configuration can continue. If they are different, the bit stream is mis-targeted, configuration stops, and the INIT pin goes low.
It is possible to read this register through the SelectMAP port (readback cannot be done via serial modes). The SelectMAP port must be persisted (set the BitGen option "-g Persist:Yes"). This will force the configuration pins to retain their function after configuration is complete.
From the existing documentation, we can find the address of the IDCODE register ("01110"), and the details of a Type 1 packet. Here is the flow:
1. Send the synchronization word (0xAA995566).
2. Send the command to read the IDCODE register. The packet contains the type ("001"), the address ("00000000001110"), the byte address ("00") and the word count ("00000000001"). This produces a 32-bit packet header: 0x2801C001.
3. Send a 32-bit word of all 0's to flush the command pipe of the target device. This ensures the read command is properly seen by the configuration logic.
4. De-assert /CS and /RDWR for one CCLK cycle, and place the data bus into a 3-state condition.
5. Assert /CS.
6. Read the IDCODE from the data bus -- one byte per cycle for 4 cycles.