summaryrefslogtreecommitdiff
path: root/tests/vloghtb
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-05-17 19:54:00 +0200
committerClifford Wolf <clifford@clifford.at>2015-05-17 19:54:00 +0200
commit83499dc1ba14bc164991be0ee9bdf0ae0a7beff9 (patch)
tree991af8abb98f8b8f316751c73234fa482763e69a /tests/vloghtb
parent3ecb2bf0674a97ccfc66c6d8432a3b43355b3c0c (diff)
added vloghtb test_febe.sh
Diffstat (limited to 'tests/vloghtb')
-rw-r--r--tests/vloghtb/common.sh36
-rw-r--r--tests/vloghtb/test_febe.sh13
2 files changed, 49 insertions, 0 deletions
diff --git a/tests/vloghtb/common.sh b/tests/vloghtb/common.sh
index 3965b04c..a8335c2b 100644
--- a/tests/vloghtb/common.sh
+++ b/tests/vloghtb/common.sh
@@ -68,3 +68,39 @@ test_equiv()
log_pass test_$1 $4
mv log_test_$1/$4.out log_test_$1/$4.txt
}
+
+test_febe()
+{
+ # Usage:
+ # test_febe <test_name> <synth_script> <extension> <backend> <frontend> <sat_options> <mod_name> <vlog_file>
+ # $1 $2 $3 $4 $5 $6 $7 $8
+
+ mkdir -p log_test_$1
+ rm -f log_test_$1/$7.txt
+ rm -f log_test_$1/$7.err
+
+ if ! ../../yosys -q -l log_test_$1/$7.out - 2> /dev/null <<- EOT
+ echo on
+ read_verilog $8
+ $2
+ design -save gold
+ dump
+ $4 log_test_$1/$7$3
+ design -reset
+ $5 log_test_$1/$7$3
+
+ design -copy-from gold -as gold $7
+ rename $7 gate
+
+ miter -equiv -flatten -ignore_gold_x -make_outputs -make_outcmp gold gate miter
+ sat $6 -verify -prove trigger 0 -show-inputs -show-outputs miter
+ EOT
+ then
+ log_fail test_$1 $7
+ mv log_test_$1/$7.out log_test_$1/$7.err
+ exit 1
+ fi
+
+ log_pass test_$1 $7
+ mv log_test_$1/$7.out log_test_$1/$7.txt
+}
diff --git a/tests/vloghtb/test_febe.sh b/tests/vloghtb/test_febe.sh
new file mode 100644
index 00000000..7756202c
--- /dev/null
+++ b/tests/vloghtb/test_febe.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+source common.sh
+
+f=$1
+n=$(basename ${f%.v})
+
+test_febe vlog1 "synth" ".v" "write_verilog" "read_verilog" "-ignore_div_by_zero" $n $f
+test_febe vlog2 "synth -run coarse" ".v" "write_verilog" "read_verilog -icells" "-ignore_div_by_zero" $n $f
+test_febe blif "synth; splitnets -ports" ".blif" "write_blif -icells" "read_blif" "-ignore_div_by_zero" $n $f
+
+exit 0