2022-05-31 10:47:07 -05:00
|
|
|
read_verilog -formal <<EOT
|
|
|
|
module top(input a, b, c, d);
|
|
|
|
|
|
|
|
always @* begin
|
2024-02-01 13:08:55 -06:00
|
|
|
if (a) c0: assert (b == c);
|
|
|
|
if (!a) c1: assert (b != c);
|
|
|
|
if (b) c2: assume (c);
|
|
|
|
if (c) c3: cover (d);
|
2022-05-31 10:47:07 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
|
|
|
|
prep -top top
|
|
|
|
|
2024-01-22 11:32:23 -06:00
|
|
|
design -save prep
|
|
|
|
|
2024-01-22 10:44:05 -06:00
|
|
|
async2sync
|
|
|
|
|
2022-05-31 10:47:07 -05:00
|
|
|
select -assert-count 1 t:$cover
|
|
|
|
|
2022-06-18 12:28:12 -05:00
|
|
|
chformal -cover -coverenable
|
2022-05-31 10:47:07 -05:00
|
|
|
select -assert-count 2 t:$cover
|
|
|
|
|
2022-06-18 12:28:12 -05:00
|
|
|
chformal -assert -coverenable
|
2022-05-31 10:47:07 -05:00
|
|
|
select -assert-count 4 t:$cover
|
|
|
|
|
2022-06-18 12:28:12 -05:00
|
|
|
chformal -assume -coverenable
|
2022-05-31 10:47:07 -05:00
|
|
|
select -assert-count 5 t:$cover
|
2024-02-01 13:08:55 -06:00
|
|
|
|
|
|
|
autoname */t:$cover
|
|
|
|
expose -evert */c? */c?_EN_$cover_*
|
|
|
|
|
|
|
|
design -save a2s_first
|
|
|
|
|
|
|
|
design -load prep
|
|
|
|
select -assert-count 1 r:FLAVOR=cover
|
|
|
|
|
|
|
|
chformal -cover -coverenable
|
|
|
|
select -assert-count 2 r:FLAVOR=cover
|
|
|
|
|
|
|
|
chformal -assert -coverenable
|
|
|
|
select -assert-count 4 r:FLAVOR=cover
|
|
|
|
|
|
|
|
chformal -assume -coverenable
|
|
|
|
select -assert-count 5 r:FLAVOR=cover
|
|
|
|
|
|
|
|
async2sync
|
|
|
|
|
|
|
|
autoname */t:$cover
|
|
|
|
expose -evert */c? */c?_EN_$cover_*
|
|
|
|
|
|
|
|
design -save a2s_last
|
|
|
|
|
|
|
|
design -reset
|
|
|
|
|
|
|
|
design -copy-from a2s_first -as gold top
|
|
|
|
design -copy-from a2s_last -as gate top
|
|
|
|
|
|
|
|
miter -equiv -flatten -make_assert gold gate miter
|
|
|
|
|
|
|
|
sat -verify -prove-asserts -tempinduct miter
|