jdh_1984
Member level 2
Hi
I am trying to convert a signal from sfixed to ufixed, using the syntax given in the fixed package documentation:
-- Conversion from sfixed to ufixed (performs an "abs" function)
function to_ufixed (
arg : UNRESOLVED_sfixed)
return UNRESOLVED_ufixed;
My code:
SIGNAL result : ufixed(8 DOWNTO -4);
SIGNAL position : sfixed(8 DOWNTO -4);
:
:
result<=to_ufixed(position);
In quartus 9.1 the following error message is given:
Error (10476): VHDL error at hjulenkodernxt.vhd(96): type of identifier "position" does not agree with its usage as "UNSIGNED" type
Have I done anything wrong? Is it a alternative way to do this conversion?
I am trying to convert a signal from sfixed to ufixed, using the syntax given in the fixed package documentation:
-- Conversion from sfixed to ufixed (performs an "abs" function)
function to_ufixed (
arg : UNRESOLVED_sfixed)
return UNRESOLVED_ufixed;
My code:
SIGNAL result : ufixed(8 DOWNTO -4);
SIGNAL position : sfixed(8 DOWNTO -4);
:
:
result<=to_ufixed(position);
In quartus 9.1 the following error message is given:
Error (10476): VHDL error at hjulenkodernxt.vhd(96): type of identifier "position" does not agree with its usage as "UNSIGNED" type
Have I done anything wrong? Is it a alternative way to do this conversion?