aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch/common/counter.v
blob: 9746fd701319a77ae4ea3c08bc8c0d37ee1fd28a (plain)
1
2
3
4
5
6
7
8
9
10
11
module top ( out, clk, reset );
    output [7:0] out;
    input clk, reset;
    reg [7:0] out;

    always @(posedge clk, posedge reset)
      if (reset)
          out <= 8'b0;
      else
          out <= out + 1;
endmodule