aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sva/basic00.sv
blob: 30c37f5f1af5333894eb9468a1c729ab42529ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module top (input clk, reset, antecedent, output reg consequent);
	always @(posedge clk)
		consequent <= reset ? 0 : antecedent;

`ifdef FAIL
	test_assert: assert property ( @(posedge clk) disable iff (reset) antecedent |-> consequent )
			else $error("Failed with consequent = ", $sampled(consequent));
`else
	test_assert: assert property ( @(posedge clk) disable iff (reset) antecedent |=> consequent )
			else $error("Failed with consequent = ", $sampled(consequent));
`endif
endmodule