You are on page 1of 3

`timescale 1ns / 1ps

//////////////////////////////////////////////////////////////////////////////////

// Company:

// Engineer:

//

// Create Date: 11:12:17 03/28/2011

// Design Name:

// Module Name: ledflash

// Project Name:

// Target Devices:

// Tool versions:

// Description:

//

// Dependencies:

//

// Revision:

// Revision 0.01 - File Created

// Additional Comments:

//

//////////////////////////////////////////////////////////////////////////////////

module ledflash(sysclk,LEDS);

input sysclk;

output [7:0] LEDS;


reg [23:0] counter;

reg [7:0] LEDS;

always @(posedge sysclk)

counter<=counter+1;

always @(posedge sysclk)

begin

if(counter[23]) LEDS[0] <= 1;

else LEDS[0] <= 0;

if(counter[22]) LEDS[1] <= 1;

else LEDS[1] <= 0;

if(counter[21]) LEDS[2] <= 1;

else LEDS[2] <= 0;

if(counter[20]) LEDS[3] <= 1;

else LEDS[3] <= 0;

if(counter[19]) LEDS[4] <= 1;

else LEDS[4] <= 0;

if(counter[18]) LEDS[5] <= 1;


else LEDS[5] <= 0;

if(counter[17]) LEDS[6] <= 1;

else LEDS[6] <= 0;

if(counter[16]) LEDS[7] <= 1;

else LEDS[7] <= 0;

end

endmodule

You might also like