Xilinx OpenSPARC Tutorial 2 Materials needed to complete this tutorial: 1) Xilinx ML505-V5LX110T board 2) Platform USB programming cable 3) 5V switching power supply 4) Null modem db9 serial cable 1GB (or greater) Compact Flash card loaded with OpenSPARC ACE files 5) Windows PC with 2-3GB of physical memory 6) Telnet software such as HyperTerminal included in windows XP or Tera Term Pro 2.3 which can be downloaded from here http://hp.vector.co.jp/authors/VA002416/teraterm.html 7) Xilinx 10.1 ISE and EDK software. http://www.xilinx.com/tools/designtools.htm http://www.xilinx.com/ise/embedded/edk_pstudio.htm http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/est_rm.pdf 8) OpenSPARC T1 version 1.7 located http://www.opensparc.net/opensparc-t1/download.html 9) OpenSPARC_DVGuide.pdf located in the “doc” folder in the “OpenSPARCT1.1.7” directory in the design downloaded from OpenSPARC web page. 10) (optional) Getting Started Tutorial located at http://www.xilinx.com/products/boards/ml505/reference_designs.htm This guide is not specific for OpenSPARC design but does gives some details of the Xilinx ML505-V5LX110T board. Create ACE file from the generated Bit file for Xilinx FPGA and load into compact flash card: 1) Open Impact ISE software by clicking start All Programs Xilinx ISE Design Suite 10.1 ISE Accessaries Impact. 2) Create new project. Click OK 3) Prepare a System ACE File, Click Next 4) Novice, Click Next 5) Size is Generic, Reserve space is 0, Click Next 6) Specify Ace file name and location for file, click next 7) Specify Configuration Address for rev0 only. Click Next 8) Click Finish 9) Click OK 10) Locate generated bit file and click open 11) May receive Warning which can be ignored for now. Click OK 12) Click No to add another design file. 13) Right click component and click on generate file from drop down list. 14) Click OK 15) Backup CF card information by copying to PC. 16) Navigate to folder were ACE file was generated and copy to rev0.ace to rev0 directory on CF card replacing existing file. 17) Know when Xilinx board is booted with CF card and set to boot from cfg location 0 the ace file will load the bit file into the FPGA. Software is added separately at this point and will be run on the configured FPGA hardware. Running Diagnostics on FPGA board: 1) Run Terminal Window program as described before. 2) Turn on evaluation board and boot rev0 configuration file off CF card. 3) Press SYSACE reset button shown below. 4) Start Xilinx EDK platform Studio. 5) Launch XMD by click Debug Launch XMD as shown below. 6) The following window will open as shown below 7) Download firmware by typing “XMD% dow ccx-firmware-diag/executable.elf” 8) Wait 30-40 secs and the screen below will then appear. 9) To run Diagnostics type “XMD% run” and the terminal window should display the following output. 10) Done Running Example Hello World Standalone program on FPGA board using XMD and CF card Bit file: 1) Run Terminal Window program as described before. 2) Turn on evaluation board and boot rev0 configuration file off CF card. 3) Press reset button. (reset pic here) 4) Start Xilinx EDK platform Studio. 5) Launch XMD by click Debug Launch XMD as before. 6) Download firmware by typing “XMD% dow ccx-firmware/executable.elf” 7) Wait 15-20 secs and for download to complete. 8) Download firmware by typing “XMD% dow -data examples/bin/hello_world.mem.image.gz 0x8af00000” 9) Wait 1 second for download to complete. 10) Download firmware by typing “XMD% dow -data os/proms/1c4t_prom.bin 0x8ff00000” 11) This will take up to 2.5 minutes for download to complete. 12) To run “Hello World Program” type “XMD% run” and the terminal window should display as before. Creating Hello World ACE file: (review section 6.4 of the DV_Guide) 1) Compile “Hello World” Program: To change the example program, make scripts are included to make it easy to re-compile the example program. File location is DV_ROOT\design\sys\edk\examples\bin. The make must be run on a SPARC machine with SunStudio compilers. Currently Looking for a x86/x64 work around for this. A pre-built memory image of the “Hello World” program is included in the EDK project. For now use the pre built image. 11) Compress the application program: a. Launch XMD by click Debug Launch XMD as before in Tutorial 1. b. Change direct to DV_ROOT\design\sys\edk\examples\bin by typing “cd examples\src\hello_world”. Command “ls –al” will list the contents of the current directory. Make sure “hello_world.mem.image” is present in directory. c. To compress the application programs, run the following command type “gzip hello_world.mem.image”. This will replace the image file with hello_world.mem.image.gz. Make a copy if you want to keep uncompressed image file. 12) Generate Ace file with Hello World Program in ram disk space: (Review “Embedded system Tools Reference Manual” chapter 12 for explanation of the following commands. Link is provided above or search Xilinx web page.) Type “xmd -tcl genace.tcl -jprog -target mdm -board ml505 -hw bitfiles/Gnerated/system.bit -elf ccx-firmware/executable.elf -data os/proms/1c4t_prom.bin 0x8ff00000 -data examples/bin/hello_world.mem.image.gz 0x8af00000 -ace hello_world_example.ace” Should see the following: 13) Tutorial 2 is complete. In the directory SYS\EDK\OS\ are 3 folders where Open Solaris Ram disk, Ubunto ram Disk, and Proms exists. The Proms folder has several proms describe in section 6.4.1 of the DV_Guide for multi core and multi thread support. I tried 1 core and 1 thread which worked and 1 core and 4 threads which worked also. I was unable to get the 2 core 4 thread prom to work completely. Not sure why. To boot Open Solaris requires the OBP prom with the ram disk image located in the Open Solaris directory placed into the Ram Disk Space. Below is the memory map from section 6.4 of the DV_Guide. 14) Verify the new ace file works: a. Locate generated file (should be EDK directory) and copy the to the rev2 directory on the compact flash card. b. Set the dip switches of SW3 to “01010101” on the evaluation board to boot and load the rev2 ace file. c. Insert the compact into the evaluation board and power on. (Sometimes the reset switch may need to be pressed if board does not load after power up.) d. Check to see that you get the same output as before in tutorial 1. 15) Done