Altera_Forum
Honored Contributor
15 years agoProblem with hold timing violation
Hi all,
I always a have a "timing not met" critical warning when compiling a VHDL module. I think the problem is restricted to this part of code, since the involved signal appears only here.
signal rx_clk : std_logic;
p_on: process(clk,sreset)
begin
if (sreset = '1') then
run <= '0';
run2 <= '0';
elsif rising_edge(clk) then
if (crs_intern = '0')and(crs_intern2 = '0')and(rx_clk = '0') then
run <= '0';
elsif (crs_intern = '1')and(rxd_intern = "01") then
run <= '1';
end if;
if (rx_clk = '1') then
run2 <= run;
end if;
end if;
end process p_on;
p_receive: process(clk,sreset)
begin
if (sreset = '1') then
rx_clk <= '0';
low_rxd_intern <= "00";
out_rxd_intern <= "0000";
elsif rising_edge(clk) then
if (run = '0')and(crs_intern = '1')and(rxd_intern = "01") then
rx_clk <= '0';
else
rx_clk <= not rx_clk;
end if;
if (rx_clk = '0') then
low_rxd_intern <= rxd_intern2;
end if;
if (run = '0') then
out_rxd_intern <= "0000";
else
if (rx_clk = '1') then
out_rxd_intern <= rxd_intern2 & low_rxd_intern;
end if;
end if;
end if;
end process p_receive;
mac_RXD <= out_rxd_intern;
mac_RX_CLK <= rx_clk;
TimeQuest reports 2 hold viming violations. The reported failing path is the same for both (?), but the hold slack is usually different: i.e. -2.26ns and -2.44ns Launch clock: rx_clk falling edge From node: rx_clk|q Latch clock: clk rising edge To node: rx_clk|d clk frequency is 50MHz I can't understand why I get this error. Maybe is something evident for a VHDL expert, who I am not. In particular I can't understand why I have rx_clk falling edge as launch clock; I don't use this edge for sampling anything; all is synchronized to clk. Neither I can understand why I have 2 identical failing paths with different slacks. Regards Cris