From 83499dc1ba14bc164991be0ee9bdf0ae0a7beff9 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 17 May 2015 19:54:00 +0200 Subject: [PATCH] added vloghtb test_febe.sh --- tests/vloghtb/common.sh | 36 ++++++++++++++++++++++++++++++++++++ tests/vloghtb/test_febe.sh | 13 +++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 tests/vloghtb/test_febe.sh diff --git a/tests/vloghtb/common.sh b/tests/vloghtb/common.sh index 3965b04ca..a8335c2bd 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 + # $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 000000000..7756202c4 --- /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 -- 2.30.2