Xilinx ISE : type real

C

charsi

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.

plz help...thanks
 
M

Mohammed A khader

Hi,

Real Numbers are not synthesizable . Consider using fix point format
..

-- Mohammed A Khader.
 
A

Alain

Hi,

Which kind log do you want to implement ? Log2, for instance easy to
implement for integer.

function Log2(input : integer) return integer is
variable n : integer;
variable logn : integer;
begin
n := 1;
for i in 0 to 31 loop
logn := i;
exit when (n >= input);
n := n * 2;
end loop;
return logn;
end;
 
D

David Bishop

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top