--- Quote Start ---
If not function then should I write any package for exp. Sorry I havent written any lookup table before so I dont know. And actually I want to design a Gaussian filter with variable window size & sigma value. For that I am using two 1D gaussian.
So the part I want to impliment is
Gauss= exp^(-(x^2)/2*(sigma)^2);
here sigma will vary from 0.1 to 5.
and x is a vector =[-2 -1 0 1 2] for length equal to 5. I want to vary length also. How to do it.please help me with this. If you know any book for these type of operation then please suggest.
--- Quote End ---
Any equation can be implemented in fpga as LUT either fully or partially. In the partial case you do in fpga what is doable and then use LUT.
In your case I suggest:
get x^2 in fpga (x * x), one multiplier
get 2* sigma^2 in fpga, one multiplier and add one zero lsb
truncate above results to suitable bitwidth
divide -x2/(2*sigma^2) in fpga if you can afford a divider, else include this section within LUT
finally get LUT for your exp in software e.g. matlab and put it in a rom
To get LUT of exp:
you need to know range of your result. then just calculate exp of that range in suitable steps and rounded to your rom bitwidth
Then in fpga address LUT with actual fpga result.