Created
November 14, 2014 08:28
-
-
Save miyukki/51bf3087ee2e94fe8b49 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 program # ( | |
// Constant | |
parameter TRUE = 1'b1, | |
parameter FALSE = 1'b0 | |
)( | |
input BUTTON_SOUTH, | |
output LED0 | |
); | |
reg led_state; | |
assign LED0 = led_state; | |
always @(posedge BUTTON_SOUTH) begin | |
if (BUTTON_SOUTH == TRUE) begin | |
// LED0 = TRUE; | |
led_state <= TRUE; | |
end | |
else begin | |
// LED0 = FALSE; | |
led_state <= FALSE; | |
end | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment