20 lines
506 B
Verilog
20 lines
506 B
Verilog
`default_nettype none
|
|
|
|
module blinky(i_clk, o_led, lcol1);
|
|
parameter WIDTH = 24;
|
|
input wire i_clk;
|
|
output wire o_led;
|
|
output wire lcol1;
|
|
|
|
reg [WIDTH-1:0] counter;
|
|
|
|
always @(posedge i_clk)
|
|
counter <= counter + 1'b1;
|
|
|
|
assign o_led = counter[WIDTH-1]; // normal, symmetrical blinking
|
|
// assign o_led = ~(&counter[WIDTH-1:WIDTH-3]); // short on, long off (strobe)
|
|
// assign o_led = ~(counter[5:0] < counter[WIDTH-1:WIDTH-6]); // PWM, dimmer
|
|
assign lcol1 = 1'b0;
|
|
endmodule
|
|
|