3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 01:24:10 +00:00
yosys/tests/sva/basic00.sv
2017-07-27 11:42:05 +02:00

13 lines
489 B
Systemverilog

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