3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-05 09:04:08 +00:00
yosys/tests/various/submod_extract.ys
2014-07-26 17:22:18 +02:00

22 lines
473 B
Plaintext

read_verilog << EOT
module test(input [7:0] a, b, c, d, output [7:0] x, y, z);
assign x = a + b, y = b + c, z = c + d;
endmodule
EOT
copy test gold
rename test gate
submod -name mycell gate/x %ci*
design -copy-to mymap mycell
extract -map %mymap gate
select -assert-count 3 gold/t:*
select -assert-count 3 gold/t:$add
select -assert-count 3 gate/t:*
select -assert-count 3 gate/t:mycell
miter -equiv -flatten gold gate miter
sat -verify -prove trigger 0 miter