Коллеги!
Никакими силами не могу прочесть ID из Spartan-3 в slave selectMAP mode. Последовательность моих действий:
1. PROG = 1, INIT = 1, R/W = 0, CS = 0.
2. Посылаем последовательно:
DUMMY_WORD = 0xFFFFFFFF;
SYNC_WORD = 0xAA995566;
READ_ID = 0x2801C001;
FLUSH_PIPE = 0x00000000.
3. CS = 1; RW = 1; CS = 0;
4. Читаем 4 байта по шине D0-D7 : всегда 0хFFFFFFFF
Никак не могу понять причину. Все сигналы вырабатываются верно - FPGA грузится нормально.
Все вроде в соответствии с рекомендациями Xilinx:
Keywords: Spartan-3, ID, IDCODE, configuration, SelectMAP, read
Urgency: Standard
General Description:
Spartan-3 devices have a configuration register called IDCODE. What is it, and how do I access it?
Solution 1:
The IDCODE register is a configuration register that is separate from the JTAG register of the same name. The beginning of the bitstream contains a command that writes a value, which represents the IDcode of the target device, to this IDCODE register. This value is compared to an internal constant which represents the true IDCODE of the device. If these values are the same, configuration can continue. If they are different, the bit stream is mis-targeted, configuration stops, and the INIT pin goes Low. Therefore, it is impossible to configure a Spartan-3 device with a bitstream intended for a different device size or architecture.
It is possible to read the IDCODE register through the SelectMAP port (readback cannot be done via serial modes). In order to do this, the SelectMAP port must persist after configuration (set the BitGen option "-g Persist:Yes"). This will force the configuration pins to retain their function after configuration is complete.
From (Xilinx XAPP452): "Spartan-3 Advanced Configuration Architecture," 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"), read operation ("01), the address ("00000000001110"), RSVD bits ("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 SelectMap data bus -- one byte per cycle for 4 cycles.
Может кто в курсе?