Skip to content

Latest commit

 

History

History
259 lines (193 loc) · 8.27 KB

readme.md

File metadata and controls

259 lines (193 loc) · 8.27 KB

HDL tools install

Tools list:

  • Intel Quartus Prime Lite & Mentor Modelsim ASE
  • Icarus Verilog
  • GTKWave
  • RISC-V toolchain
  • Visual Studio Code & extensions
  • Make
  • Git

Supported OS:

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Windows 10 2004

You can choose any way of installation:

  1. Ubuntu automatic install (preferred)
  2. Virtual machine with preinstalled HDL tools (Ubuntu)
  3. Ubuntu manual install
  4. Windows 10 install

Ubuntu automatic install

Installation example video

  1. Download schoolRISCV and launch installation

    sudo apt install make git
    git clone https://github.com/zhelnio/schoolRISCV
    cd schoolRISCV/install
    make install
  2. Log out & log in again to apply profile settings changes

Virtual machine with preinstalled HDL tools

VM import example video

  1. Download & Install Oracle VM VirtualBox

  2. Download virtual machine image (Ubuntu 18.04 or Ubuntu 20.04)

  3. VirtualBox --> File --> Import Appliance

  4. Select dowloaded virtual machine .OVA file --> Next --> Import

  5. Log in into virtual machine

  6. Open Terminal on schoolRISCV folder and run

    git pull
    

Ubuntu manual install

  1. common dev tools, open source simulator & waveform viewer

    sudo apt-get --yes install git make iverilog gtkwave
  2. Download schoolRISCV

    git clone https://github.com/zhelnio/schoolRISCV
  3. Java runtime environment (if not installed) to run RARS

    sudo apt-get --yes install default-jre
  4. RISC-V toolchain

    # Ubuntu 18.04
    sudo apt-get --yes install gcc-riscv64-linux-gnu
    # Ubuntu 20.04
    sudo apt-get --yes install gcc-riscv64-unknown-elf
  5. Visual Studio Code & extensions

    sudo apt-get --yes install snap
    sudo snap install code --classic
    code --install-extension ms-vscode.cpptools
    code --install-extension zhwu95.riscv
    code --install-extension eirikpre.systemverilog
  6. Quartus Lite

    • install Quartus dependency packages

      sudo dpkg --add-architecture i386
      sudo apt update
      sudo apt-get --yes install libc6:i386 libncurses5:i386 libxtst6:i386 libxft2:i386 libc6:i386 libncurses5:i386 libstdc++6:i386
    • download Quartus Prime Lite from https://fpgasoftware.intel.com/20.1/ (Edition: Lite -> Release: 20.1 -> Operation System: Linux -> Combined Files;)

    • unpack .tar & run installation

      tar -xf Quartus-lite-20.1.0.711-linux.tar
      ./setup.sh
    • select set of required options in the installer GUI:

      • Installation directory: /home/user/intelFPGA_lite/20.1
      • Quartus Prime
      • Quartus Prime Help
      • Cyclone IV
      • Cyclone V
      • MAX 10 FPGA
      • Modelsim Intel FPGA Starter Edition (Free)
    • copy schoolRISCV/install/files/quartus.sh to /etc/profile.d/ to add Quartus & Modelsim binary to $PATH, replace /home/user/intelFPGA_lite/20.1 with the actual one if required

      # /etc/profile.d/quartus.sh
      export PATH=$PATH:/home/user/intelFPGA_lite/20.1/quartus/bin
      export PATH=$PATH:/home/user/intelFPGA_lite/20.1/modelsim_ase/bin
    • copy Linux device manager settings file schoolRISCV/install/files/100-altera.rules to /etc/udev/rules.d/

      # /etc/udev/rules.d/100-altera.rules
      # USB-Blaster
      SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE:="0666", SYMLINK+="usbblaster/%k"
      SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE:="0666", SYMLINK+="usbblaster/%k"
      SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE:="0666", SYMLINK+="usbblaster/%k"
      
      # USB-Blaster II
      SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE:="0666", SYMLINK+="usbblaster2/%k"
      SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE:="0666", SYMLINK+="usbblaster2/%k"
    • restart Linux device manager

      sudo service udev restart
    • copy files/.modelsim to /home/user to change default Modelsim font settings

  7. Log out & log in again to apply profile settings changes

