mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-06 19:21:23 +00:00
Improve SVA tests, add Makefile and scripts
This commit is contained in:
parent
90d8329f64
commit
b24f737759
11 changed files with 110 additions and 9 deletions
60
tests/sva/runtest.sh
Normal file
60
tests/sva/runtest.sh
Normal file
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
prefix=${1%.sv}
|
||||
test -f $prefix.sv
|
||||
|
||||
generate_sby() {
|
||||
cat <<- EOT
|
||||
[options]
|
||||
mode bmc
|
||||
depth 10
|
||||
expect $1
|
||||
|
||||
[engines]
|
||||
smtbmc yices
|
||||
|
||||
[script]
|
||||
EOT
|
||||
|
||||
if [ "$1" = "fail" ]; then
|
||||
echo "verific -sv ${prefix}_fail.sv"
|
||||
else
|
||||
echo "verific -sv $prefix.sv"
|
||||
fi
|
||||
|
||||
if [ -f $prefix.vhd ]; then
|
||||
echo "verific -vhdl2008 $prefix.vhd"
|
||||
fi
|
||||
|
||||
cat <<- EOT
|
||||
verific -import -extnets -all top
|
||||
prep -top top
|
||||
|
||||
[files]
|
||||
$prefix.sv
|
||||
EOT
|
||||
|
||||
if [ -f $prefix.vhd ]; then
|
||||
echo "$prefix.vhd"
|
||||
fi
|
||||
|
||||
if [ "$1" = "fail" ]; then
|
||||
cat <<- EOT
|
||||
|
||||
[file ${prefix}_fail.sv]
|
||||
\`define FAIL
|
||||
\`include "$prefix.sv"
|
||||
EOT
|
||||
fi
|
||||
}
|
||||
|
||||
generate_sby pass > ${prefix}_pass.sby
|
||||
generate_sby fail > ${prefix}_fail.sby
|
||||
|
||||
sby --yosys $PWD/../../yosys -f ${prefix}_pass.sby
|
||||
sby --yosys $PWD/../../yosys -f ${prefix}_fail.sby
|
||||
|
||||
touch $prefix.ok
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue