diff --git a/Makefile b/Makefile index 734a708..453514b 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,20 @@ FORCE: %.synth.json: %.v $(SYNTH) -q -E $@.d -p "synth_ice40 -top $(*F)" -b json -o $@ -f verilog $< -%.synth.v: %.synth.json %.v +define run-jsontov = ( echo '`include "common.vh"'; grep timescale $*.v; \ - $(SYNTH) -q -b verilog -f json $< ) | sed 's/endmodule/`DUMP(1)\n\0/g' > $@ + $(SYNTH) -q -p "write_verilog -defparam -noattr" -f json $< ) | \ + sed 's/endmodule/`DUMP(1)\n\0/g' > $@ +endef + +%.synth.v: %.synth.json %.v + $(run-jsontov) + +%.place.v: %.place.json %.v + $(run-jsontov) # Don't warn about including the timescale from common.vh -IFLAGS := -g2012 -Wall -Wno-timescale +IFLAGS := -g2012 -gspecify -Wall -Wno-timescale define run-icarus = $(ICARUS) $(IFLAGS) -I$(