Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Help: How can I implement e(t^2/l^2) in VHDL

Hi! Experts,

Could anyone please help me to implement e(t^2/l^2) in VHDL? where t is continuous time and l is a constant.

Thank you very much in advance.

Regards,

Akilan.T

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    By the way, do you actually mean divergent exp(t^2/l^2) or gauss function exp(-t^2/l^2)?

    --- Quote End ---

    Yes, I mean gauss function exp(-t^2/l^2).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Here the content of LUT must be 1s and 0s right?, but I have the generated values for e^(x) in floating point values where I take x = 0:0.001:10. could you please show me some directions or any links to such sample code?

    Thank you.

    --- Quote End ---

    Your LUT content need be in fixed point signed values, you can interpret it as binary zeros/ones or hex or just decimal. But you precompute the contents in fixed point i.e. by scaling values up to your bit width representation and round up any fractional remainders. Yoy precompute the largest possible expression (e.g. whole of exp(...))