B
Beppe
Consider the following system:
inp_clk -- Input clock to FPGA (Xilinx Spartan 3A DSP)
-- directly routed to DCM
-- PERIOD constraint attached to it
-- Frequency: 125 MHz
clk_25 -- CLKDV_OUT from DCM
-- Frequency: 25 MHz
clk_28 -- CLKFX_OUT from DCM
-- Frequency: inp_clk*7/31 MHz
clk_250k -- Output from a VHDL-module that divides the clk_25 with
100
-- Frequency: 250 kHz
CTRL_PROC : process (clk_250k)
begin
if rising_edge(clk_250k) then
if reset = '1' then
reg1 <= '0';
else
if byte_received = '1' then
if data_in = “10101010” then
reg1 <= '1';
else
reg1 <= '0';
end if;
end if;
end if;
end if;
end process;
CNT_PROC : process (clk_28)
begin
if rising_edge(clk_28) then
if reset = '1' then
cnt <= (others => ‘0’);
else
if reg1 = '1' then
cnt <= cnt + 1;
else
cnt <= cnt - 1;
end if;
end if;
end if;
end process;
reg1 is assigned a value in CTRL_PROC and read in CNT_PROC and thus it
is crossing clock domains. Do I need to worry about that in the above
situation and apply some asynchronous clock domain techniques? I’m
asking since the two clocks actually are related to each other. So,
main question:
When are two clock domains actually considered asynchronous?
Some related questions. How does ISE/XST handle the situation? As I
understand the Xilinx software automatically derives a new PERIOD for
each of the DCM output clocks and determines the clock relationships
between the output clock domains. There will probably be moments where
the edges of the two clocks are so close that the timing won’t be met.
Do I need to insert a FALSE PATH constraint in this case?
And, last question, should I put the clk_250k on a global clock path?
Regards
Beppe
inp_clk -- Input clock to FPGA (Xilinx Spartan 3A DSP)
-- directly routed to DCM
-- PERIOD constraint attached to it
-- Frequency: 125 MHz
clk_25 -- CLKDV_OUT from DCM
-- Frequency: 25 MHz
clk_28 -- CLKFX_OUT from DCM
-- Frequency: inp_clk*7/31 MHz
clk_250k -- Output from a VHDL-module that divides the clk_25 with
100
-- Frequency: 250 kHz
CTRL_PROC : process (clk_250k)
begin
if rising_edge(clk_250k) then
if reset = '1' then
reg1 <= '0';
else
if byte_received = '1' then
if data_in = “10101010” then
reg1 <= '1';
else
reg1 <= '0';
end if;
end if;
end if;
end if;
end process;
CNT_PROC : process (clk_28)
begin
if rising_edge(clk_28) then
if reset = '1' then
cnt <= (others => ‘0’);
else
if reg1 = '1' then
cnt <= cnt + 1;
else
cnt <= cnt - 1;
end if;
end if;
end if;
end process;
reg1 is assigned a value in CTRL_PROC and read in CNT_PROC and thus it
is crossing clock domains. Do I need to worry about that in the above
situation and apply some asynchronous clock domain techniques? I’m
asking since the two clocks actually are related to each other. So,
main question:
When are two clock domains actually considered asynchronous?
Some related questions. How does ISE/XST handle the situation? As I
understand the Xilinx software automatically derives a new PERIOD for
each of the DCM output clocks and determines the clock relationships
between the output clock domains. There will probably be moments where
the edges of the two clocks are so close that the timing won’t be met.
Do I need to insert a FALSE PATH constraint in this case?
And, last question, should I put the clk_250k on a global clock path?
Regards
Beppe