www.pudn.com > Sparten3Epaomadeng.rar > FreDiv1000.v
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 20:31:20 04/24/2008
// Design Name:
// Module Name: FreDiv1000
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module FreDiv1000(clk, pclk);
input clk;
output pclk;
reg pclk;
integer count;
initial
count = 1;
always @(posedge clk)
begin
if(count > 1000)
count = 1;
else
count = count;
if(count > 500)
begin
pclk = 1'b1;
count = count+1;
end
else
begin
pclk = 1'b0;
count = count+1;
end
end
endmodule