charsi said:
i'm using Xilinx ISE 6.3i...i'm required to calculate logarithm in my
design...Xilinx wont support type real.
Is there any cure for this..i intend to use Xilinx only.
First, according to 1076.6 the type "real" is not synthesisizable.
I think that the function you really want is in the new "numeric_std"
package.
Download this file:
http://www.eda.org/vhdl-200x/vhdl-200x-ft/packages/additions_11.tar.Z
Compile the file "numeric_std_additions.vhd" (this are just the new
functions, not the whole thing)
Use this function:
signal XXX : UNSIGNED (16 downto 0);
signal log_base_2 : integer;
log_base_2 := find_msb (XXX, '1');
This package will synthesize with XST, the fixed point and floating
point packages will not until Xilinx 8.0 because they use a negative index.