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