My first, simple question on LUT...

what is the required precision? If 0.5

dB or less then a combination of a

barrel shifter and a 4 LUT will get you

a pretty compact solution. Look at my

"quick and dirty logarithms" post

http://www.dspguru.com/comp.dsp/tricks/alg/quicklog.htm.

That describes a log circuit I've used

many times in FPGAs.

Doing it in VHDL depends on the

capability of your synthesis tools. If

you are using Synplicity, you can encode

the LUT portion as a ROM, and the tools

will correctly infer the ROM. If you

are using a less capable tool, such as

the foundation tools then you might have

to structurally instantiate the LUTs and

load up the look up values.

Quote:

> I'm a student and so I apologize for this silly question ;-P...

> I have to implement a logarithm-function on a FPGA ...how can I do this in

> VHDL using a LUT?

> ( in particular the function is quite complex:

> Y=max*(A,B)=max(A,B)+log(1+exp(-|A-B|)) --- where A,B,Y is a 8bit

> "integer" values )

> thank you for the help!

--

-Ray Andraka, P.E.

President, the Andraka Consulting Group,

Inc.

401/884-7930 Fax 401/884-7950

http://www.andraka.com or

http://www.fpga-guru.com