mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-27 06:27:57 +00:00
Start opt_hier
This commit is contained in:
parent
99f7d79abb
commit
22a44e4333
9 changed files with 575 additions and 6 deletions
34
tests/opt/opt_hier.tcl
Normal file
34
tests/opt/opt_hier.tcl
Normal file
|
@ -0,0 +1,34 @@
|
|||
yosys -import
|
||||
|
||||
# per each opt_hier_*.v source file, confirm flattening and hieropt+flattening
|
||||
# are combinationally equivalent
|
||||
foreach fn [glob opt_hier_*.v] {
|
||||
log -header "Test $fn"
|
||||
log -push
|
||||
design -reset
|
||||
|
||||
read_verilog $fn
|
||||
hierarchy -auto-top
|
||||
prep -top top
|
||||
design -save start
|
||||
flatten
|
||||
design -save gold
|
||||
design -load start
|
||||
opt -hier
|
||||
# check any instances marked `should_get_optimized_out` were
|
||||
# indeed optimized out
|
||||
select -assert-none a:should_get_optimized_out
|
||||
dump
|
||||
flatten
|
||||
design -save gate
|
||||
|
||||
design -reset
|
||||
design -copy-from gold -as gold A:top
|
||||
design -copy-from gate -as gate A:top
|
||||
yosys rename -hide
|
||||
equiv_make gold gate equiv
|
||||
equiv_induct equiv
|
||||
equiv_status -assert equiv
|
||||
|
||||
log -pop
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue