File "blink.v"

Full Path: /home/analogde/www/VERILOG/blink.v
File size: 306 bytes
MIME-type: text/plain
Charset: utf-8


///// 1 secone blinking light
module sec (input CLOCK_50, output reg [8:0] LEDG);

integer count=0;

initial LEDG[0]=1'b0;

always @(posedge CLOCK_50)
begin
	count=count+1;
	if(count == 50_000_000)
	begin
		count=0;
		if(LEDG[0]) LEDG[0]=1'b0;
		else LEDG[0]=1'b1;
	end
end

endmodule