[xc7] blinky.v to only have 4 LEDs

This commit is contained in:
Eddie Hung 2018-11-03 13:27:39 -07:00
parent e758d8befe
commit 0e1c23a07b

View File

@ -4,7 +4,6 @@ module blinky (
output led2, output led2,
output led3, output led3,
output led4, output led4,
output led5
); );
BUFGCTRL clk_gb ( BUFGCTRL clk_gb (
@ -14,7 +13,7 @@ module blinky (
.O(clk) .O(clk)
); );
localparam BITS = 5; localparam BITS = 4;
localparam LOG2DELAY = 21; localparam LOG2DELAY = 21;
reg [BITS+LOG2DELAY-1:0] counter = 0; reg [BITS+LOG2DELAY-1:0] counter = 0;
@ -25,5 +24,5 @@ module blinky (
outcnt <= counter >> LOG2DELAY; outcnt <= counter >> LOG2DELAY;
end end
assign {led1, led2, led3, led4, led5} = outcnt ^ (outcnt >> 1); assign {led1, led2, led3, led4} = outcnt ^ (outcnt >> 1);
endmodule endmodule