You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
437 B

3 years ago
  1. `default_nettype none
  2. // define a Blink module
  3. module Blink(input CLK_IN, output GLED5, output RLED1, output RLED2, output RLED3, output RLED4);
  4. // define a 24-bit counter to divide the clock down from 12MHz
  5. localparam WIDTH = 24;
  6. reg [WIDTH-1:0] counter;
  7. // run counter from 12MHz clock
  8. always @(posedge CLK_IN)
  9. counter <= counter + 1;
  10. // wire up the red LEDs to the counter MSB
  11. assign RLED1 = counter[WIDTH-1];
  12. endmodule