aboutsummaryrefslogtreecommitdiffstats
path: root/examples/aiger/demo.v
blob: bb54ba4ef86530db71df43d2f7e369224881e0b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
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