Skip to content

Chapter 0: you are leaving the private sector

David Stanford edited this page Mar 25, 2017 · 3 revisions

You are leaving the private sector ... and you're entering the FREE sector! Welcome! From now on, we'll only use tools that belong to technological heritage of humanity.

Introduction

FPGAs are this kind of "blank" chips, that can be configured in order to create our own digital circuits. Yep! With FPGAs we are creating actual hardware!

Every digital circuit can be split in it's basic elements: logic gates that perform boolean operations with the bits and flip-flops to store the results. As a first approximation, we can think of an FPGA as a chip that has unconnected arrays of these elements. When you configure it, they connect to each other in an specific way and that's how we get our circuit.

This configuration is achieved by downloading in the FPGA a binary file, called a bitstream, which contains all the information necessary to establish the connections between the internal elements of the FPGA.

Free environment

TODO

For sythesis and upload to board, we'll use icestorm, yosys and aracne. Environment: Ubuntu Linux 15.04

Instalation

Fedora 22

Dependencioes:

sudo dnf install libftdi-devel tcl-devel readline-devel flex clang bison gawk libffi-devel git mercurial graphviz python python3

IceStorm Tools installation (icepack, icebox, iceprog):

git clone https://github.com/cliffordwolf/icestorm.git icestorm
cd icestorm
make -j$(nproc)
sudo make install
cd ..

NOTE: If you get errors related to "ftdi.h", you'll need to link the FTDI library this way:

sudo ln -s /usr/lib64/libftdi1.so /usr/local/lib/libftdi.so
sudo ln -s /usr/include/libftdi1/ftdi.h /usr/local/include/ftdi.h

Arachne-PNR installation (the place&route tool):

git clone https://github.com/cseed/arachne-pnr.git arachne-pnr
cd arachne-pnr
make -j$(nproc)
sudo make install
cd ..

Yosys installation (Verilog synthesis):

git clone https://github.com/cliffordwolf/yosys.git yosys
cd yosys
make -j$(nproc)
sudo make install
cd ..

Icarus Verilog y GTKwave installation

sudo dnf install iverilog gtkwave

In order to execute "sudo iceprog" you'll need to link:

sudo ln -s /usr/local/bin/iceprog /usr/bin/iceprog

ICEStick board

This is the board that we'll use to try all the digital designs in this tutorial: IceStick board

If you can't get your hands on one of this boards, don't worry! we'll also simulate the circuits with icarus verilog and gtkwave

Links

Clone this wiki locally