UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor serdarrpf
Visitor
9,790 Views
Registered: ‎06-15-2015

Setting up clock wizard and simulation fails

Jump to solution

Hi,
here is a simple test project:
my ZedBoard has sys_clk=100Mhz and with the Clocking Wizard I generated a 10Mhz clock.

Then I just created a simulation file:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity clk_wiz_0_testbench is
end clk_wiz_0_testbench;

architecture Behavioral of clk_wiz_0_testbench is

component clk_wiz_0 is
port (    
clk_in1           : in     std_logic;
clk_out1          : out    std_logic;
reset             : in     std_logic;
locked            : out    std_logic);
end component;

signal clk_in1           : std_logic; --global input clock 100Mhz
signal reset           : std_logic;
signal clk_out1        : std_logic;
signal locked          : std_logic;

begin
uut: clk_wiz_0 port map(clk_in1=>clk_in1, clk_out1=>clk_out1, reset=>reset, locked=>locked);

clk_in1_proc: process
begin
    clk_in1 <= '1';
    wait for 5ns;
    clk_in1 <= '0';
    wait for 5ns;
end process;

reset_behav_proc: process
begin
    reset <= '1';
    wait for 200 ns;
    reset <= '0';
    wait;
end process;    
end Behavioral;



All I get is one spike after the reset and then the output clock remains low. See attached image.

What am I doing wrong?


Thank you very much for helping.


Warm regards,
serdarrpf

simulation_clk_wiz_test.PNG
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
18,438 Views
Registered: ‎07-21-2014

Re: Setting up clock wizard and simulation fails

Jump to solution
Hi,

I can see that "locked" output of PLL/MMCM is not yet high.
run the simulation till this output gets high which indicates that PLL/MMCM is locked to specified output frequency.

Thanks,
Shryeas
----------------------------------------------------------------------------------------------
Try to search answer for your issue in forums or xilinx user guides before you post a new thread.

Kindly note- Please mark the Answer as "Accept as solution" if information provided solves your query.
Give Kudos (star provided in right) to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
18,439 Views
Registered: ‎07-21-2014

Re: Setting up clock wizard and simulation fails

Jump to solution
Hi,

I can see that "locked" output of PLL/MMCM is not yet high.
run the simulation till this output gets high which indicates that PLL/MMCM is locked to specified output frequency.

Thanks,
Shryeas
----------------------------------------------------------------------------------------------
Try to search answer for your issue in forums or xilinx user guides before you post a new thread.

Kindly note- Please mark the Answer as "Accept as solution" if information provided solves your query.
Give Kudos (star provided in right) to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Visitor serdarrpf
Visitor
9,761 Views
Registered: ‎06-15-2015

Re: Setting up clock wizard and simulation fails

Jump to solution
Ahh thank you. So do you think, it makes sense to wait transmitting my data until "locked" output is high?
0 Kudos
Xilinx Employee
Xilinx Employee
9,747 Views
Registered: ‎07-21-2014

Re: Setting up clock wizard and simulation fails

Jump to solution
Hi,
Yes, it always makes sense.
Lock output high ensures that the MMCM has achieved phase
alignment within a predefined window and frequency.
LOCKED will be de-asserted if the input clock stops or the phase
alignment is violated.
so it is always a good practice to rely upon this signal and wait till it gets high.

Thanks,
Shreyas
----------------------------------------------------------------------------------------------
Try to search answer for your issue in forums or xilinx user guides before you post a new thread.

Kindly note- Please mark the Answer as "Accept as solution" if information provided solves your query.
Give Kudos (star provided in right) to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos