Вопрос

I need to implement a exponential term "exp((-x²*0.008)-0.5)" in VHDL. Here 'x' is 18-bit fixed point signal ranging between (-90.0 to 90.0). When I went through internet, one solution I found is using taylor series expansion. Is there an alternative solution which better suits my need. If using taylor series is the only solution to evaluate the 'exp' function then what should be the summation limit ? Thank you.

Это было полезно?

Решение

The summation limit should be whatever is required to meet your required accuracy. It is usually best to find that out in other tools (even a spreadsheet!) before worrying about VHDL.

For sufficiently smooth curves, a quadratic interpolation using coefficients from a small lookup table may be accurate enough, (again : evaluate in MatLab, Octave or spreadsheet) and is fairly easy to implement.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top