Installing the Spartan 3A evaluation kit mini-port
From Milkymist Wiki
This is a tutorial about how to install Milkymist on the Spartan 3A evaluation kit.
You can find information about this board here. You can still buy it, it's pretty cheap ($49).
The avnet-sp3aevl port of Milkymist is now maintained by Yann Sionneau (aka Fallenou on Freenode #milkymist).
You can contact him if you have any question about this port or how to install it at
The git repository is available here : http://github.com/fallen/milkymist-avnet
Contents |
[edit] Checkout the git repository
- Be sure to have the git tool installed in your computer
- Git can be installed this way under debian (and ubuntu) :
# apt-get update && apt-get install git-core
- clone the git repository of the avnet-sp3aevl port of Milkymist :
$ git clone git://github.com/fallen/milkymist-avnet.git
[edit] Install the LatticeMico32 GCC toolchain
You can :
- either build your own Mico32 toolchain, for more information read the page Compiling a lightweight Mico32 toolchain
- or install pre-compiled binary from Milkymist repository, which is faster and simpler, but is only available as debian (.deb) packages
To install the pre-compiled binary you can :
- Add this line to your /etc/apt/sources.list :
deb http://www.milkymist.org/debian/ ./
- Type these commands as super-user to install :
# apt-get update # apt-get install gcc-lm32
- You can also install
gtkterm
which is a serial console terminal software, useful to interact with Milkymist on the Spartan 3A evaluation kit board :
# apt-get install gtkterm
[edit] Install Xilinx Synthesis Tools (XST)
- Click on the "Download ISE WebPACK software for Windows and Linux" link
- Register yourself and signin
- Download the "SW, ISE WebPACK 11.1 Single File Download Image" or newer (~ 2,67 GB)
- Get a license (Xilinx e-mails it to you)
- Install ISE WebPACK in your computer
[edit] Install ASTriAEKiPro
- This software is used to send the bitstream (FPGA design file) to the FPGA, and to send the bios into the parallel flash memory chip which is on-board.
- A debian (.deb) package is available at this address
- At the moment the latest version is 1.2.1
- Download the debian package and install it like this :
# dpkg -i astriaekipro_1.2.1-2_i386.deb
[edit] Get the BPI server bitstream
- Go to Avnet webpage for the Spartan 3A Evaluation Kit http://www.em.avnet.com/spartan3a-evl
- Click on the "Support Files & Downloads" link at the bottom of the page
- Register yourself and signin
- Download the "Avnet Programming Utility 3.41i"
- At this point you have several choices :
- Install it on a Microsoft Windows and get the file
bpi_server_v036.bit
from theProgram Files\Avnet\AvProg
directory
- Install it on a Microsoft Windows and get the file
- Install it on Linux using WINE and get the file
bpi_server_v036.bit
from the ~/.wine/drive_c/Program Files/Avnet/AvProg directory
- Install it on Linux using WINE and get the file
- Install the unshield tool to extract the desired data from the data1.cab :
# apt-get install unshield $ unzip AvProg_v341i_setup.zip $ unshield -g "App Executables" x data1.cab
- Now you have the
bpi_server_v036.bit
file, you can delete the other unneeded files
[edit] Build Milkymist
- Go to your Milkymist source code top directory
- Tell your system about the Xilinx Synthesis Tools (XST) :
$ source path/to/your/Xilinx/ISEWebPACK/Installation/Xilinx/11.1/settings32.sh
- Build Milkymist's FPGA design bitstream (system.bit) :
$ ./build_bitstream.sh
- Build Milkymist's bios :
$ ./build_bios.sh
[edit] Load Milkymist's design into FPGA
- Go to the build dir (which contains the system.bit) :
$ cd boards/avnet-sp3aevl/synthesis/build
- You may want to just load the design into the FPGA via Slave Serial (if you power cycle the board, Milkymist will be wiped out from the board) :
~/milkymist-avnet/boards/avnet-sp3aevl/synthesis/build$ astriaekipro -s -p /dev/ttyACM0 -b system.bit
- Or load the design into the SPI Flash (the design will stay even if you power cycle the board) :
~/milkymist-avnet/boards/avnet-sp3aevl/synthesis/build$ astriaekipro -w -p /dev/ttyACM0 -b system.bit
[edit] Load Milkymist's bios into parallel flash memory chip
- Load the BSP server into the FPGA via Slave Serial :
~$ astriaekipro -s -p /dev/ttyACM0 -b bpi_server_v036.bit
- Go to the bios directory :
~$ cd ~/milkymist-avnet/software/bios
- Erase the parallel flash memory chip on-board :
~/milkymist-avnet/software/bios$ astriaekipro -p /dev/ttyACM0 -E
- Load the bios into the parallel flash memory chip on-board :
~/milkymist-avnet/software/bios$ astriaekipro -b bios.bin -W --bpi-mode=direct -p /dev/ttyACM0
[edit] Power cycle the board
- Just power cycle the board and you are good to go !
- You can now access Milkymist's bios launching gtkterm, just configure the port to be /dev/ttyACM0 and speed 115200 8,N,1