File "toto.v"

Full Path: /home/analogde/www/GRAND/source/toto.v
File size: 504 bytes
MIME-type: text/plain
Charset: utf-8

module blink(clk, LED);

input clk;
output LED;

reg LED;
reg [23:0] counter;

always #10 clk = ~clk; 

always @(posedge clk)
    if (counter == 250)  // H = 50Mhz clignote toute les 0.5s
      begin
        counter <= 0;
        LED <= ~LED;
      end
    else
      begin
        counter <= counter + 1;
        LED <= LED;
      end

endmodule


/*module bench();

  reg clk;
  output LED;

  reg LED;

  initial clk = 0; 
  
  blink DUT (clk, LED);
  
  always #10 clk = ~clk; 
  
 
  


endmodule*/