Start for free Book a free session

Positional associations

A positional association doesn’t mention the name of its formal: the actual at a given position in the association list corresponds to the interface’s element at the same position (LRM 6.5.7.1). Sigasi reports association lists whose positional associations cannot be matched with formals. Such a list is often results from changing the ports or generics of a declaration without updating the instantiation.

Incorrect number of associations found in mapping

In a port or generic map, each positional actual needs a formal at the same position (LRM 6.5.7.1). Sigasi reports the first actual for which no formal is available (rule 32). It also reports a map with only positional associations that ends before every generic or input port without a default value has an actual (LRM 6.5.6.3, 6.5.6.2).

VHDL
component counter
  port(
    clk   : in  std_logic;
    reset : in  std_logic;
    count : out unsigned(7 downto 0)
  );
end component;

i_counter : counter port map(clk, rst, cnt, ovf); -- four actuals for three ports
i_counter : counter port map(clk);                -- reset has no actual and no default value
i_counter : counter port map(clk, rst);           -- allowed, count is an output and can be left out
i_counter : counter port map(clk, rst, cnt);      -- one actual for each port

A positional association cannot follow after a named association

Named associations can be given in any order, but when an association list uses both named and positional styles, all positional associations must come first. Once a named association is used, the list can only contain named associations (LRM 6.5.7.1). Sigasi reports the first positional association that follows a named one (rule 33).

VHDL
component counter
  port(
    clk   : in  std_logic;
    reset : in  std_logic;
    count : out unsigned(7 downto 0)
  );
end component;

i_counter : counter port map(clk => clk, rst, cnt);                   -- positional after named
i_counter : counter port map(clk, reset => rst, count => cnt);        -- positional associations come first
i_counter : counter port map(clk => clk, reset => rst, count => cnt); -- or provide every formal