====== Open Source FPGA Synthesis with the icoBoard ====== Experiments with Open Source FPGA synthesis with the IceStorm tool-chain and the IcoBoard. * [[https://odysee.com/@OpenTechLab:f/lbry:6|odysee]] * [[https://www.youtube.com/watch?v=-bIeiMmqaZE|YouTube Part 1]] * [[https://www.youtube.com/watch?v=UMDcnwZA2YE|YouTube Part 2]] * [[https://peertube.social/videos/watch/95d4c823-3b75-4e17-a4e9-0164f005a49a|peertube.social]] ===== icoBoard ===== * [[http://icoboard.org/|Website]] * [[https://drive.google.com/open?id=0By-zY9AlHqXIcXZ6ZWdBR2dPXzg|Schematic]] * [[https://shop.trenz-electronic.de/en/Products/OnSite-Broadcast/|Purchase at Trenz Electronic]] * [[https://shop.trenz-electronic.de/en/TE0887-02-icoBoard-Version-1.1-with-1-MBit-SRAM?c=428| icoBoard v1.1 with 1 MBit SRAM]] @ €49.00 * [[https://shop.trenz-electronic.de/en/TE0887-03M-icoBoard-Version-1.1-with-8-MBit-SRAM?c=428|icoBoard v1.1 with 8 MBit SRAM]] @ €89.00 * [[https://shop.trenz-electronic.de/en/TE0889-01-icoUSBaseboard-FTDI-interface-board-for-icoBoard?c=428| icoUSBaseboard (FTDI interface board for icoBoard)]] @ €39.00 ===== Open Source Software ===== * [[http://www.clifford.at/icestorm/|IceStorm tool-chain]] - needed for synthesis. * [[http://www.clifford.at/yosys/|Yosys]] * [[http://www.clifford.at/icestorm/|IceStorm]] * [[https://github.com/cseed/arachne-pnr|arachne-pnr]] * [[https://github.com/cliffordwolf/icotools/tree/master/icoprog|icoprog]] from within the icotools repository - needed to load the bitstream into the IcoBoard. * [[http://iverilog.icarus.com/|Icarus Verilog]] - needed for simulation. * [[https://www.veripool.org/wiki/verilator|Verilator]] - another verilog simulator. * [[http://gtkwave.sourceforge.net/|GTKWave]] - needed for visualization of simulation results.' * [[https://knielsen.github.io/ice40_viewer/ice40_viewer.html|iCE40 Layout Viewer]] ===== 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 ==== {{:videos:013:pmodoledrgb-demo-structure.jpg?600|}} * **[[https://github.com/jhol/otl-icoboard-pmodoledrgb-demo|GitHub Repository]]** * Pmods * [[http://store.digilentinc.com/pmodbtn-4-user-pushbuttons/|Pmod BTN]] @ $7.99 * [[https://reference.digilentinc.com/reference/pmod/pmodbtn/start|Technical Reference]] * [[http://store.digilentinc.com/pmod-oledrgb-96-x-64-rgb-oled-display-with-16-bit-color-resolution/|Pmod OLEDrgb]] @ $19.99 * [[https://reference.digilentinc.com/reference/pmod/pmodoledrgb/start|Technical Reference]] ==== Example 3: IcoSoc Demo ==== * **[[https://github.com/jhol/icotools/|GitHub Repository]]** (fork of [[https://github.com/cliffordwolf/icotools|cliffordwolf/icotools]]) * Pmods * [[https://store.digilentinc.com/pmodssd-seven-segment-display/|Pmod SSD]] (7-segment Display) @ $6.99 * [[https://reference.digilentinc.com/reference/pmod/pmodssd/start|Technical Reference]] * [[https://github.com/cliffordwolf/picorv32|PicoRV32 Source]] === Instructions === - Install the IceStorm tool-chain (Yosys, arachne-pnr, icestorm) - Download/clone a copy of the [[https://github.com/jhol/icotools/|my fork of the icotools repository]] - Build the RISC-V version of gcc (and friends), as described by the instructions in the [[https://github.com/jhol/icotools/blob/master/icosoc/README#L44| 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@' make run ===== Wide Fast FPGA Peripheral Connectors ===== * [[https://hdmi2usb.tv/tofe/|TOFE]] - Tim’s Open FPGA Expansion. Uses PCIe connectors. * [[http://syzygyfpga.io/|syzygy]] - Uses Samtec connectors. ===== Open FPGA Synthesis Development ===== * [[https://github.com/cliffordwolf/yosys/tree/master/techlibs|Currently Supported techlibs in Yosys]] * [[https://verilogtorouting.org/|VTR (Verilog-to-Routing)]] [[https://docs.verilogtorouting.org/en/latest/vpr/|VPR (Versatile Place and Route)]] routing tool * Project X-ray * [[https://symbiflow.github.io/|SymbiFlow]] * [[http://scratch.clifford.at/prjxray/grid-xc7a50tfgg484-1-db.html|XC7A50 Tile Viewer]] (requires Google Chrome) ===== Around the Web ===== * [[https://www.youtube.com/watch?v=8OaZ89TN0fo|EEVblog Guest Video]] * [[http://www.eevblog.com/forum/blog/guest-video-opentechlab-icoboard-fpga-experiments/|Forum]]