clros
Member level 2
Hi to all,
Ok, I have discovered that a my function work when I do:
But, it do not work when I do:
I do not understand... what is wrong?
Ok, I have discovered that a my function work when I do:
Code:
function myConvert (A : in STD_LOGIC_VECTOR( 7 DOWNTO 0 ) ) return integer is
variable output : integer := 0;
begin
output := 5;
return output;
end function;
But, it do not work when I do:
Code:
function myConvert (A : in STD_LOGIC_VECTOR( 7 DOWNTO 0 ) ) return integer is
variable output : integer := 0;
begin
if a(7 downto 6) = "00" then
Output := 1;
elsif a(7 downto 6) = "01" then
Output := 2 ;
end if;
return output;
end function;
I do not understand... what is wrong?