aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-02-08 07:01:33 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2019-02-08 07:01:33 -0800
commitbbe819a2ea2ddb12c1575ebb075008e19da402b2 (patch)
tree179fb33805964c1ff6fee4de32868f5696f50c42
parentbc5743b50c93d3914f1a0c7f4c09e9f7a921358d (diff)
downloadnextpnr-tests-bbe819a2ea2ddb12c1575ebb075008e19da402b2.tar.gz
nextpnr-tests-bbe819a2ea2ddb12c1575ebb075008e19da402b2.tar.bz2
nextpnr-tests-bbe819a2ea2ddb12c1575ebb075008e19da402b2.zip
Generate ASC, and pipe it through icebox_vlog for sanity
-rw-r--r--ice40/regressions/.gitignore2
-rw-r--r--ice40/regressions/Makefile21
-rw-r--r--ice40/regressions/issue0084/mlaccel.sh2
-rw-r--r--ice40/regressions/issue0120/top.sh2
-rw-r--r--ice40/regressions/issue0209/test.sh2
5 files changed, 20 insertions, 9 deletions
diff --git a/ice40/regressions/.gitignore b/ice40/regressions/.gitignore
index 397b4a7..1f76211 100644
--- a/ice40/regressions/.gitignore
+++ b/ice40/regressions/.gitignore
@@ -1 +1,3 @@
*.log
+*.asc
+*_postpnr.v
diff --git a/ice40/regressions/Makefile b/ice40/regressions/Makefile
index 82f0510..7e581ae 100644
--- a/ice40/regressions/Makefile
+++ b/ice40/regressions/Makefile
@@ -4,8 +4,8 @@ JSON := $(wildcard */*.json)
SH := $(wildcard */*.sh)
SH_BASENAME := $(patsubst %.sh,%,$(SH))
JSON := $(filter-out $(addsuffix .json,$(SH_BASENAME)),$(JSON))
-JSON_OUTPUT := $(patsubst %.json,%.log,$(JSON))
-SH_OUTPUT := $(patsubst %.sh,%.log,$(SH))
+JSON_OUTPUT := $(patsubst %.json,%_postpnr.v,$(JSON))
+SH_OUTPUT := $(patsubst %.sh,%_postpnr.v,$(SH))
all: $(JSON_OUTPUT) $(SH_OUTPUT)
@@ -18,8 +18,17 @@ ifeq ($(wildcard $(NPNR)),)
$(error "$$(NPNR) must point to a nextpnr-ice40 binary (currently: $@)")
endif
-$(JSON_OUTPUT): %.log: %.json $(wildcard %.pcf) $(wildcard %.npnr) $(NPNR)
- $(NPNR) --json $(word 1,$^) $(if $(wildcard $*.pcf),--pcf $*.pcf,) $(if $(wildcard $*.npnr),$(shell cat $*.npnr),) > $@ 2>&1
+$(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 > $@
-$(SH_OUTPUT): %.log: %.sh $(NPNR)
- cd $(dir $@) && NPNR=$(NPNR) bash $(notdir $(word 1,$^)) > /dev/null 2>&1
+$(SH_OUTPUT): %_postpnr.v: %.sh $(NPNR)
+ cd $(dir $@) && NPNR=$(NPNR) bash $(notdir $*.sh) > /dev/null 2>&1
+ if [ -f "$*.asc" ]; then \
+ icebox_vlog $*.asc > $@; \
+ else \
+ touch $@; \
+ fi
+
+clean:
+ @rm -f */*.asc $(JSON_OUTPUT) $(SH_OUTPUT)
diff --git a/ice40/regressions/issue0084/mlaccel.sh b/ice40/regressions/issue0084/mlaccel.sh
index 3327547..a0074be 100644
--- a/ice40/regressions/issue0084/mlaccel.sh
+++ b/ice40/regressions/issue0084/mlaccel.sh
@@ -1,3 +1,3 @@
:> mlaccel.log
-${NPNR} --json mlaccel.json --pcf mlaccel.pcf `cat mlaccel.npnr` > mlaccel.log 2>&1 || true
+${NPNR} --json mlaccel.json --asc mlaccel.asc --pcf mlaccel.pcf `cat mlaccel.npnr` > mlaccel.log 2>&1 || true
grep "^ERROR: PACKAGE_PIN of SB_IO 'qpi_in_buf\\[1\\]' connected to more than a single top level IO.$" mlaccel.log
diff --git a/ice40/regressions/issue0120/top.sh b/ice40/regressions/issue0120/top.sh
index 43da7d4..171680f 100644
--- a/ice40/regressions/issue0120/top.sh
+++ b/ice40/regressions/issue0120/top.sh
@@ -1,3 +1,3 @@
:> top.log
-${NPNR} --json top.json --pcf top.pcf `cat top.npnr` > top.log 2>&1 || true
+${NPNR} --json top.json --asc top.asc --pcf top.pcf `cat top.npnr` > top.log 2>&1 || true
grep "^ERROR: PACKAGE_PIN of SB_IO 'SB_IO' connected to more than a single top level IO.$" top.log
diff --git a/ice40/regressions/issue0209/test.sh b/ice40/regressions/issue0209/test.sh
index 27bc2ca..66e3797 100644
--- a/ice40/regressions/issue0209/test.sh
+++ b/ice40/regressions/issue0209/test.sh
@@ -1,3 +1,3 @@
:> test.log
-${NPNR} --json test.json --pcf test.pcf `cat test.npnr` > test.log 2>&1 || true
+${NPNR} --json test.json --asc test.asc --pcf test.pcf `cat test.npnr` > test.log 2>&1 || true
grep "^ERROR: BEL 'X0/Y28/io0' has no global buffer connection available$" test.log