Pass constants to signal/variable ports in procedure calls
For the following procedure, I would like to assign a constant to a signal/variable port when calling a procedure. When I've got some helper procedures that I use in a verification library, I might sometimes want to default the enable to '1'
, but not provide it as a default value for the signal/variable in the procedure declaration. In the below case, I might be using the en
port as an overload for another very similar procedure, so putting default on the en
port doesn't always solve the problem. Reference the example procedure below:
procedure example(
signal clk : in std_logic;
signal en : in std_logic
) is
begin
<code here>
end procedure;
Now, I would like to call the procedure with a constant value for the enable like so:
example(clk, '1');
This should also support an actual constant
type as well.