[xc7] blinky.v to only have 4 LEDs
This commit is contained in:
parent
e758d8befe
commit
0e1c23a07b
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user