3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-31 08:23:19 +00:00

Added test cases for sat command

This commit is contained in:
Clifford Wolf 2014-02-04 13:43:34 +01:00
parent 6891fd79a3
commit 7a66b38c3e
7 changed files with 127 additions and 0 deletions

14
tests/sat/asserts.v Normal file
View file

@ -0,0 +1,14 @@
// http://www.reddit.com/r/yosys/comments/1vljks/new_support_for_systemveriloglike_asserts/
module test(input clk, input rst, output y);
reg [2:0] state;
always @(posedge clk) begin
if (rst || state == 3) begin
state <= 0;
end else begin
assert(state < 3);
state <= state + 1;
end
end
assign y = state[2];
assert property (y !== 1'b1);
endmodule