Requirement for static name of signals in procedures prevents looping
In 4.2.2.3 Signal Parameters, P36 of 1076-2019 it states: If an actual signal is associated with a signal parameter of any mode, the actual shall be denoted by a static signal name.
Issue originates in 2.1.1.2 of 1076-1987, P2-4. Has exact same wording.
Signals used in procedures require a static name, which makes it impossible to use loops.
If we have a procedure for a down counter like this:
procedure count_down
(
signal downcounter : inout integer
) is
begin
if downcounter > 0 then
downcounter <= downcounter - 1;
end if;
end count_down;
Now, if we want to have a sequence of counters like this
type integer_array is array (integer range 0 to 4) of integer;
signal counters : integer_array := (7, 8, 9, 10 ,11);
Currently we cannot do this in a clocked process
for i in counters'range loop
count_down(counters(i));
end loop;
, but have to resort to copying the line
count_down(counters(0));
count_down(counters(1));
count_down(counters(2));
count_down(counters(3));
count_down(counters(4));
Proposed solution:
remove these restrictions.
Edited by JimLewis