2019-02-04 18:46:24 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-06-07 13:05:36 -05:00
|
|
|
set -e
|
2019-06-07 13:28:05 -05:00
|
|
|
|
2019-06-10 12:27:55 -05:00
|
|
|
# NB: *.aag and *.aig must contain a symbol table naming the primary
|
|
|
|
# inputs and outputs, otherwise ABC and Yosys will name them
|
|
|
|
# arbitrarily (and inconsistently with each other).
|
|
|
|
|
2019-06-07 13:28:05 -05:00
|
|
|
for aag in *.aag; do
|
|
|
|
# Since ABC cannot read *.aag, read the *.aig instead
|
2019-06-10 12:27:55 -05:00
|
|
|
# (which would have been created by the reference aig2aig utility,
|
|
|
|
# available from http://fmv.jku.at/aiger/)
|
2019-06-07 13:28:05 -05:00
|
|
|
../../yosys-abc -c "read -c ${aag%.*}.aig; write ${aag%.*}_ref.v"
|
|
|
|
../../yosys -p "
|
|
|
|
read_verilog ${aag%.*}_ref.v
|
|
|
|
prep
|
|
|
|
design -stash gold
|
|
|
|
read_aiger -clk_name clock $aag
|
|
|
|
prep
|
|
|
|
design -stash gate
|
|
|
|
design -import gold -as gold
|
|
|
|
design -import gate -as gate
|
|
|
|
miter -equiv -flatten -make_assert -make_outputs gold gate miter
|
|
|
|
sat -verify -prove-asserts -show-ports -seq 16 miter
|
|
|
|
"
|
|
|
|
done
|
|
|
|
|
2019-06-07 13:05:36 -05:00
|
|
|
for aig in *.aig; do
|
|
|
|
../../yosys-abc -c "read -c $aig; write ${aig%.*}_ref.v"
|
|
|
|
../../yosys -p "
|
|
|
|
read_verilog ${aig%.*}_ref.v
|
|
|
|
prep
|
|
|
|
design -stash gold
|
|
|
|
read_aiger -clk_name clock $aig
|
|
|
|
prep
|
|
|
|
design -stash gate
|
|
|
|
design -import gold -as gold
|
|
|
|
design -import gate -as gate
|
|
|
|
miter -equiv -flatten -make_assert -make_outputs gold gate miter
|
|
|
|
sat -verify -prove-asserts -show-ports -seq 16 miter
|
|
|
|
"
|
2019-02-04 18:46:24 -06:00
|
|
|
done
|