How to Program Xilinx ML403 Embedded Platform with Compact Flash Card
In this tutorial I am going to show how to program Xilinx Virtex 4 FPGA on the ML403 Developmnet Board with Compact Flash card.
There are three method to program Virtex-4 FPGA on Xilinx ML403 Embedded platform, a) usign JTAG download cable , b) using Platform Flash and c) using Compact flash card with Xilinx System ACE Interface.
The System ACE configuration management system allows the user to store hardware and software information on a CompactFlash device and use it to program one or more devices via JTAG. The ML40x platform uses the System ACE chip in conjunction with standard CompactFlash cards to enable hardware and software programming of the FPGA. More information about the System ACE interface is available from http://www.xilinx.com/systemace
The Xilinx System ACE CompactFlash (CF) configuration controller allows a Type I or Type II CompactFlash card to program the FPGA through the JTAG port. and supports up to eight configuration images on a single CompactFlash card.
In this tutorial I will show how to program a simple Johnson counter design on FPGA via System ACE Interface.
Design and Implement Johnson Counter Example
The design case in this tutorial is a simple Johnson Counter that works with the board push bottoms and general purpose LEDs. the Design example are available in Xilinx ISE example designs. from File => Open Example => Johnson Counter (Verilog/Schematic)
Since the counter light the LED with the reference clock cycle in the ML403 board (100MHz) you can not see the transaction between states in that clock speed. so we need to add some part to the Schematic part of the design project to reduce Johnson counter clock.
As you can see in my schematic Figures , I have inserted a 16-bit counter cascaded by a 8-bt counter (with RED color in figure) to reduce the frequency of General System clock.
After inserting additional counters (cc16ce + cc8ce) and connect them to the other part of the circuit you can flow the design process for FPGA development in ISE.
When you have done all steps including Synthesis and Implementation, you can generate programmable file (.bit file) that used for programming FPGA.
You can also use my project files if you don't like to redesign ISE example but it is not recommended. my project design file is :
jc2_test.tf ( testbench )
jc_top.sch ( top module schematic )
jc_top.bit (design .bit file)
jcounter.v (Johnson Counter Verilog model)
myucf.ucf (ucf file that include pin assignments on ML403 board)
Convert .bit file to appropriate .ace file
Xilinx ML403 System ACE Interface can program FPGA from CompactFlash (CF) card. The FPGA program file should convert to appropriate .ace file for this work. Xilinx iMPACT can generate .ace file from GUI interface it isn't work on Xilinx ML403 board.
We use a tcl file for generating .ace file (called genaca.tcl) with the following command :
You can run this command in CMD after swiitching to appropirate directory that include genace.tcl and your .bit file. Also you can download genace.tcl from here.
xmd -tcl genace.tcl -jprog -board ml403 -hw bitfile.bit -ace acefile.ace
After running this command in CMD you can find your ace file in the directory. in our Johnson counter example the ace file is counter.ace and you can download it from here.
Copy ace file to CompactFlash
you will need a CompactFlash card reader, for uploading the design and flash images. This is quite inexpensive, and you can find it in most computer stores. One like this would be ok.
Now, we copy the hardware design file (counter.ace) to the directory ml403/myace/ of the CompactFlash card. After doing this, we have to rename the file that was in this directory: system_my_ace.ace to system_my_ace.bak. This last step is important, as it only has to be one .ace file in this directory.
OK, we are done with the Compact Flash card. Now, we can extract it safely from the reader and connect it to the ML-403 board. Before switching on the board power, make sure that the 6 DIP switches are switched off and the switch 12 is in the rightmost position, selecting the SYSACE controller, as you can see in figure.
Program FPGA with CompactFlash
Johnson Counter On ML403 video
Mirror on vimeo : http://vimeo.com/8556259
CopyRight @2010 Alireza Haghdoost , http://ce.sharif.edu/haghdoost