Quick start
In less than 10 minutes you'll have a LED blinking on your FPGAedu Board v1 using only open-source tools.
1. Install the toolchain
On Linux (Debian/Ubuntu):
sudo apt install yosys nextpnr-ice40 fpga-icestorm
On macOS with Homebrew:
brew install yosys nextpnr icestorm
2. Your first Verilog
Create blink.v:
module blink (
input wire clk, // 12 MHz on-board
output wire led
);
reg [23:0] counter = 0;
always @(posedge clk) counter <= counter + 1;
assign led = counter[22]; // ~1.4 Hz
endmodule
3. Constraints
Create board.pcf:
set_io clk 21
set_io led 95
4. Build and flash
yosys -p "synth_ice40 -json blink.json" blink.v
nextpnr-ice40 --hx1k --package tq144 --json blink.json --pcf board.pcf --asc blink.asc
icepack blink.asc blink.bin
iceprog blink.bin
Done! LED D1 should blink roughly once per second.
Troubleshooting
iceprog: cannot find iCE FTDI USB device: check the board is connected and your user has USB permissions (on Linux, add your user to theplugdevgroup).- LED does not blink: verify the LED pin in
board.pcfmatches your hardware revision.