summaryrefslogtreecommitdiff
path: root/tests/various/submod_extract.ys
blob: 8d11c21d3dfe53b55b95e0a8c08693b4f5aa2c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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