Saturday, March 17, 2012

Howto boot ELF for Xilinx from CompactFlash

SystemACE is used for power-on boot in Xilinx FPGAs. It configures the FPGA with hardware configuration BIT file and loads the user program from Compact Flash. For this purpose, the hardware configuration BIT file and ELF image of user program are combined into ACE file and kept into CF card. I have been booting my software on MicroBlaze as well as PowerPC PPC440 processors based boards using Compact Flash. Let me explain the steps for ML605 board. This applies to almost all boards such as ML507, SP605.

① Make sure that you've restored the contents of CF card shipped with the board, if you have changed that.

② Compile your program and create ELF image. Make sure that the vector table is placed exactly at the Reset vector of the CPU. For example, the vector table should be placed at 0x00000000 address for MicroBlaze.

③ Copy the ELF file into the "implementaion" directory inside the parent directory of Xilinx Design. For example, if you have your design in "C:\ML605_design" directory, copy the ELF file into "C:\ML605_design\implementation".

④ Open "ISE Design Suit Command Prompt" as follows:
Start→Programs→Xilinx ISE Design Suite 13.4→Accessories→ISE Design Suit Command Prompt
Or, open XMD consloe window in Xilinx SDK.

⑤ Go to the implementation directory in command prompt.
For example, use the command "cd C:\ML605_design\implementation".

⑥ Execute the following command to create ACE file. (Change the underscored parameters according to your envinronment)
xmd -tcl genace.tcl -hw download.bit -elf myprog.elf -ace myace.ace -board ml605 -target mdm

⑦ Copy the created ACE file myace.ace to any one of configuration directory in Compact Flash.
For example, "XILINX\cfg0" or "XILINX\cfg1".. etc.

⑧ Configure the DIP switch according to the configuration directory you have placed the ACE file. (Better to execute one of the demo placed on the CF card and replace it with your ACE file)

⑨ Switch on the board.

Check with the following document about restoring the flash contents and DIP switch setting for ML605.
ML605 Restoring Flash Contents:
http://www.xilinx.com/support/documentation/boards_and_kits/xtp055.pdf
About SystemACE:
ftp://ftp.xilinx.com/pub/documentation/misc/system_ace.pdf

Put your comments!

1 comment:

Mike Caffrey said...

thank you for this description, it is very difficult information to find. Worked for me first time - Mike