aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ice40/counter.v
blob: 52852f8aca90fdb3a7eb6495c059aade4320f08d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module top    (
out,
clk,
reset
);
    output [7:0] out;
    input clk, reset;
    reg [7:0] out;

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


endmodule