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:
parent
6891fd79a3
commit
7a66b38c3e
7 changed files with 127 additions and 0 deletions
14
tests/sat/asserts.v
Normal file
14
tests/sat/asserts.v
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue