******************************************************************************* ** Copyright © 2008, Xilinx, Inc. ** This design is confidential and proprietary of Xilinx, Inc. All Rights Reserved. ******************************************************************************* ** ____ ____ ** / /\/ / ** /___/ \ / Vendor: Xilinx ** \ \ \/ Version: 1.0 ** \ \ Filename: spi_hello_readme.txt ** / / ** /___/ /\ ** \ \ / \ ** \___\/\___\ ** **Device: **Purpose: **Reference: ** ******************************************************************************* ** ** Disclaimer: LIMITED WARRANTY AND DISCLAIMER. These designs are ** provided to you "as is." Xilinx and its licensors make and you ** receive no warranties or conditions, express, implied, ** statutory or otherwise, and Xilinx specifically disclaims any ** implied warranties of merchantability, noninfringement, or ** fitness for a particular purpose. Xilinx does not warrant that ** the functions contained in these designs will meet your ** requirements, or that the operation of these designs will be ** uninterrupted or error free, or that defects in the Designs ** will be corrected. Furthermore, Xilinx does not warrant or ** make any representations regarding use or the results of the ** use of the designs in terms of correctness, accuracy, ** reliability, or otherwise. ** ** LIMITATION OF LIABILITY. In no event will Xilinx or its ** licensors be liable for any loss of data, lost profits, cost ** or procurement of substitute goods or services, or for any ** special, incidental, consequential, or indirect damages ** arising from the use or operation of the designs or ** accompanying documentation, however caused and on any theory ** of liability. This limitation will apply even if Xilinx ** has been advised of the possibility of such damage. This ** limitation shall apply notwithstanding the failure of the ** essential purpose of any limited remedies herein. ** ******************************************************************************* Application: spi_hello ----------------------- We will configure the FPGA, download code, and view the resulting output. The spi_hello application is meant to reside in the SPI flash memory device and be used with the SPI serial Flash configuration mode of the Virtex-5. However, before programming the SPI flash with this application, we will test it by initializing the instruction and data memories with a download cable. Once satisfied with the behavior of the program, we will program the SPI flash with the application and re-check its behavior. CONFIG Switch Settings: 00010101 1. Connect the Host PC to the ML507 (J1 header) using a PC-IV or Platform USB JTAG cable 2. Connect the Host PC serial port to the ML507 serial port using a null modem cable and launch a terminal program on the Host (eg. TeraTerm) with the settings: 9600 baud, 8-N-1, No flow control 3. Connect the ML507 to a DVI monitor or to a VGA monitor with the appropriate adapter 4. Launch XPS and open the ML507 EDK project (ml507_bsb_system.xmp) 5. Launch a Shell window using XPS menu selection: Project > Launch EDK Shell 6. Download bitstream in shell window by typing: impact -batch etc/download.cmd 7. XPS menu selection: Debug > Launch XMD 8. At XMD% prompt type: cd microblaze_0/code 9. At XMD% prompt type: rst 10. At XMD% prompt type: dow spi_hello.elf 11. At XMD% prompt type: con 12. We have just configured and downloaded the spi_hello application using the JTAG cable. The resulting output is shown below. LCD Output: ----------- Design Loaded Using SPI Mem_ Serial Port Output: ------------------- The FPGA has been configured from the SPI memory (SPI Config Mode) DVI/VGA Output: --------------- The FPGA has been configured from the SPI memory (SPI Config Mode) ****************************************************************************** The iMPACT tool can be used to program the SPI Flash memory ****************************************************************************** 1. Un-power the board and remove the CF card from the board 2. Disconnect the cable attached to header J1 (the header on the left side of board) from the Parallel Cable IV or Platform Cable USB 3. Attach the flying wire adapter to the Parallel Cable IV or Platform Cable USB 4. Connect the JTAG flying wires from the Parallel Cable IV or Platform Cable USB to header J2 (7-pin header to the right of the FPGA) Note: There is a J2 header pin description labeled J2 SPI PROG just above and to the left of the FPGA that shows how to connect the flying wires to the header pins 5. Set the CONFIG DIP switch CONFIG Switch Settings: 00010101 6. Apply power to the board 7. Open a DOS command shell 8. cd 9. Copy the bit file destined for the SPI flash to copy \.bit . 10. Create an MCS file. This will be used to program the SPI flash device promgen -spi -p mcs -o .mcs -s 16384 -u 0 .bit 11. Launch iMPACT and use its GUI to program the SPI Flash device by double- clicking on the "Direct SPI Configuration" in the iMPACT Modes window 12. Right-click in the "Direct SPI Configuration" window and select "Add SPI Device..." 13. Navigate to .mcs created above and open it 14. In the "Select Device Part Name" pull-down dialog box, select M25P16 and click "OK" 15. The "Direct SPI Configuration" window, will show a diagram with a single SPI PROM drawn. Right-click on the SPI PROM and select "Program", 16. Click "OK" to program the SPI Flash device 17. Set the CONFIG DIP switch CONFIG Switch Settings: 00000101 18. Press the PROG pushbutton to configure the Virtex-5 from the SPI flash 19. In approximately 6 seconds the design will finish loading and begin to run. The resulting output of configuring the Virtex-5 using the SPI flash should match the initialization via download cable results shown above.