3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 01:24:10 +00:00
yosys/tests/sva/basic01.sv
2018-12-29 12:46:54 +01:00

17 lines
386 B
Systemverilog

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