diff options
author | Gentoo Install <installgentoo@endianness.com> | 2021-12-26 16:28:32 +1100 |
---|---|---|
committer | Gentoo Install <installgentoo@endianness.com> | 2021-12-26 16:28:32 +1100 |
commit | 67fb3300c36711f814ad9eca7b5e73248530d840 (patch) | |
tree | 64ad309c8a4f0b862d6b524c37ed01f4f7100b4a /Makefile | |
download | uart-loopback-improved-67fb3300c36711f814ad9eca7b5e73248530d840.tar.gz uart-loopback-improved-67fb3300c36711f814ad9eca7b5e73248530d840.tar.bz2 uart-loopback-improved-67fb3300c36711f814ad9eca7b5e73248530d840.zip |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4cd937d --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +PROJ = uart_loopback_improved +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 |