guys I m using the following code to generate a 24MHZ clock from a 16Mhz clock but I do not get the desired clock. Can anyone tell me why?? (Clk_in is a 16Mhz clk)
library....
....
entity clk3x is
port
(CLK_IN, RST_DLL : in std_logic;
CLK24Mhz, LOCKED : out std_logic);
end clk3x;
architecture STRUCT of clk3x is
attribute CLKFX_MULTIPLY : string;
attribute CLKFX_DIVIDE : string;
attribute CLKFX_MULTIPLY of U2 : label is "3";
attribute CLKFX_DIVIDE of U2 : label is "2";
signal CLK, CLK_int, CLK_dcm, CLKFX_int, LCK_int, RST_int: std_logic;
signal DUMMY : std_logic := '0';
component IBUFG
port (I : in std_logic; O : out std_logic);
end component;
component BUFG
port (I : in std_logic; O : out std_logic);
end component;
component DCM is
port
(CLKFB,CLKIN,DSSEN,PSCLK,PSEN,PSINCDEC,RST : in std_logic;
CLK0,CLK90,CLK180,CLK270,CLK2X,CLK2X180,CLKDV,
CLKFX,CLKFX180,LOCKED,PSDONE : out std_logic;
STATUS : out std_logic_vector (7 downto 0));
end component;
begin
U1 : IBUFG port map (I => CLK_IN, O => CLK_int);
U2 : DCM port map (CLKIN => CLK_int,
CLKFB => CLK,
RST => RST_int,
DSSEN => DUMMY,
PSINCDEC => DUMMY,
PSEN => DUMMY,
PSCLK => DUMMY,
CLK0 => CLK_dcm,
CLKFX => CLKFX_int,
LOCKED => LCK_int
);
U3 : BUFG port map
(I => CLK_dcm, O => CLK);
RST_int <= RST_DLL;
CLK24MHZ <= CLKFX_int;
LOCKED <= LCK_int;
end architecture STRUCT;
library....
....
entity clk3x is
port
(CLK_IN, RST_DLL : in std_logic;
CLK24Mhz, LOCKED : out std_logic);
end clk3x;
architecture STRUCT of clk3x is
attribute CLKFX_MULTIPLY : string;
attribute CLKFX_DIVIDE : string;
attribute CLKFX_MULTIPLY of U2 : label is "3";
attribute CLKFX_DIVIDE of U2 : label is "2";
signal CLK, CLK_int, CLK_dcm, CLKFX_int, LCK_int, RST_int: std_logic;
signal DUMMY : std_logic := '0';
component IBUFG
port (I : in std_logic; O : out std_logic);
end component;
component BUFG
port (I : in std_logic; O : out std_logic);
end component;
component DCM is
port
(CLKFB,CLKIN,DSSEN,PSCLK,PSEN,PSINCDEC,RST : in std_logic;
CLK0,CLK90,CLK180,CLK270,CLK2X,CLK2X180,CLKDV,
CLKFX,CLKFX180,LOCKED,PSDONE : out std_logic;
STATUS : out std_logic_vector (7 downto 0));
end component;
begin
U1 : IBUFG port map (I => CLK_IN, O => CLK_int);
U2 : DCM port map (CLKIN => CLK_int,
CLKFB => CLK,
RST => RST_int,
DSSEN => DUMMY,
PSINCDEC => DUMMY,
PSEN => DUMMY,
PSCLK => DUMMY,
CLK0 => CLK_dcm,
CLKFX => CLKFX_int,
LOCKED => LCK_int
);
U3 : BUFG port map
(I => CLK_dcm, O => CLK);
RST_int <= RST_DLL;
CLK24MHZ <= CLKFX_int;
LOCKED <= LCK_int;
end architecture STRUCT;