Created
August 31, 2017 12:36
-
-
Save misodengaku/f5b5ce31824e56cdca696c464554c05c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module first( | |
input wire SW_0, | |
output wire LED_1, | |
output wire LED_2, | |
output wire LED_3, | |
output wire LED_4, | |
output wire LED_5, | |
output wire LED_6, | |
output wire LED_7, | |
output wire LED_8 | |
); | |
reg [7:0] counter; | |
assign {LED_8, LED_7, LED_6, LED_5, LED_4, LED_3, LED_2, LED_1 } = counter; | |
always @(posedge SW_0) | |
begin | |
counter <= counter + 1'b1; | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment