Altera_Forum
Honored Contributor
10 years agoLocal Reset Conditions - Sync or Async
Just pondering a question, and wondering what other people would do.
We all know that Altera recommends async asserted, sync de-asserted asynchronous resets, and real sync resets have to be emulated. So would it then follow, that if I have some signal that is reset by some other signal, and the global reset, to OR them together to reset the flop asynchronously:
process(clk, rst, local_rst)
begin
if rising_edge(clk) then
op <= ip;
end if;
if rst or local_rst then
op <= '0';
end if;
end process;
Traditionally, I would always treat "local_rst" as a synchronous reset and take the setup timing hit, but would the above be worse from a recovery POV compared to the "traditional" code below:
process(clk, rst)
begin
if rising_edge(clk) then
op <= ip;
if local_rst = '1' then
op <= '0';
end if;
end if;
if rst = '1' then
op <= '0';
end if;
end process;