Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to calculate exponential (fixpoint) in fpga?

Status
Not open for further replies.

jalal.baba

Junior Member level 1
Joined
Feb 5, 2018
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
118
Hi all.
I want calculate exponential (fixpoint & negative) number.
what the best way for this?
please help me thanks.
 

Hi,

* Input data format, valid range?
* Output data format, valid range, reolution?

Klaus
 

* my input is (negative) fixpoint and 16bit.
output format fixpoint and 32bit.
 

Which HDL you using? In VHDL

Are you aware of libraries

use ieee.math_real.all;


function EXP (X : real ) return real;
-- returns e**X; where e = MATH_E

----------------
constant MATH_E : real := 2.71828_18284_59045_23536;
-- value of e

Can also used the log
function LOG (BASE: positive; X : real) return real;
-- returns logarithm base BASE of X; X > 0

You may need to do some type casting from your input!
 

I don't see how the reference to ieee.math_real.exp answers the question for calculate exponential in FPGA, because it's not synthesizable.

You can of course use math_real to calculate a lookup table, or implement the power series calculation used in math_real body in a sequential algorithm. But you should suggest the solution explicitly then.

Lookup table with linear piecewise interpolation would be my first choice.
 
Is it synthesized?

- - - Updated - - -

Can you explain more about it?
thanks
 

Not sure about the question. Lookup table is synthesizable. It has been often suggested at Edaboard for the implementation of various functions in FPGA.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top