Why is this an issue?

The preference for asynchronous resets over synchronous resets can be attributed to several key advantages:

  1. Predictable Behavior During Power-Up
  2. Recovery from Unknown States
  3. Simplicity in Design
  4. Testing and Debugging

Drawbacks of Asynchronous Resets

In summary, while asynchronous resets can offer advantages in terms of predictable power-up behavior and quicker state recovery, they also come with their own set of challenges, particularly related to timing and design complexity. The choice often depends on the specific requirements of the system, the timing constraints, and the design methodology being followed. If your design prioritizes immediate state correction or if you're dealing with scenarios where the clock might not be reliable during reset conditions, asynchronous resets could be the better choice. However, in systems where clock distribution is well-managed and where you want to avoid potential asynchronous timing issues, synchronous resets might be preferred.

How to fix it

Code examples

Noncompliant code example

process (clk) is
begin
 if rising_edge(clk) then
   s <= '1';
   if rst = '1' then  -- Synchronous reset
     s <= '0';
   end if;
 end if;
end process;

Compliant solution

process(clk, rst) is
begin
  if rst = '1' then -- Asynchronous reset
    s <= '0';
  elsif rising_edge(clk) then
    s <= '1';
  end if;
end process;

Resources

Related rules