Skip to content

Flashing

Håvard O. Nordstrand edited this page Nov 25, 2019 · 12 revisions

Linux

Installation

Setup of Vivado etc. so that our makefile can build and flash the whole FPGA project. Tested with Kubuntu and Manjaro.

  1. Install Vivado:
    1. Register for a Xilinx account.
    2. Go to Xilinx downloads and download Vivado Design Suite net installer.
    3. Run the installer file as root (sudo).
    4. Product: Select "Vivado" and then "Vivado HL WebPACK".
    5. Components: Select Vivado and support for "7 Series" devices (if you're using an Artix 7).
    6. Install to /opt/Xilinx.
  2. Install the cable drivers:
    1. Go to /opt/Xilinx/Vivado/<version>/data/xicom/cable_drivers/lin64/install_script/install_drivers.
    2. Run install_drivers as root. (Maybe run one of the other scripts too, they seem to do the same thing.)
  3. Install verilator.
  4. Install yosys.
  5. Install sbt (package or manually).
  6. Install firrtl (package or manually) (requires verilator, yosys and sbt).
    1. If manually installed, add /opt/firrtl/utils/bin (or wherever you installed it) to PATH.
  7. Install libtinfo5 (Debian) or ncurses5-compat-libs (Arch AUR).

Building and Uploading

  1. Build it: Run make inside the repo.
  2. Connect the Xilinx flasher. The light should glow orange when not connected to the board and green when connected to the board. It may not light up until after you've tried to flash it once.
  3. Run make upload or make flash.
    1. upload writes to the FPGA, but the program gets deleted when the board loses power
    2. flash writes to the FLASH chip, making it the default program when the FPGA starts. This takes some time.
    3. If it complains about an incompatible bitstream, you're probably trying to flash it with the bitfile for the dev kit, or vice versa.
    4. If it can't find the device, try again. Try another USB port. Then try turning the board off and on again.

Clone this wiki locally