A
Anand P Paralkar
Guest
Hi,
I want to include a type conversion in a procedure interface list as shown
below.
The procedure "proc" operates on integer formals (a, b and c) while the
process contains real actuals (a1, b1 and c1).
The procedure call contains type conversion in the association list.
entity test2 is
port (et1 : inout bit);
end entity test2;
architecture tarch of test2 is
procedure proc (variable a , b : in integer;
variable c : out integer) is
begin
c := a + b;
end procedure proc;
begin
testp : process is
variable a1, b1, c1 : real;
begin
proc (a => integer(a1), b => integer(b1), real(c) => c1);--**Type Con
end process testp;
end architecture tarch;
Is it legal to include a type conversion as shown above in a procedure
call? The compiler returns an error:
actual associated with variable parameter must be a variable
for the associations :
a => integer(a1), b => integer(b1)
What the error mean and why is it being reported?
Thanks,
Anand
I want to include a type conversion in a procedure interface list as shown
below.
The procedure "proc" operates on integer formals (a, b and c) while the
process contains real actuals (a1, b1 and c1).
The procedure call contains type conversion in the association list.
entity test2 is
port (et1 : inout bit);
end entity test2;
architecture tarch of test2 is
procedure proc (variable a , b : in integer;
variable c : out integer) is
begin
c := a + b;
end procedure proc;
begin
testp : process is
variable a1, b1, c1 : real;
begin
proc (a => integer(a1), b => integer(b1), real(c) => c1);--**Type Con
end process testp;
end architecture tarch;
Is it legal to include a type conversion as shown above in a procedure
call? The compiler returns an error:
actual associated with variable parameter must be a variable
for the associations :
a => integer(a1), b => integer(b1)
What the error mean and why is it being reported?
Thanks,
Anand