Y
yaveh (Yet Another Vhdl Engineer Hoping)
Hi!
Can´t I overload a procedure and, depending on the type of parameter
passed do different things?
I works for different base types (e.g. boolean vs integer) but I can´t
get to compile this:
architecture sim of my_entity is
...
procedure one (
variable x : std_logic_vector(1 to 4)
) is
begin
....
end procedure;
procedure one (
variable x : std_logic_vector(1 to 8);
) is
begin
...
end procedure;
begin
...
end;
The tool complains about two bodies for the same subprogram or, in a
package declaration,
that a redefinition would happen...
Any workaround at hand?
(YAVEH) Yet Another Verification Engineer Hoping
Can´t I overload a procedure and, depending on the type of parameter
passed do different things?
I works for different base types (e.g. boolean vs integer) but I can´t
get to compile this:
architecture sim of my_entity is
...
procedure one (
variable x : std_logic_vector(1 to 4)
) is
begin
....
end procedure;
procedure one (
variable x : std_logic_vector(1 to 8);
) is
begin
...
end procedure;
begin
...
end;
The tool complains about two bodies for the same subprogram or, in a
package declaration,
that a redefinition would happen...
Any workaround at hand?
(YAVEH) Yet Another Verification Engineer Hoping