3 module opt_dffmuxext_unsigned(input clk, ce, input [1:0] i, output reg [3:0] o);
4 always @(posedge clk) if (ce) o <= i;
11 select -assert-count 1 t:$dffe r:WIDTH=2 %i
12 select -assert-count 0 t:$dffe %% t:* %D
18 module opt_dffmuxext_signed(input clk, ce, input signed [1:0] i, output reg signed [3:0] o);
19 always @(posedge clk) if (ce) o <= i;
27 select -assert-count 1 t:$dffe r:WIDTH=2 %i
28 select -assert-count 0 t:$dffe %% t:* %D
34 module opt_dffmuxext_const(input clk, ce, input [1:0] i, output reg [5:0] o);
35 always @(posedge clk) if (ce) o <= {1'b0, i[1], 2'b1x, i[0], 1'bz};
42 select -assert-count 1 t:$dffe r:WIDTH=2 %i
43 select -assert-count 0 t:$dffe %% t:* %D
49 module opt_dffmuxext_const_init(input clk, ce, input [1:0] i, (* init=6'b0x00x1 *) output reg [5:0] o);
50 always @(posedge clk) if (ce) o <= {1'b0, i[1], 2'b1x, i[0], 1'bz};
57 select -assert-count 1 t:$dffe r:WIDTH=4 %i
58 select -assert-count 0 t:$dffe %% t:* %D
64 module opt_dffmuxext_unsigned_rst(input clk, ce, rst, input [1:0] i, output reg [3:0] o);
65 always @(posedge clk) if (rst) o <= 0; else if (ce) o <= i;
73 select -assert-count 1 t:$sdffe r:WIDTH=2 %i
74 select -assert-count 0 t:$sdffe %% t:* %D
80 module opt_dffmuxext_signed_rst(input clk, ce, rstn, input signed [1:0] i, output reg signed [3:0] o);
81 always @(posedge clk) begin
83 if (!rstn) o <= 4'b1111;
92 select -assert-count 1 t:$sdffe r:WIDTH=2 %i
93 select -assert-count 0 t:$sdffe %% t:* %D
99 module opt_dffmuxext_signed_rst_init(input clk, ce, rstn, input signed [1:0] i, output reg signed [3:0] o);
100 initial o <= 4'b0010;
101 always @(posedge clk) begin
103 if (!rstn) o <= 4'b1111;
109 # NB: equiv_opt uses equiv_induct which covers
110 # only the induction half of temporal induction
111 # --- missing the base-case half
112 # This makes it akin to `sat -tempinduct-inductonly`
113 # instead of `sat -tempinduct-baseonly` or
114 # `sat -tempinduct` which is necessary for this
116 #equiv_opt -assert opt
122 design -import gold -as gold
123 design -import gate -as gate
124 miter -equiv -flatten -make_assert -make_outputs gold gate miter
125 sat -tempinduct -verify -prove-asserts -show-ports miter
128 select -assert-count 1 t:$sdffe r:WIDTH=3 %i
129 select -assert-count 0 t:$sdffe %% t:* %D