user_rak
user_rak

Reputation: 97

Evaluating exponential function in VHDL

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.

Upvotes: 1

Views: 1842

Answers (1)

user1818839
user1818839

Reputation:

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.

Upvotes: 3

Related Questions