mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-29 01:18:46 +00:00
Added examples/aiger/
This commit is contained in:
parent
88b9733253
commit
105b6374ae
4 changed files with 53 additions and 0 deletions
12
examples/aiger/demo.v
Normal file
12
examples/aiger/demo.v
Normal file
|
@ -0,0 +1,12 @@
|
|||
module demo(input clk, reset, ctrl);
|
||||
localparam NBITS = 10;
|
||||
reg [NBITS-1:0] counter;
|
||||
initial counter[NBITS-2] = 0;
|
||||
initial counter[0] = 1;
|
||||
always @(posedge clk) begin
|
||||
counter <= reset ? 0 : ctrl ? counter + 1 : counter - 1;
|
||||
assume(counter != 0);
|
||||
assume(counter != 1 << (NBITS-1));
|
||||
assert(counter != (1 << NBITS)-1);
|
||||
end
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue