I suggest using the fixed_pkg.
Newer versions of modelsim (10.0+) have VHDL 2008 support, and the fixed_pkg is in the ieee libary. Just add to your code:
include ieee.fixed_pkg.all;
And you will have access to the ufixed and sfixed types.
- - - Updated - - -
Then for synthesis, you'll need the '93 versions of the libraries, available from www.vhdl.org/fphdl
i used library IEEE_proposed;
use IEEE_proposed.fixed_pkg.ALL; but during synthesis for spartan 3e it shows error.Line 23. Library IEEE_proposed cannot be found.
Line 24. Library IEEE_proposed is not declared.
can u help me.
You need to add the IEEE_proposed package to your project. Like the name of the library, it is not standard VHDL code, it is the stuff that was proposed for the vhdl 2008 revision.
Neither quartus nor vivado are yet to have full VHDL 2008 support. Hence you need to add the compatability packages yourself.