aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-02-12 16:51:46 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2019-02-12 16:51:46 -0800
commitdb8e28ce499e34b393fd8f892b50534888aa7b6a (patch)
treeedcc417b5861074b62211a7f21ab3117c8d95932
parentd54034ed5d74a927db24550701def7ffa62b8e8a (diff)
downloadnextpnr-tests-db8e28ce499e34b393fd8f892b50534888aa7b6a.tar.gz
nextpnr-tests-db8e28ce499e34b393fd8f892b50534888aa7b6a.tar.bz2
nextpnr-tests-db8e28ce499e34b393fd8f892b50534888aa7b6a.zip
Ungzip them when running regressions
-rw-r--r--ice40/regressions/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/ice40/regressions/Makefile b/ice40/regressions/Makefile
index 7e581ae..241b41c 100644
--- a/ice40/regressions/Makefile
+++ b/ice40/regressions/Makefile
@@ -1,9 +1,10 @@
NPNR = ../../../nextpnr-ice40
override NPNR := $(abspath $(NPNR))
-JSON := $(wildcard */*.json)
+JSON_GZ := $(wildcard */*.json.gz)
SH := $(wildcard */*.sh)
SH_BASENAME := $(patsubst %.sh,%,$(SH))
-JSON := $(filter-out $(addsuffix .json,$(SH_BASENAME)),$(JSON))
+JSON := $(patsubst %.gz,%,$(JSON_GZ))
+JSON := $(filter-out $(addsuffix .json,$(SH_BASENAME)), $(JSON))
JSON_OUTPUT := $(patsubst %.json,%_postpnr.v,$(JSON))
SH_OUTPUT := $(patsubst %.sh,%_postpnr.v,$(SH))
@@ -18,6 +19,9 @@ ifeq ($(wildcard $(NPNR)),)
$(error "$$(NPNR) must point to a nextpnr-ice40 binary (currently: $@)")
endif
+%: %.gz
+ gzip -dk $<
+
$(JSON_OUTPUT): %_postpnr.v: %.json $(wildcard %.pcf) $(wildcard %.npnr) $(NPNR)
$(NPNR) --json $*.json --asc $*.asc $(if $(wildcard $*.pcf),--pcf $*.pcf,) $(if $(wildcard $*.npnr),$(shell cat $*.npnr),) > /dev/null 2>&1
icebox_vlog $*.asc > $@