# VHDL1045: Both active-low and active-high enables should not be used for the same enable signal ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
MEDIUM--Consistency | Conventional30minsynthesis, bug-finder, enable, linty-ultra
``` ## Description ```{raw} html

Noncompliant code example

architecture rtl of fly is
begin
  A: process (clk, rst) is
  begin
    if rst = '1' then
      o1 <= '0';
    elsif rising_edge(clk) then
      if enable = '0' then -- Active-low enable
        o1 <= i1;
      end if;
    end if;
  end process;

  B: process (clk, rst) is
  begin
    if rst = '1' then
      o2 <= '0';
    elsif rising_edge(clk) then
      if enable = '1' then -- Active-high enable
        o2 <= i2;
      end if;
    end if;
  end process;
end architecture;

Compliant solution

architecture rtl of fly is
begin
  A: process (clk, rst) is
  begin
    if rst = '1' then
      o1 <= '0';
    elsif rising_edge(clk) then
      if enable = '1' then -- Active-high enable
        o1 <= i1;
      end if;
    end if;
  end process;

  B: process (clk, rst) is
  begin
    if rst = '1' then
      o2 <= '0';
    elsif rising_edge(clk) then
      if enable = '1' then -- Active-high enable
        o2 <= i2;
      end if;
    end if;
  end process;
end architecture;

Both active-low and active-high enables should not be used for the same enable signal.

``` ## Parameters No parameters. ```{raw} html ```