blob: 4b3f343b62eed0819bbfc3e13773e604e1d57654 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module top(input clk, input rst, output [7:4] io_led);
localparam SIZE = 32;
reg [SIZE-1:0] counter = SIZE'b0;
assign io_led = {counter[SIZE-1], counter[25:23]};
always @(posedge clk)
begin
if(rst)
counter <= SIZE'b0;
else
counter <= counter + 1;
end
endmodule
|