Reference material

This page will contain external references to useful information in a more or less organized manner.

Articles and sites

Project Icestorm an open source tool chain that allows you to program the lattice fpga based devices (and some others). Of course Lattice provides free tools as well but they are are certainly not open source.

Hackaday roundup on the Icestorm tools. Combined with the bootcamp a good starter on working with the Icestick or other ice40 based fpgas.

IceBreaker forum place to ask question about the board and make suggestions.

IceBreaker wiki contains for example a getting started guide

https://zipcpu.com/projects.html very in depth info and sample code . Discussions on everything from debugging to pipelining on yet another page of this super useful site.

Code repositories


My old iceStick experiments a GitHub repo full of verilog and some Python (for the assembler)

IceBreaker specs contains info on the layout of the board

IceBreaker examples contains sample designs for the IceBreaker board.

PicoSoc an riscV implementation that also interesting if you just need example Verilog code for a UART or parts of the IceBreaker board like SPRAM.

Ice_ultraplus_examples like PicoSoc this repo has examples of a riscV cpu implementation as well as examples on how to use the functional building blocks of the ultraplus fpgas (the up5k is used on the IceBreaker but these examples are for a different board; still useful but be careful with the pin assignment)

Reference designs Lattice Semiconductor sells hardware as well as soft core designs for their fpga products but also offers reference designs for free. This may be worth looking at to check out professional designs for components like a UART for example.

Berkeley softfloat implementation. Inspiration for creating floating point routines.

Technical reference documents

iCE40 LPHX Family Datasheet comprehensive info on all electronic information

Memory Usage Guide for iCE40 Devices for the dual port SBRAM on the IceStick and IceBreaker

iCE-SPRAM-Usage-Guide for the 128kB single port ram available on the IceBreaker board.

DSP Function Usage Guide for ICE40 Devices info about the multiplier elements available on the IceBreaker

General references and standards

The C99 standard. I do not have the ambition to even try and fully implement this in my compiler but having a good reference is nice. Because now everybody and their horse has pissed on this document it is now enormously bloated (well over 500 pages) but for a document of this kind it is surprisingly readable.

The RISC-V reference page. The Robin SoC/cpu will nowhere near implement a RISC-V architecture but it is certainly inspired by the ideas.

Commercial references

IceStick a small fpga development board by Lattice based on the ice40 hx1k fpga. I bought mine from Sinuss.nl , but most electronics suppliers will have it stocked.

IceBreaker a larger and more versatile fpga development board. It's a crowd sourced design based on the ice40 up5k. You could say it is the IceStick's bigger and stronger sister.


CPU design

The CPU design as currently implemented largely follows the diagram shown below. It features a 16 x 32bit register file and 16 bit instructi...