Difference between revisions of "Rocking FPGA SAO Installation"

From Open Hardware Miniconf
Jump to: navigation, search
Line 2: Line 2:
  
 
'''GitHub repository:''' [https://github.com/geekscape/ohmc2022-firmware https://github.com/geekscape/ohmc2022-firmware]
 
'''GitHub repository:''' [https://github.com/geekscape/ohmc2022-firmware https://github.com/geekscape/ohmc2022-firmware]
 +
 +
This project utilizes the excellent prior work from the [https://workshop.fomu.im/en/latest FOMU FPGA] project ... with substantial addition work by [https://github.com/andykitchen/ohmc2022-firmware Andy Kitchen].
  
 
FPGA gateware and firmware for the Rockling FPGA SAO (''codec'' branch) currently supports the Theremin input (dual input frequency counters), the FPGA running a soft RISC-V processor and hardware peripherals.  However, the STGL-5000 audio codec IC integration is still a work-in-progress.
 
FPGA gateware and firmware for the Rockling FPGA SAO (''codec'' branch) currently supports the Theremin input (dual input frequency counters), the FPGA running a soft RISC-V processor and hardware peripherals.  However, the STGL-5000 audio codec IC integration is still a work-in-progress.
Line 23: Line 25:
 
     udevadm trigger
 
     udevadm trigger
  
= Download FPGA development software =
+
= Install DFU utility for flashing FPGA gateware (bitstream) =
 +
 
 +
    sudo apt-get install dfu-util  # Avoid using FOMU ToolChain version
 +
    dfu-util -l                    # Version 0.11
 +
 
 +
= Install build tools =
 +
 
 +
    sudo apt-get update
 +
    sudo apt-get install python3-venv
 +
    sudo apt-get install meson  # ninja-build
 +
 
 +
= Download and install FPGA development software =
  
 
     git clone https://github.com/geekscape/ohmc2022-firmware.git --branch codec
 
     git clone https://github.com/geekscape/ohmc2022-firmware.git --branch codec
 +
    cd ohmc2022-firmware
 +
    git submodule update --init --recursive
 +
 +
Create and prepare virtual environment
 +
 +
    rm -rf venv
 +
    ./setup-venv.sh  # Doesn't work if "oss-cad-suite/environment" and $PATH already set-up
 +
 +
Everything above here needs to be done just once ... now set-up and ready to go !
 +
 +
= Build Rockling FPGA gateware and firmware =
 +
 +
    source venv/bin/activate
 +
 +
    cd ..
 +
    source oss-cad-suite/environment
 +
    cd -
 +
 +
    export PATH=$HOME/play/fpga/fomu/fomu-toolchain-linux_x86_64-v1.6/bin:$PATH
 +
 +
    make all BITSTREAM_FLAGS="--with-analyzer"
 +
    # python rockling.py
 +
 +
= Download FPGA gateware (bitstream) on to Rocking SAO =

Revision as of 19:39, 12 March 2023

Overview

GitHub repository: https://github.com/geekscape/ohmc2022-firmware

This project utilizes the excellent prior work from the FOMU FPGA project ... with substantial addition work by Andy Kitchen.

FPGA gateware and firmware for the Rockling FPGA SAO (codec branch) currently supports the Theremin input (dual input frequency counters), the FPGA running a soft RISC-V processor and hardware peripherals. However, the STGL-5000 audio codec IC integration is still a work-in-progress.

Set-up USB hot-plug UDEV rules (for Linux only)

When the Rockling is connected to the computer's USB port, the dynamically created device file /dev/bus/usb/001/... will need to have the correct permissions set by the UDEV rules.

From FOMU workshop instructions

   sudo groupadd plugdev
   sudo usermod -a -G plugdev $USER

Log out and log in again

   sudo bash
   vi /etc/group  # Add users to "plugdev:x:46:$USER"
   vi /etc/udev/rules.d/99-fomu.rules
       SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5bf0", MODE="0664", GROUP="plugdev"
   udevadm control --reload-rules
   udevadm trigger

Install DFU utility for flashing FPGA gateware (bitstream)

   sudo apt-get install dfu-util  # Avoid using FOMU ToolChain version
   dfu-util -l                    # Version 0.11

Install build tools

   sudo apt-get update
   sudo apt-get install python3-venv
   sudo apt-get install meson  # ninja-build

Download and install FPGA development software

   git clone https://github.com/geekscape/ohmc2022-firmware.git --branch codec
   cd ohmc2022-firmware
   git submodule update --init --recursive

Create and prepare virtual environment

   rm -rf venv
   ./setup-venv.sh  # Doesn't work if "oss-cad-suite/environment" and $PATH already set-up

Everything above here needs to be done just once ... now set-up and ready to go !

Build Rockling FPGA gateware and firmware

   source venv/bin/activate
   cd ..
   source oss-cad-suite/environment
   cd -
   export PATH=$HOME/play/fpga/fomu/fomu-toolchain-linux_x86_64-v1.6/bin:$PATH
   make all BITSTREAM_FLAGS="--with-analyzer"
   # python rockling.py

Download FPGA gateware (bitstream) on to Rocking SAO