[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: working with fixed point
From: |
Zdenek Hurak |
Subject: |
Re: working with fixed point |
Date: |
Mon, 25 Aug 2003 09:56:27 +0000 |
User-agent: |
KMail/1.4.3 |
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
-------------------------------------------------------------