Windows 10 install

Installation example video

  1. Install Ubuntu 18.04 or 20.04 on Windows Subsystem for Linux (Guide)

    • Enabling WSL in Windows 10

      • Open the Start Menu and search Turn Windows features on or off
      • Select Windows Subsystem for Linux
      • Click OK
      • Restart your computer when prompted
      • download & install X-server to launch Linux GUI programs: https://sourceforge.net/projects/vcxsrv/
    • Installing Ubuntu on WSL via the Microsoft Store

      • Open the Microsoft Store
      • Search for "Ubuntu"
      • Install "Ubuntu 20.04 LTS"
      • Launch Ubuntu 20.04 LTS
      • Create new user and set its password
  2. Automatic Ubuntu package install & settings update

    • Launch Ubuntu 20.04 LTS and use its command prompt to run automatic install

      sudo apt update
      sudo apt install make git
      git clone https://github.com/zhelnio/schoolRISCV
      cd schoolRISCV/install
      make install
  3. Or Manual Ubuntu package install & settings update

    • common dev tools, open source simulator & waveform viewer

      sudo apt update
      sudo apt-get --yes install git make iverilog gtkwave
    • Java runtime environment (if not installed) to run RARS

      sudo apt-get --yes install default-jre
    • RISC-V toolchain

      # Ubuntu 18.04
      sudo apt-get --yes install gcc-riscv64-linux-gnu
      # Ubuntu 20.04
      sudo apt-get --yes install gcc-riscv64-unknown-elf
    • Download schoolRISCV

      git clone https://github.com/zhelnio/schoolRISCV
    • Change WSL settings:

      # change owner of files that were created by windows programs in WSL filesystem
      # from 'root' to WSL user
      sudo cp schoolRISCV/install/files/wsl.conf /etc/
      # WSL 1 profile settings to set DISPLAY for X apps
      sudo cp schoolRISCV/install/files/wsl.sh /etc/profile.d/
  4. Visual Studio Code

    • Download windows installer from https://code.visualstudio.com/Download
    • Install Visual Studio Code
    • Run Visual Studio Code
    • Install Extensions:
      • ms-vscode.cpptools
      • zhwu95.riscv
      • eirikpre.systemverilog
      • ms-vscode-remote.remote-wsl
  5. Quartus Lite

    • download and install 7-zip

    • download Quartus Prime Lite installation package from https://fpgasoftware.intel.com/20.1/ (Edition: Lite -> Release: 20.1 -> Operation System: Windows -> Combined Files)

    • Extract downloaded Quartus-lite-20.1.0.711-windows.tar using 7-zip

    • launch the installation Quartus-lite-20.1.0.711-windows/setup.bat

    • select set of required options in the installer GUI:

      • Installation directory: C:\intelFPGA_lite\20.1
      • Quartus Prime
      • Quartus Prime Help
      • Cyclone IV
      • Cyclone V
      • MAX 10 FPGA
      • Modelsim Intel FPGA Starter Edition (Free)
      • Launch USB Blaster II driver installation
    • add Quartus & Modelsim binary to PATH Environment Variable:

      • System -> Advanced System Settings
      • Advanced -> Environment Variables -> User variables for user -> Path -> Edit
      • New -> Browse -> C:\intelFPGA_lite\20.1\quartus\bin64
      • New -> Browse -> C:\intelFPGA_lite\20.1\modelsim_ase\win32aloem (added by installer)
  6. Sign out & log in again to apply profile settings changes