PROJ = uart_passthrough DEVICE = hx1k PKG = tq144 PCF = pins.pcf FILES = top.v .PHONY: all clean burn all: $(PROJ).bin %.json: $(FILES) # Lint to catch mistakes verilator --lint-only $(FILES) # synthesize using Yosys yosys -ql yosys.log -p "synth_ice40 -top top -json $(PROJ).json" $(FILES) %.asc: %.json # Place and route using nextpnr nextpnr-ice40 --$(DEVICE) --package $(PKG) --pcf $(PCF) --json $< --asc $@ %.rpt: %.asc # Timing icetime -d $(DEVICE) -mtr $@ $< %.bin: %.asc # Convert to bitstream using IcePack icepack $< $@ burn: $(PROJ).bin iceprog $< clean: rm -f *.json *.asc *.bin *.vcd *.log