Why is this an issue?

There are several reasons why the rising edge of a clock is generally favored over the falling edge for clock domains:

  1. Consistency with Other Systems
  2. Tool Support and Synthesis
  3. Signal Integrity
  4. Design Practice and Readability
  5. Timing Analysis
  6. Clock Gating and Power Management

While there's no inherent technical limitation preventing the use of falling edges, the preference for rising edges stems from these practical considerations in design, implementation, and verification. However, in some specialized applications, falling edge triggered designs might be chosen for specific reasons, but this is less common.

How to fix it

Code examples

Noncompliant code example

process(clk)
begin
  if(clk'event and clk='0') then -- Noncompliant: Falling
    xr <= not xr;
  end if;

  if(not clk'stable and clk='0') then -- Noncompliant: Falling
    xr <= not xr;
  end if;

  if(falling_edge(clk)) then -- Noncompliant: Falling
    xr <= not xr;
  end if;
end process;

Compliant solution

process(clk)
begin
  if(clk'event and clk='1') then -- Compliant: Rising
    xr <= not xr;
  end if;

  if(not clk'stable and clk='1') then -- Compliant: Rising
    xr <= not xr;
  end if;

  if(rising_edge(clk)) then -- Compliant: Rising
    xr <= not xr;
  end if;
end process;

Resources

Related rules