aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sva/basic01.sv
blob: d5ad497dd0a78ce13a642b8f2a27d4f5cb4fc5db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module top (input logic clock, ctrl);
	logic read = 0, write = 0, ready = 0;

	always @(posedge clock) begin
		read <= !ctrl;
		write <= ctrl;
		ready <= write;
	end

	a_rw: assert property ( @(posedge clock) !(read && write) );
`ifdef FAIL
	a_wr: assert property ( @(posedge clock) write |-> ready );
`else
	a_wr: assert property ( @(posedge clock) write |=> ready );
`endif
endmodule