Skip to content

Instantly share code, notes, and snippets.

@miyukki
Created November 14, 2014 08:28
Show Gist options
  • Save miyukki/51bf3087ee2e94fe8b49 to your computer and use it in GitHub Desktop.
Save miyukki/51bf3087ee2e94fe8b49 to your computer and use it in GitHub Desktop.
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