I'm not sure, but I think the goal of the LRM limitation was to be able
to _locally_ statically determine the list of signals that a process
(implied or explicit) drives. Changing that would mean that the list
would not be available until during/after elaboration, which is when
the list of drivers for each signal is trying to be built. Your
proposed change would not be trivial to implement. Perhaps the LRM
limitation could be restated in such terms (assuming that was the
goal), to allow procedures declared within an architecture to drive
signals/ports declared within that entity/architecture, but that would
not help your situation.
To simplify the argument list on testbench procedures, I have used
record types, with an inout mode on the entire record port. That means
you can only use resolved types in the record, and every procedure must
drive a 'Z' on every element that is not really being driven from the
procedure. This works well for procedures like read(bus, addr, data),
etc. where bus is a record of all the signals of the bus (pci, vme,
60x, etc.)
One of the proposed new things to work on in future versions of VHDL is
"interfaces", whatever they mean by that... One nice thing to have
would be user-defined modes that define individual modes (in, out,
inout, etc.) on elements of record definitions, thus you could have a
"master" mode for a bus port on a procedure that initiates transactions
(like read(), write(), etc.), a "slave" mode for a bus port on a
procedure that only responds to transactions (like a memory, etc.), and
a "monitor" mode for procedures or entities that perform protocol
checking, etc. That would allow you to avoid using inout on everthing,
and to use unresolved data types in bus records that would greatly
speed up simulations.
Andy
yaveh (Yet Another Vhdl Engineer Hoping) wrote:
> Hello!
>
> I am currently doing some testbench pre-studies involving some Mixed
> Analogue Digital (MAD
> components, and have tried an implementation using global signals
> (signals defined in a package)
> to communicate events between the different instances.
>
> I have tried to provide the final testbench user with procedures (that
> I had planned to write in the
> package body) that drive these global signals with statements like
> (code complexity reduced for posting):
>
> procedure pulseA is
> begin
> sigA <= '1', '0' after 50 ns;
> end;
>
> only to find out that, according to LRM 93[8.4.1]:
>
> [..]
> If a given procedure is declared by a declarative item that is not
> contained within a process statement, and if a signal assignment
> statement appears in that procedure, then the target of the assignment
> statement must be a formal parameter of the given procedure or of a
> parent of that procedure, or an aggregate of such formal parameters.
> [..]
>
> NOTES
> 1--These rules guarantee that the driver affected by a signal
> assignment statement is always statically determinable [..] In this
> case, the affected driver is the one defined by the process[..]
>
> In short words: My implementation doesn´t work.
>
> However, I would say that if the main purpose of these particular rules
> is to "guarantee that the driver affected by a signal assignment
> statement is always statically determinable", the driver that the
> signal assignment
> statement in the package body affects is in my opinion static.
>
> Any other opinion?
>
> Best thanks in advance for a fruitful conversation,
>
> yaveh (Yet Another Vhdl/Verification Engineer Hoping)