Open Source FPGA Synthesis with the icoBoard
Summary
Jan 7, 2018Experiments with Open Source FPGA synthesis with the IceStorm tool-chain and the IcoBoard.
icoBoard
-
-
- icoBoard v1.1 with 1 MBit SRAM @ €49.00
- icoBoard v1.1 with 8 MBit SRAM @ €89.00
Open Source Software
- IceStorm tool-chain - needed for synthesis.
- icoprog from within the icotools repository - needed to load the bitstream into the IcoBoard.
- Icarus Verilog - needed for simulation.
- Verilator - another verilog simulator.
- GTKWave - needed for visualization of simulation results.'
Example Code
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
- Pmods
- Pmod BTN @ $7.99
- Pmod OLEDrgb @ $19.99
Example 3: IcoSoc Demo
- GitHub Repository (fork of cliffordwolf/icotools)
- Pmods
- Pmod SSD (7-segment Display) @ $6.99
Instructions
- Install the IceStorm tool-chain (Yosys, arachne-pnr, icestorm)
- Download/clone a copy of the my fork of the icotools repository
- 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.
- 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
Wide Fast FPGA Peripheral Connectors
Open FPGA Synthesis Development
- VTR (Verilog-to-Routing) VPR (Versatile Place and Route) routing tool
- Project X-ray
- XC7A50 Tile Viewer (requires Google Chrome)