[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: working with fixed point
From: |
David Bateman |
Subject: |
Re: working with fixed point |
Date: |
Mon, 25 Aug 2003 12:24:35 +0200 |
User-agent: |
Mutt/1.3.28i |
Step 1) Create a scalar fixed point class with some basic operations. This is
relatively trivial
Step 2) Get a generic matrix template library, there are several publically
available, such as "The Matrix Template Library" available at
http://www.osl.iu.edu/research/mtl/intro.php3. USe it with your
new fixed point class.
Step 3) Create a new octave type to interface to your template library
We have this is proprietrary code here, and the person who wrote it assured
me that the extension of the MTL library to handle fixed point was pretty
trivial.
Cheers
David
According to Zdenek Hurak <address@hidden> (on 08/25/03):
> Well, I think this will not be as easy as that. Converting the data is one
> step only, but Ravid obviously wants to calculate in fixed point arithmetics
> too.
>
> Considering that the "fixed-point skills" are by far the most expensive
> component in commercial Matlab suite, it can be expected that solution is not
> trivial.
>
> Zdenek Hurak
>
>
>
>
>
>
>
> Dne ne 24. srpen 2003 10:08 Per Persson napsal(a):
> > How about
> > B=7;
> > ## Truncation of x to B fractional bits
> > x_qt = 2^-B*floor(x*2^B);
> > ## Rounding of x to B fractional bits
> > x_qr = 2^-B*floor(x*2^B + 0.5);
> >
> > You'll have to check for range overflow etc. manually.
> >
> > HTH,
> > Per
> >
> > On Sunday, August 24, 2003, at 11:30 AM, address@hidden wrote:
> > > Hi,
> > > I want to convert a floating point octave program into fixed point
> > > (with
> > > about 7 bits representation) - for simulating its behaviour on fpga.
> > > How can I do it?
> > > Thanks
> > > Ravid
> >
> > -------------------------------------------------------------
> > Octave is freely available under the terms of the GNU GPL.
> >
> > Octave's home on the web: http://www.octave.org
> > How to fund new projects: http://www.octave.org/funding.html
> > Subscription information: http://www.octave.org/archive.html
> > -------------------------------------------------------------
>
> --
> Zdenek Hurak
> Center for Applied Cybernetics, Czech Technical University
> Karlovo namesti 13/E, 12135, Prague, Czech Republic
> Tel.: +420 224357683, Fax: +420 224616648
> E-mail: address@hidden, Web: http://ar.c-a-k.cz/hurak
>
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------