aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/carry_tests/counter.v
blob: 1379a33075b119cbfaef4d807c61eed7b7398f58 (plain)
1
2
3
4
5
6
7
8
9
module top(input clk, cen, rst, ina, inb, output outa, outb, outc, outd);

    reg [15:0] ctr = 0;

    always @(posedge clk)
        ctr <= ctr + 1'b1;

    assign {outa, outb, outc, outd} = ctr[15:12];
endmodule