Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThat really depends what you need. What is the input datatype (integer, fixed point, floating point) how many bits; which precision do you need? Bad news is: you cannot just type a <= log(b); and hope that the synthesis tool will take care of the rest.
On one extreme, if you want a 64 bit float input and output, I guess you will need to spend money on buying an IP core. On the other hand, if you want a 6 bit fixed point input, you can probably just use a lookup table. That is a ROM that contains all the pre-calculated values. If you need more precision than what can be stored in a lookup table, you could create a rough lookup table and do interpolations from there (first order or second order). There are a lot more possible implementations.