Open Source FPGA Synthesis with the icoBoard

Summary

Jan 7, 2018
Experiments with Open Source FPGA synthesis with the IceStorm tool-chain and the IcoBoard.

Example 1: Blinking LEDs

top.v

module top(input clk_100mhz, output [3:1] led);

reg [25:0] counter = 0;
assign led = counter[25:23];
always @(posedge clk_100mhz) counter <= counter + 1;

endmodule     

demo.pcf

set_io clk_100mhz R9
set_io led[1] C8
set_io led[2] F7
set_io led[3] K9

Makefile

synthesize: demo.bin

demo.blif: top.v
	yosys -q -p "synth_ice40 -blif demo.blif" top.v

demo.asc: demo.blif demo.pcf
	arachne-pnr -d 8k -p demo.pcf $< -o $@

demo.bin: demo.asc
	icepack $< $@

.PHONY: synthesize

Example 2: PmodOLEDrgb Demo

Example 3: IcoSoc Demo

Instructions

  1. Install the IceStorm tool-chain (Yosys, arachne-pnr, icestorm)
  2. Download/clone a copy of the my fork of the icotools repository
  3. Build the RISC-V version of gcc (and friends), as described by the instructions in the Installing the RISC-V Toolchain section of the README file.
  4. Enter the icotools/icosoc/examples/otl-demo directory, and run this command with the appropriate IP address for the RaspberryPi.
      $ SSH_RASPI='ssh pi@<rpi-ip-address>' make run 
  • TOFE - Tim’s Open FPGA Expansion. Uses PCIe connectors.
  • syzygy - Uses Samtec connectors.