aboutsummaryrefslogtreecommitdiffstats
path: root/examples/aiger/demo.v
blob: b98287424ea2e73e0793cc254f86f1cc10de03d4 (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 ? 1 : ctrl ? counter + 1 : counter - 1;
    assume(counter != 0);
    assume(counter != 1 << (NBITS-1));
    assert(counter != (1 << NBITS)-1);
  end
endmodule