Skip to content

Latest commit

 

History

History
147 lines (113 loc) · 6.9 KB

Setup.md

File metadata and controls

147 lines (113 loc) · 6.9 KB

Tool Setup

This documents describes how to setup all tools on Linux/Ubuntu and on Windows. Here is a summary of the tools we need:

Ubuntu Virtual Machine

The easiest way to get all tools installed is to use the Ubuntu virtual machine provided at:

The user is de2lab and the password is de2lab. You need the free Virtual Box for this virtual machine. Note, that this VM is BIG. The downloaded file is 43 GB and the extracted virtual machine fills around 77 GB.

Use the File >> Import Appliance... option in Virtual Box, to extract the virtual machine from the image. Then start the virtual machine. In order to bridge the USB connection to your FPGA into the virtual machine, go to devices >> USB in the top of the virtual machine window and select the FPGA in the menu.

Chisel

Chisel is just a library for Scala. And Scala is just a language that executes on the Java virtual machine (JVM) and uses the Java library. Therefore, you need to have Java OpenJDK 8 or later (max 21) installed on your laptop.

For working on the command line you should also install sbt, the Scala build tool. Please note that installing sbt will make the IntelliJ-build process a lot easier as well.

A nice editor for Chisel/Scala is IntelliJ. At the first start of IntelliJ download the Scala plugin (at Download featured plugins).

Vivado

Vivado is the synthesize tool from Xilinx for the Basys3 FPGA board. The WebPACK edition is freely available at: https://www.xilinx.com/products/design-tools/vivado/vivado-webpack.html

  • Download Vivado WebPACK
    • You need to register with Xilinx
    • To save some space you can deselect all devices except Artix-7
  • For Linux the installer executable can be run with bash Xilinx...
  • Install cable drivers and Digilent board files (according to the above instructions)

Ubuntu/Linux

This is the log when I prepared the Ubuntu virtual machine for the DE 2 lab. It may be helpful to setup your Linux system for the DE 2 lab.

  • Install Ubuntu 18.04 LTS, max disc set to 80 GB and 4 GB for memory
  • uid: de2lab, pwd: de2lab
  • Set time and time zone (important for further installation!)
  • Settings - Power - Blank screen: never, Privacy - Aut. Screen Lock - OFF
  • Copy the chisel book onto the desktop
    • That is my current snapshot
  • Install Vivado (in home folder)
    • Install cable drivers
    • Get digilent board definitions
  • Install Java JDK and other tools with:
  • sudo apt install openjdk-8-jdk git make gtkwave
  • Install sbt according to the instructions from sbt download
  • Install IntelliJ and the Scala plugin with a launch shortcut in favorites
  • Shortcut to GtkWave on desktop

Instead of running the apt commands manually you can also run the provided setup.sh.

Windows 10

  • Install Vivado (see above) and the Digilent board files
  • Install OpenJDK 8 or later (up to 17) from AdoptOpenJDK
  • Install sbt
  • Install IntelliJ
    • The community edition
    • Include Create Desktop Shortcut
  • Start IntelliJ to finish the setup
    • Select the light UI theme (if you prefer)
    • On the featured plugins select Install for Scala
    • When importing a project, select the JDK you installed before
      • On Project JDK select New
      • Select JDK
      • Select the path to your OpenJDK 8 installation, usually something like C:\Program Files\AdoptOpenJDK\jdk-8.0.232.09-hotspot\
  • Download the GTKWave binaries
    • Select the latest release that matches the pattern gtkwave-{release number}-bin-win32
    • Extract the downloaded .zip into a directory of choice
    • Run the executable gtkwave.exe in the folder gtkwave\bin\
    • Put a link to the executable on the desktop
  • Copy the PDF of the Chisel Book on the desktop
  • Install a git client
    • If you have no prior experience using git, check the followings links for an introduction to the git workflow and the advantages of version-control systems. 1, 2. Do note that most git tutorials emphasize command line usage, but this is by no means a must. There exist several great GUI git clients, examples of which are Github Desktop and Fork.

The installation can be checked with the first exercise in the lab. Or a quick, partial check with following commands in the Windows Powershell:

javac
sbt

macOS

Vivado is not supported under macOS, however, the Chisel tool flow runs fine on the Mac. You can simulate your design on the Mac and use a virtual machine (e.g., with Ubuntu) to synthesize your design with Vivado.

  • Install OpenJDK 8 or later (up to 17) from AdoptOpenJDK
  • Install sbt with brew install sbt
  • Install GTKWave
    • For MacOS 14 following installation is possible:
    • brew install --HEAD randomplum/gtkwave/gtkwave
    • see this issue
  • Install IntelliJ
    • The community edition
    • Include Create Desktop Shortcut
  • Start IntelliJ to finish the setup
    • Select the light UI theme (if you prefer)
    • On the featured plugins select Install for Scala
    • When importing a project, select the JDK you installed before
      • On Project JDK select New
      • Select JDK
      • Select the path to your OpenJDK installation

Mac with Arm chip (M1, M2, or M3)

  • To run Vivado on a Mac with an Arm chip see MacM1.md.

Common Error

Here we collect common issues when installing the tools. Also refer to the FAQ