Skip to content

mmicko/fpga101-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

FPGA 101 - Workshop materials

This repo contains all needed material for participation at FPGA 101 Workshop at Hackaday event in Belgrade 26th of May 2018.

For all environments

You probably already have a favorite text editor on your computer ready, but in case it does not have Verilog language syntax hightlight, that could help you at least at start, install Visual Studio Code or Atom or any similar editor supporting it.

For Visual Studio Code use:

ext install mshr-h.VerilogHDL

For Atom use:

apm install language-verilog

Linux Install

First install required packages.

For Ubuntu use :

sudo apt install python-pip make git gtkwave

Also install Node.JS

curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt-get install nodejs

Download prepared package, and install APIO

cd ~ wget https://github.com/mmicko/fpga101-workshop/releases/download/tools/fpga101-linux-x64-tools.tar.gz tar xvfz fpga101-linux-x64-tools.tar.gz cd hackaday-fpga101 source fpga101.sh cd apio sudo pip install -e .

Install needed Node.JS packages for IceStudio

cd ../icestudio npm install

Windows Install

Download file from this link first.

Uze 7zip (can be downloaded from here) to unpack file (using right click -> 7-Zip -> Extract here )

Move that folder to root of C drive (mandatory due to location being hardcoded in part of msys install)

Go to c:\msys64 and click ConEmu.exe to get console.

Your profile will be generated and you will be greeted by next prompt.

[HACKADAY] C:\msys64\src>

macOS Install

First install Homebrew to be able to install rest of packages.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then you will be able to install Python 3 and Node.JS

brew install python brew install node brew install wget

Download prepared package, and install APIO

cd ~ wget https://github.com/mmicko/fpga101-workshop/releases/download/tools/fpga101-darwin-x64-tools.tar.gz tar xvfz fpga101-darwin-x64-tools.tar.gz cd hackaday-fpga101 source fpga101.sh cd apio sudo pip3 install -e .

Install needed Node.JS packages for IceStudio

cd ../icestudio npm install

Testing APIO environment

To test if all is setup correctly.

cd ~ git clone https://github.com/mmicko/fpga101-workshop cd fpga101-workshop/tests/led apio build 

response should be

[xxx xxx x hh:mm:ss yyyy] Processing fpga101 -------------------------------------------------------------------------------- yosys -p "synth_ice40 -blif hardware.blif" -q led.v arachne-pnr -d 5k -P sg48 -p pinout.pcf -o hardware.asc -q hardware.blif icepack hardware.asc hardware.bin ========================= [SUCCESS] Took 1.07 seconds =========================

To check if GTKWave is installed fine use

apio sim

And that would open GTKWave with simulation file.

Testing Risc-V compiler

cd ~ cd fpga101-workshop/tests/riscv make

response should be

riscv64-unknown-elf-gcc -O3 -nostartfiles -mabi=ilp32 -march=rv32ic -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -o firmware.elf start.s sections.c firmware.c -lgcc riscv64-unknown-elf-objcopy -O binary firmware.elf firmware.bin

Testing IceStudio

cd ~ cd hackaday-fpga101/icestudio npm start

Should start nw.js with IceStudio running.