2019-06-24 23:52:53 -05:00
|
|
|
read_verilog abc9.v
|
2019-07-02 21:13:40 -05:00
|
|
|
design -save read
|
|
|
|
hierarchy -top abc9_test027
|
2019-06-24 23:52:53 -05:00
|
|
|
proc
|
|
|
|
design -save gold
|
|
|
|
|
|
|
|
abc9 -lut 4
|
|
|
|
check
|
|
|
|
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 miter
|
|
|
|
|
2020-01-21 11:43:04 -06:00
|
|
|
|
2019-07-02 21:13:40 -05:00
|
|
|
design -load read
|
|
|
|
hierarchy -top abc9_test028
|
|
|
|
proc
|
|
|
|
|
|
|
|
abc9 -lut 4
|
2019-07-12 23:00:13 -05:00
|
|
|
select -assert-count 1 t:$lut r:LUT=2'b01 r:WIDTH=1 %i %i
|
2019-07-02 21:13:40 -05:00
|
|
|
select -assert-count 1 t:unknown
|
|
|
|
select -assert-none t:$lut t:unknown %% t: %D
|
2019-11-19 19:05:14 -06:00
|
|
|
|
2020-01-21 11:43:04 -06:00
|
|
|
|
2019-11-19 19:05:14 -06:00
|
|
|
design -load read
|
2019-11-21 18:32:52 -06:00
|
|
|
hierarchy -top abc9_test032
|
2019-11-19 19:05:14 -06:00
|
|
|
proc
|
2019-11-21 18:27:34 -06:00
|
|
|
clk2fflogic
|
2019-11-19 19:05:14 -06:00
|
|
|
design -save gold
|
|
|
|
|
|
|
|
abc9 -lut 4
|
|
|
|
check
|
|
|
|
design -stash gate
|
|
|
|
|
|
|
|
design -import gold -as gold
|
|
|
|
design -import gate -as gate
|
|
|
|
|
|
|
|
miter -equiv -flatten -make_assert -make_outputs gold gate miter
|
|
|
|
sat -seq 10 -verify -prove-asserts -show-ports miter
|
2020-01-21 11:43:04 -06:00
|
|
|
|
|
|
|
|
|
|
|
design -reset
|
|
|
|
read_verilog -icells <<EOT
|
|
|
|
module abc9_test036(input clk, d, output q);
|
2020-04-16 12:24:02 -05:00
|
|
|
(* keep, init=1'b0 *) wire w;
|
|
|
|
$_DFF_P_ ff(.C(clk), .D(d), .Q(w));
|
2020-01-21 11:43:04 -06:00
|
|
|
assign q = w;
|
|
|
|
endmodule
|
|
|
|
EOT
|
2020-04-16 14:08:59 -05:00
|
|
|
equiv_opt -assert abc9 -lut 4 -dff
|
2020-04-16 12:24:02 -05:00
|
|
|
design -load postopt
|
|
|
|
cd abc9_test036
|
|
|
|
select -assert-count 1 t:$_DFF_P_
|
|
|
|
select -assert-none t:* t:$_DFF_P_ %d
|
2020-04-20 11:38:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
design -reset
|
|
|
|
read_verilog -icells -specify <<EOT
|
|
|
|
(* abc9_lut=1, blackbox *)
|
|
|
|
module LUT2(input [1:0] i, output o);
|
|
|
|
parameter [3:0] mask = 0;
|
|
|
|
assign o = i[0] ? (i[1] ? mask[3] : mask[2])
|
|
|
|
: (i[1] ? mask[1] : mask[0]);
|
|
|
|
specify
|
|
|
|
(i *> o) = 1;
|
|
|
|
endspecify
|
|
|
|
endmodule
|
|
|
|
|
2020-04-16 14:08:59 -05:00
|
|
|
module abc9_test037(input [1:0] i, output o);
|
2020-04-20 11:38:29 -05:00
|
|
|
LUT2 #(.mask(4'b0)) lut (.i(i), .o(o));
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
abc9
|
2020-04-16 14:08:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
design -reset
|
|
|
|
read_verilog -icells <<EOT
|
2020-05-14 02:29:45 -05:00
|
|
|
module abc9_test038(input clk, output w, x, y, z);
|
2020-04-16 14:08:59 -05:00
|
|
|
(* init=1'b1 *) wire w;
|
|
|
|
$_DFF_N_ ff1(.C(clk), .D(1'b1), .Q(w));
|
|
|
|
(* init=1'bx *) wire x;
|
|
|
|
$_DFF_N_ ff2(.C(clk), .D(1'b0), .Q(x));
|
|
|
|
(* init=1'b0 *) wire y;
|
|
|
|
$_DFF_N_ ff3(.C(clk), .D(1'b0), .Q(y));
|
2020-05-14 02:29:45 -05:00
|
|
|
(* init=1'b0 *) wire z;
|
|
|
|
$_DFF_N_ ff4(.C(clk), .D(1'b1), .Q(z));
|
2020-04-16 14:08:59 -05:00
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
simplemap
|
|
|
|
equiv_opt abc9 -lut 4 -dff
|
|
|
|
design -load postopt
|
|
|
|
cd abc9_test038
|
2020-05-14 02:29:45 -05:00
|
|
|
select -assert-count 3 t:$_DFF_N_
|
|
|
|
select -assert-none c:ff1 c:ff2 c:ff4 %% c:* %D
|
|
|
|
clean
|
|
|
|
select -assert-count 2 a:init
|
|
|
|
select -assert-none w:w w:z %% a:init %D
|