2017-07-22 05:31:08 -05:00
|
|
|
module top (input clk, reset, antecedent, output reg consequent);
|
|
|
|
always @(posedge clk)
|
|
|
|
consequent <= reset ? 0 : antecedent;
|
|
|
|
|
2017-07-27 04:42:05 -05:00
|
|
|
`ifdef FAIL
|
2017-07-22 05:31:08 -05:00
|
|
|
test_assert: assert property ( @(posedge clk) disable iff (reset) antecedent |-> consequent )
|
|
|
|
else $error("Failed with consequent = ", $sampled(consequent));
|
2017-07-27 04:42:05 -05:00
|
|
|
`else
|
|
|
|
test_assert: assert property ( @(posedge clk) disable iff (reset) antecedent |=> consequent )
|
|
|
|
else $error("Failed with consequent = ", $sampled(consequent));
|
|
|
|
`endif
|
2017-07-22 05:31:08 -05:00
|
|
|
endmodule
|