Bug: Variable and signal assignments cannot be aligned together

Example:

signal a : std_logic;
signal boo : std_logic;
begin
 
p_something : process(clk) is
    variable foo : std_logic;
    variable barbar : std_logic;
begin
    if rising_edge(clk) then
       -- This block can be aligned with Ctrl-Shift-a
       case whateva is
       when 0 =>
       a <= '1';
       boo <= '0';
 
       when 1 =>
       -- OK
       foo := '0';
       barbar := '1';
 
       when others =>
       -- Not OK
       a <= '1';
       boo <= '0';
       foo := '0';
       barbar := '1';
    end case;
    end if;
end process p_something;

known behavior

Hi Trond,

What you see is the expected behavior. The align action vertically aligns identical symbols.

As a workaround, you can first align the signal assignments and then the variable assignments:

-- first this
a   <= '1';
boo <= '0';
foo := '0';
barbar := '1';

-- first this
a   <= '1';
boo <= '0';
-- then this
foo    := '0';
barbar := '1';

Philippe

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.