Forum Discussion
Altera_Forum
Honored Contributor
13 years agothere are a couple of methods.
Convert it to unsigned by implicitly making it an array: ASamplexDY(to_integer( unsigned'("" & IsISamplexS) )) <= DxDY; here, the ( "" & IsISamplexS ) makes it an array of length 1, and the unsigned' qualifies it as an unsigned because it could be signed or unsigned. Secondly, write a conversion function yourself:
function to_integer( s : std_logic ) return natural is
begin
if s = '1' then
return 1;
else
return 0;
end if;
end function;
ASamplexDY(to_integer( IsISamplexS )) <= DxDY;