Instructions for running an example on the board

 

 

 


 

1.0 Resources and tutorials

 

a)    The development board (TLL6219) has a Xilinx SPARTAN 3 FPGA and an ARM9 processor which will be used for the project

b)    Tutorials

·         Xilinx ISE: http://direct.xilinx.com/direct/ise9_tutorials/ise9tut.pdf

·         Overview of the board: /scratch/Documentation/TLL6219_Getting_Started_Manual_ver2.2_28Dec2007.pdf

·         Writing applications on the ARM platform: /scratch/Documentation/MC9328MX21RM.pdf (page 87 for memory map)

c)    Files for FPGA, original_top.v, top.ucf (usage will be explained in the next section)

 


 

2.0 Example: This example takes two integers as inputs and gives their sum as the output. The addition takes place in the FPGA which is called from the software.

 

a)    Software part

·         Download the example zip file into your directory

·         Do the following steps to unzip and compile the code

o        tar zvxf software_example.tar.gz

o        cd software_example

o        source /scratch/arm_linux_setup.sh

o        make

·         The makefile uses arm-linux-gcc to compile the code and arm-linux-strip to eliminate the unnecessary libraries

·         When compiled with `make` , will produce the `example` executable which can be run on the ARM board

·         HAL

o        In example.c, we have the HAL

o        The HAL consists of the addresses (addr0 to 2) and the corresponding code to access these addresses

o        The comments in example.c explain the process of sending the data through the HAL to the board and reading the result back to the software

o        The hardware described in 3.0.b will return the sum of the values in addr1 and addr2 whenever addr0 is read by the software. The HAL makes use of this setup to perform the addition.

 

b)    Hardware part

·         The hardware will read the values in addr1 and addr2, perform the addition and return the result, whenever addr0 is read by the software

·         top.v performs this functionality

o        This file is a modified version of original_top.v given in section 2.0.e

o        The state machine in original_top.v is modified to perform the addition process

·         STATE 6 performs the addition

·         We use Xilinx ISE for the synthesis and the generation of bit file which can then be downloaded to the FPGA. Here are the steps to working with the ISE.

o        Create a new project with following properties

·         Family: Spartan3

·         Device: XC3S1500

·         Package: FG676

·         Speed: -4

o        After clicking next twice, in the `Add existing Sources` tab, add both top.v and top.ucf files from your directory

·         Once you `finish` creating the project, you will see several small windows. In the `Processes` window, under `Generate Programming File`, double-click on `Programming File Generation Report`. This will synthesize, implement and finally generate the bit file.

·         The bit file (top.bit) will be generated in your project directory

 

c)     Combining both the software and the hardware (this needs to be performed in the ENS first floor lab, with the board)

1.     After the bit file is generated from the previous step, use Xilinx iMPACT to download it onto the board

a.     In the Xilinx ISE, under `Generate Programming File`, double-click on `Configure Device (iMPACT)`

b.     Retain the default values in the dialog box and click `Finish`

c.      Press the `Cancel` option on all the three dialog boxes that follow. This is very important or you might erase/overwrite stuff on the components of the board.

d.     Right-click on the xc3s1500 device. It will ask for a new configuration file, select the bit file that was generated in 3.0.b

e.     Select the xc3s1500 device and double-click on the `Program` option in the `Processes` window

                                                                                          i.      Click on `Ok` in the dialog box that appears, retaining the default options. You should now see a `Program Succeeded` message displayed

 

2.     This step involves pages 7 to 11 of the pdf document /scratch/Documentation/TLL6219_Getting_Started_Manual_ver2.2_28Dec2007.pdf

a.     Perform the steps in page 7 till 11

                                                                                          i.      This will power-on the board and start the HyperTerminal for communication with the ARM board.

b.     Type `startlinux` in the HyperTerminal

                                                                                          i.      This will bootup bare-bone linux (busybox) on the ARM processor

                                                                                        ii.      Use the `wget` command to download the software part which is the `example` executable into the filesystem from some public space

·         For eg. `wget http://www.cerc.utexas.edu/~rvemu/example`

 

3.     Now we have successfully setup the environment (hardware for running the software)

a.     In the HyperTerminal, go to the directory where you downloaded the `example`  executable

b.     Change permissions by doing a `chmod +x example`

c.      Do a `./example arg1 arg2` to execute the program. You should see the sum of arg1 and arg2 displayed on the console