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.

16 bit fixed point math calculation tricks?

Status
Not open for further replies.

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
646
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
6,233
With a 16 bit fixed point dsp, it takes much time to make floating point calculations, 32 bit calculations or other mathematical calculations such as sin, cos etc. I think there are tricks and optimizations to get these operations take less time. May be some are dsp specific and some are general. What are these tricks especially for multiplication, division, sin and cos calculations. Or are there some sources about this subject?
 

You may use matlab's fix-point toolbox to model your algorithm. It has also some demos to illustrate the fix point VS float point calculations.
 

If you need to do many floating point operations, the best that you can do is use a floating point DSP, with a floating point coprocessor, or a floating point ALU.

Many DSPs have a sine look-up table. So you don't need to calculate neither 'sin', neither 'cos'. You only look for the nearest value in the table. If you need high precission, this table can be used to calculate intermediate values if you supose linear varioatin from a point to the next one.
 

Most DSP finish multiplication in one cycle. For SIN or COS operation, use Lagrange expansion or Table to get the value. There is a trade off between the memory and computing complexity.
 

if u want to calculate sin or cos , i think u should use CORDIC algrithm. it's very useful.
 

For this purpose i propose the fractional data representation.
Ie. the data is represented by 16 bit numerator and 16 bit denominator.
The add, multiply,divide operations are implemented as for rational fractions.
It provides much higher precision than 16 bit integers.
Especially the division error is minimized.
I used it for algebraic problem solving very well.
 

You also can use SystemC fixed-point library to do the floating point to fixed-point coversion and then to do the DSP programming.
 

zhaoyimiao said:
You also can use SystemC fixed-point library to do the floating point to fixed-point coversion and then to do the DSP programming.

how can I do that ? ..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top