FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-28-2006, 04:54 PM
[email protected]
Guest
 
Posts: n/a
Default Fixed point arithmetic

Dear all,


I used to play with floating point arithmetic but new for fixed point
arithmetic. Just want to know if there is some standards for fixed
point arithmetic like IEEE754 for floating point ? And is there some
emulation C code for fixed point arithmetic like Softfloat for floating
point?

As far as know, compared to floating point arithmetic , the benefit of
fixed point arithmetic is less complexity (properly mean less area)by
sacrificing the pricision and expression arrange . Is this right ?


Any tips will be appreciated.

Many Thanks


Yibin

Reply With Quote
  #2 (permalink)  
Old 11-28-2006, 05:09 PM
Randy Yates
Guest
 
Posts: n/a
Default Re: Fixed point arithmetic

[email protected] writes:
> [...]
> As far as know, compared to floating point arithmetic , the benefit of
> fixed point arithmetic is less complexity (properly mean less area)by
> sacrificing the pricision and expression arrange . Is this right ?


In general floating point has a higher precision and higher dynamic
range. However, in some cases fixed-point has BETTER precision than
floating point.

One particularly relevent example is the implementation of an FIR
filter in which a typical fixed-point DSP computes each sample with an
extended-range accumulator. Contrast this with floating point, which
requantizes the mantissa with each sum in the convolution equation.
--
% Randy Yates % "Ticket to the moon, flight leaves here today
%% Fuquay-Varina, NC % from Satellite 2"
%%% 919-577-9882 % 'Ticket To The Moon'
%%%% <[email protected]> % *Time*, Electric Light Orchestra
http://home.earthlink.net/~yatescr
Reply With Quote
  #3 (permalink)  
Old 11-28-2006, 06:42 PM
steve
Guest
 
Posts: n/a
Default Re: Fixed point arithmetic


[email protected] wrote:
> Dear all,
>
>
> I used to play with floating point arithmetic but new for fixed point
> arithmetic. Just want to know if there is some standards for fixed
> point arithmetic like IEEE754 for floating point ?


Not that I know of.

And is there some
> emulation C code for fixed point arithmetic like Softfloat for floating
> point?
>
> As far as know, compared to floating point arithmetic , the benefit of
> fixed point arithmetic is less complexity (properly mean less area)by
> sacrificing the pricision and expression arrange . Is this right ?
>

Fixed point => less cost, less power, smaller physical size, more
complex software, more difficult to change
Floating point => more cost, more power, larger chip size, simple
software (no scaling, dynamic range checks etc), easier to translate
your requirements/model into embedded code, easier to update and change

As far as precision and accuracy, one is not better then the other, in
both case you can increase precision and range to whatever you need by
increasing bits; if you think about it, all floating point math
eventually gets implemented using a type of fixed point math, either by
a floating point emulator or FPU

Reply With Quote
  #4 (permalink)  
Old 11-29-2006, 06:49 AM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: Fixed point arithmetic

Randy Yates wrote:
(snip)

> In general floating point has a higher precision and higher dynamic
> range. However, in some cases fixed-point has BETTER precision than
> floating point.


Depending on how you count precision. For fixed point it is usual
to count all the bits (well, usually not the sign bit). For floating
point subtract the exponent bits.

> One particularly relevent example is the implementation of an FIR
> filter in which a typical fixed-point DSP computes each sample with an
> extended-range accumulator. Contrast this with floating point, which
> requantizes the mantissa with each sum in the convolution equation.


It doesn't have to be that way. Many machines generate a long product,
but it is rare for high level languages to allow for it. The S/360
and S/370 short float multiply always generates a long precision
product. An extra two instructions are needed to remove the extra
bits, yet most compilers will do it. x87 code usually does it because
the only good way to avoid it is to store and reload the intermediate.

-- glen

Reply With Quote
  #5 (permalink)  
Old 11-29-2006, 06:56 AM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: Fixed point arithmetic

[email protected] wrote:

> I used to play with floating point arithmetic but new for fixed point
> arithmetic. Just want to know if there is some standards for fixed
> point arithmetic like IEEE754 for floating point ? And is there some
> emulation C code for fixed point arithmetic like Softfloat for floating
> point?


There aren't as many possibilities as with floating point. For binary
arithmetic, assuming you don't mean integer, it is usual to allow the
binary point to be shifted by some number of bits, possibly to the
left of the MSB or to the right of the LSB.

For fixed decimal, as implemented in S/360 and successors from IBM
through the current z/series machines, the decimal point is shifted
some number of decimal digits, possibly some digits to the left of the
MSD or to the right of the LSD.

One could allow any scale factor, even an irrational number,
but that isn't usually done.

> As far as know, compared to floating point arithmetic , the benefit of
> fixed point arithmetic is less complexity (properly mean less area)by
> sacrificing the pricision and expression arrange . Is this right ?


Especially in an FPGA. The shifters needed to do normalization are so
big that a floating point adder is usually bigger than a floating point
multiplier.

-- glen

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Who Offers Fixed-Point Arithmetic Libraries? Tim Wescott DSP 6 06-26-2005 03:49 PM
multiplication (by 0.1, 0.5, 0.7, 1.3 ...) in fixed point arithmetic Stefan Huber DSP 2 08-31-2004 05:16 PM
Synthesisable fixed-point arithmetic package Jonathan Bromley VHDL 1 08-15-2003 05:32 PM
Fixed Point Arithmetic resources Ashwin DSP 6 07-14-2003 08:26 AM


All times are GMT +1. The time now is 03:13 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved