summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-07-03 20:40:54 +0200
committerClifford Wolf <clifford@clifford.at>2013-07-03 20:40:54 +0200
commitbe1fca342817447e7170593f364d86e94eff84fe (patch)
treea0a4129065ba918744123f4981b9f1b1e3fadbe9
parent28539541edc2df0c5e27034281cc20fe92ccb699 (diff)
Added Altera Quartus support to xsthammer
-rw-r--r--tests/xsthammer/.gitignore3
-rw-r--r--tests/xsthammer/Makefile14
-rw-r--r--tests/xsthammer/run-quartus.sh24
3 files changed, 39 insertions, 2 deletions
diff --git a/tests/xsthammer/.gitignore b/tests/xsthammer/.gitignore
index c3bb9ccb..e90be0c8 100644
--- a/tests/xsthammer/.gitignore
+++ b/tests/xsthammer/.gitignore
@@ -5,6 +5,9 @@ xst
xst_temp
vivado
vivado_temp
+quartus
+quartus_temp
check
check_temp
check_vivado
+check_quartus
diff --git a/tests/xsthammer/Makefile b/tests/xsthammer/Makefile
index 83edccce..60aebcd3 100644
--- a/tests/xsthammer/Makefile
+++ b/tests/xsthammer/Makefile
@@ -5,18 +5,26 @@ test: $(TARGETS)
vivado: $(addprefix check_vivado/,$(notdir $(TARGETS)))
+quartus: $(addprefix check_quartus/,$(notdir $(TARGETS)))
+
check/%.log: rtl/%.v xst/%.v
bash run-check.sh $(notdir $(basename $<))
check_vivado/%.log: rtl/%.v vivado/%.v
bash run-check.sh -vivado $(notdir $(basename $<))
+check_quartus/%.log: rtl/%.v quartus/%.v
+ # bash run-check.sh -quartus $(notdir $(basename $<))
+
xst/%.v: rtl/%.v
bash run-xst.sh $(notdir $(basename $<))
vivado/%.v: rtl/%.v
bash run-vivado.sh $(notdir $(basename $<))
+quartus/%.v: rtl/%.v
+ bash run-quartus.sh $(notdir $(basename $<))
+
generate.lst: generate.cc
clang -Wall -o generate generate.cc -lstdc++
./generate
@@ -35,11 +43,13 @@ backup:
mkdir -p ~/.yosys/xhammer
tar cvzf ~/.yosys/xhammer/xst_files.tar.gz xst
tar cvzf ~/.yosys/xhammer/vivado_files.tar.gz vivado
+ tar cvzf ~/.yosys/xhammer/quartus_files.tar.gz quartus
restore:
tar xvzf ~/.yosys/xhammer/xst_files.tar.gz
tar xvzf ~/.yosys/xhammer/vivado_files.tar.gz
+ tar xvzf ~/.yosys/xhammer/quartus_files.tar.gz
-.PHONY: test vivado check_xl_cells clean mrproper backup restore
-.PRECIOUS: check/%.log xst/%.v vivado/%.v rtl/%.v generate.lst
+.PHONY: test vivado quartus check_xl_cells clean mrproper backup restore
+.PRECIOUS: check/%.log xst/%.v vivado/%.v quartus/%.v rtl/%.v generate.lst
diff --git a/tests/xsthammer/run-quartus.sh b/tests/xsthammer/run-quartus.sh
new file mode 100644
index 00000000..1f5b0dbf
--- /dev/null
+++ b/tests/xsthammer/run-quartus.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if [ $# -eq 0 ]; then
+ echo "Usage: $0 <job_id>" >&2
+ exit 1
+fi
+
+job="$1"
+set --
+
+set -e
+mkdir -p quartus quartus_temp/$job
+cd quartus_temp/$job
+
+rm -rf *
+cp ../../rtl/$job.v .
+/opt/altera/13.0/quartus/bin/quartus_map $job --source=$job.v --family="Cyclone III"
+/opt/altera/13.0/quartus/bin/quartus_fit $job
+/opt/altera/13.0/quartus/bin/quartus_eda $job --formal_verification --tool=conformal
+cp -v fv/conformal/$job.vo ../../quartus/$job.v
+
+sync
+exit 0
+