Need code for generating clock doubler using DCM...

Status
Not open for further replies.
Re: xilinx dcm vhdl





hi in synthesis and simulation part this no issues but while implement in to the spartan 3an FPGA it provides only CLK50 output .......

- - - Updated - - -

hi in synthesis and simulation part this no issues but while implement in to the spartan 3an FPGA it provides only CLK50 output .......
i changed the codings like this........

`timescale 1ns / 1ps

module DCM_CLOCK (CLK,CLK50DCM,RST_IN,CLK100,LOCKED_OUT);

input CLK,RST_IN;
output CLK50DCM,CLK100,LOCKED_OUT;


reg [7:0] count = 0;

wire RST_IN;
wire CLK_IN;

wire CLK50DCM, CLK100DCM, CLK100,LOCKED_OUT;
reg CLK50;


DCM_CLK instance_name (
.CLKIN_IN(CLK50),
.RST_IN(RST_IN),
.CLK0_OUT(CLK50DCM),
.CLK2X_OUT(CLK100DCM),
.LOCKED_OUT(LOCKED_OUT)
);

BUFG buf100 (.I(CLK100DCM),.O(CLK100));

always @ (posedge CLK) begin
count <= count + 1;
if(count<=9)
CLK50<=1;
if(count>=10)
CLK50<=0;
if(count>=19)
count<=0;
end
endmodule
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…