florating point and VHDL

A

Amit

Guest
Hello group,

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

Any advice will be appreciated.

Regards,
Amit
 
On Oct 21, 9:07 pm, Amit <amit.ko...@gmail.com> wrote:
Hello group,

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

Any advice will be appreciated.

Regards,
Amit
Here's the best advice I can give:
<http://www.amazon.com/gp/product/1558605207/ref=wl_it_dp/
104-2421050-6034300?ie=UTF8&coliid=I3103P70DYRA10&colid=HAKLM23LK7FG>
 
On Oct 22, 9:15 am, ghel...@lycos.com wrote:
On Oct 21, 9:07 pm, Amit <amit.ko...@gmail.com> wrote:

Hello group,

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

Any advice will be appreciated.

Regards,
Amit

Here's the best advice I can give:
http://www.amazon.com/gp/product/1558605207/ref=wl_it_dp/
104-2421050-6034300?ie=UTF8&coliid=I3103P70DYRA10&colid=HAKLM23LK7FG

Thanks for your respones, I checked the book on Amazon since it allows
me to look inside of it. However, it doesn't explain that much. What
it explains could be found online.

Regards,
Amit
 
Amit wrote:

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?
The * operator works fine for synthesis with ieee.numeric_std.unsigned.

http://home.comcast.net/~mike_treseler/std_mult.vhd
http://home.comcast.net/~mike_treseler/std_mult.pdf
http://home.comcast.net/~mike_treseler/std_mult_fit.pdf

Floating point requires more time or money.

If you mean simulation, use ieee.math_real.all

-- Mike Treseler
 
On Sun, 21 Oct 2007 21:07:04 -0700, Amit <amit.kohan@gmail.com> wrote:

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?
I think Mike Treseler is basically right. For simulation only,
you can just use ordinary VHDL variables of type REAL, and
all the normal arithmetic operations are available. math_real
provides all the usual mathematical library functions. But
if you are trying to build hardware, it's quite likely that
you only *think* you need floating-point, and in fact you
would be at least as well served by fixed-point arithmetic,
which is only integer arithmetic in party dress.

If you really, really want floating-point hardware, there
are two quick answers:
(1) look at the new IEEE synthesisable packages (they've been
mentioned here many times);
(2) you need both + and *. Very roughly:
- add the two exponents, not forgetting to subtract the bias
value if you are using a biased-exponent representation;
- multiply together the two fractions
- normalize the fraction (possible 1-bit left shift) if
necessary; if so, decrement the exponent by 1
- throw away the unused less-significant bits of the fraction,
having first done the necessary rounding on the more
significant bits.
Oh, and there are the special cases for zero, and proper
handling of Not-A-Number inputs, and overflow, and
denormalization if the exponent underflows, and choice of
rounding mode, and remembering to handle the hidden units
bit if you're using any of the standard formats, and
correctly manipulating the sign bit, and...

See what I mean? You really DON'T want floating-point, do you? :)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
On Oct 22, 11:14 am, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
On Sun, 21 Oct 2007 21:07:04 -0700, Amit <amit.ko...@gmail.com> wrote:
Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

I think Mike Treseler is basically right. For simulation only,
you can just use ordinary VHDL variables of type REAL, and
all the normal arithmetic operations are available. math_real
provides all the usual mathematical library functions. But
if you are trying to build hardware, it's quite likely that
you only *think* you need floating-point, and in fact you
would be at least as well served by fixed-point arithmetic,
which is only integer arithmetic in party dress.

If you really, really want floating-point hardware, there
are two quick answers:
(1) look at the new IEEE synthesisable packages (they've been
mentioned here many times);
(2) you need both + and *. Very roughly:
- add the two exponents, not forgetting to subtract the bias
value if you are using a biased-exponent representation;
- multiply together the two fractions
- normalize the fraction (possible 1-bit left shift) if
necessary; if so, decrement the exponent by 1
- throw away the unused less-significant bits of the fraction,
having first done the necessary rounding on the more
significant bits.
Oh, and there are the special cases for zero, and proper
handling of Not-A-Number inputs, and overflow, and
denormalization if the exponent underflows, and choice of
rounding mode, and remembering to handle the hidden units
bit if you're using any of the standard formats, and
correctly manipulating the sign bit, and...

See what I mean? You really DON'T want floating-point, do you? :)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.brom...@MYCOMPANY.comhttp://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.

Thanks to you guys but whatever I find it just theory. It seems nobody
likes the floating point as Jonathan pointed out!

I have 4 different books of vhdl and none of them has talked about
floating point multiplications. Currently I'm using Quartus II 6.1 and
it is shipped by the board on a CD but it is all verilog and even when
I follow its steps I get error during compilation (using
MegaFunctions) I really don't know what to do.
 
On Mon, 22 Oct 2007 11:55:21 -0700,
Amit <amit.kohan@gmail.com> wrote:

I have 4 different books of vhdl and none of them has
talked about floating point multiplications.
This is a CLUE.

Almost NO-ONE needs FP, except CPU designers who must provide it
so that people can write software with it.

You have not yet convinced us that you need FP at all.

The IEEE-754 FP standard provides enough information so that
you could implement it (or parts of it) in VHDL, provided you
are a competent hardware designer. But YOU DON'T NEED TO BOTHER.
Spend your time, and learning effort, on something more useful.
Learn about fixed-point, which will be really useful to you if
you want to do any DSP, 3D graphics, machine control or other
numerically-intensive applications. Floating-point is for
software weenies who lack the wit to calculate in advance
what precision they need :)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
On Oct 22, 12:16 pm, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
On Mon, 22 Oct 2007 11:55:21 -0700,

Amit <amit.ko...@gmail.com> wrote:
I have 4 different books of vhdl and none of them has
talked about floating point multiplications.

This is a CLUE.

Almost NO-ONE needs FP, except CPU designers who must provide it
so that people can write software with it.

You have not yet convinced us that you need FP at all.

The IEEE-754 FP standard provides enough information so that
you could implement it (or parts of it) in VHDL, provided you
are a competent hardware designer. But YOU DON'T NEED TO BOTHER.
Spend your time, and learning effort, on something more useful.
Learn about fixed-point, which will be really useful to you if
you want to do any DSP, 3D graphics, machine control or other
numerically-intensive applications. Floating-point is for
software weenies who lack the wit to calculate in advance
what precision they need :)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.brom...@MYCOMPANY.comhttp://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.

Thanks for your advice.

Regards
Amit
 
Hi,

There is something worth having a look at, the Arenaire project, at
http://www.ens-lyon.fr/LIP/Arenaire/
Unfortunately, most part of the information is in french ...

regards

csb

On 22 oct, 06:07, Amit <amit.ko...@gmail.com> wrote:
Hello group,

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

Any advice will be appreciated.

Regards,
Amit
 
On Oct 22, 12:07 am, Amit <amit.ko...@gmail.com> wrote:
Hello group,

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

Any advice will be appreciated.

Regards,
Amit
Try this:
http://www.opencores.org/projects.cgi/web/fpu100/overview
 
On Oct 22, 12:07 am, Amit <amit.ko...@gmail.com> wrote:
Hello group,

Regarding floating point multiplication in VHDL. Can I use the regular
* operator or should I use Adder for this matter?

Any advice will be appreciated.

Regards,
Amit
Try this:
http://www.opencores.org/projects.cgi/web/fpu100/overview
 

Welcome to EDABoard.com

Sponsor

Back
Top