Skip to content

Instantly share code, notes, and snippets.

@misodengaku
Created August 31, 2017 12:36
Show Gist options
  • Save misodengaku/f5b5ce31824e56cdca696c464554c05c to your computer and use it in GitHub Desktop.
Save misodengaku/f5b5ce31824e56cdca696c464554c05c to your computer and use it in GitHub Desktop.
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