Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Floating point operations in vhdl.

 
Thread Tools Search this Thread
Old 07-11-2006, 06:49 PM   #1
Default Floating point operations in vhdl.


Hello,
I am looking for effectiv vhdl floating point type.
I need make "+" and "*" operations.
It would be fine if that type had changed (as parameter) bit precision
had 8 to 20 bits.

Thank you for any answer.

Best regards,
Mariusz



MariuszK
  Reply With Quote
Old 07-12-2006, 12:39 PM   #2
rnbrady@gmail.com
 
Posts: n/a
Default Re: Floating point operations in vhdl.

Hi

Try float_pkg_c.vhd from http://www.eda-stds.org/fphdl/

David Bishop is working on fixed and floating point libraries which
will be part of VHDL-2006 from IEEE. The file above is a compatibility
version of these libraries designed to work with current synthesis and
simulation tools (which naturally don't support VHDL-2006).

I use the fixed point version and it works great. The nice part is that
it will soon be part of a IEEE standard.

If you plan to synthesize, be warned that floating point operations in
general take up plenty of space.

If you have trouble getting the library to compile, let me know.
Richard

  Reply With Quote
Old 07-14-2006, 10:28 AM   #3
MariuszK
 
Posts: n/a
Default Re: Floating point operations in vhdl.


napisal(a):
> Hi
>
> Try float_pkg_c.vhd from http://www.eda-stds.org/fphdl/
>
> David Bishop is working on fixed and floating point libraries which
> will be part of VHDL-2006 from IEEE. The file above is a compatibility
> version of these libraries designed to work with current synthesis and
> simulation tools (which naturally don't support VHDL-2006).
>
> I use the fixed point version and it works great. The nice part is that
> it will soon be part of a IEEE standard.
>
> If you plan to synthesize, be warned that floating point operations in
> general take up plenty of space.
>
> If you have trouble getting the library to compile, let me know.
> Richard


Hello,
Thanks. It is looks very interesting.

But how is libraries behave in case multiplication "*"?
What is frequency?
I don't find any pipeline option (make multiplication with higher
freqency but in few clock tact).
Thank you for answer
Mariusz

  Reply With Quote
Old 07-14-2006, 12:11 PM   #4
Ben Jones
 
Posts: n/a
Default Re: Floating point operations in vhdl.


"MariuszK" <> wrote in message
news: ups.com...
> Hello,
> I am looking for effectiv vhdl floating point type.
> I need make "+" and "*" operations.
> It would be fine if that type had changed (as parameter) bit precision
> had 8 to 20 bits.


If you are targeting Xilinx FPGAs, there are Floating Point operator cores
available from the core generator. They are fully parameterizable in both
precision and latency. You can instantiate them in VHDL (they won't be
automatically inserted by synthesis, I'm afraid).

If you are targeting some other FPGA or ASIC technology, then of course this
will not help you!

Cheers,

-Ben-


  Reply With Quote
Old 07-14-2006, 02:54 PM   #5
MariuszK
 
Posts: n/a
Default Re: Floating point operations in vhdl.


Ben Jones napisal(a):
> "MariuszK" <> wrote in message
> news: ups.com...
> > Hello,
> > I am looking for effectiv vhdl floating point type.
> > I need make "+" and "*" operations.
> > It would be fine if that type had changed (as parameter) bit precision
> > had 8 to 20 bits.

>
> If you are targeting Xilinx FPGAs, there are Floating Point operator cores
> available from the core generator. They are fully parameterizable in both
> precision and latency. You can instantiate them in VHDL (they won't be
> automatically inserted by synthesis, I'm afraid).
>
> If you are targeting some other FPGA or ASIC technology, then of course this
> will not help you!
>
> Cheers,
>
> -Ben-

Hello,
I want use Xilinx FPGAs.
Could you precise where can I find that core generator.
What tools do you use?

Sorry. I do not understand yours sentence.
"You can instantiate them in VHDL (they won't be automatically inserted
by synthesis, I'm afraid)."

Best Regards
Mariusz

  Reply With Quote
Old 07-14-2006, 03:28 PM   #6
Ben Jones
 
Posts: n/a
Default Re: Floating point operations in vhdl.

Hi Mariusz,

"MariuszK" <> wrote in message
news: oups.com...
>
> Ben Jones napisal(a):
> > "MariuszK" <> wrote in message
> > news: ups.com...
> > > Hello,
> > > I am looking for effectiv vhdl floating point type.
> > > I need make "+" and "*" operations.
> > > It would be fine if that type had changed (as parameter) bit precision
> > > had 8 to 20 bits.

> >
> > If you are targeting Xilinx FPGAs, there are Floating Point operator

cores
> > available from the core generator. They are fully parameterizable in

both
> > precision and latency. You can instantiate them in VHDL (they won't be
> > automatically inserted by synthesis, I'm afraid).
> >

> I want use Xilinx FPGAs.
> Could you precise where can I find that core generator.
> What tools do you use?


The Core Generator is part of the ISE tool suite from Xilinx. It is also
available from the free "Webpack" edition of the tools. You can read all
about it at the Xilinx website.

> Sorry. I do not understand yours sentence.
> "You can instantiate them in VHDL (they won't be automatically inserted
> by synthesis, I'm afraid)."


So what I mean is, to use these operators you would have to instantiate them
as components and wire up the ports into your design. You cannot just write
"c <= a * b" and have the synthesis tool create a floating-point multiplier
(not yet, anyway). Instead you would write something like:

my_mult : fp_multiplier
generic map (...)
port map
( clk => clock,
a => a,
b => b,
result => c
...
);

Hope that helps.

-Ben-


  Reply With Quote
Old 04-29-2008, 01:35 AM   #7
vhdlfan
Junior Member
 
Join Date: Apr 2008
Posts: 2
Default help

Quote:
Originally Posted by Ben Jones
Hi Mariusz,

"MariuszK" <> wrote in message
news: oups.com...
>
> Ben Jones napisal(a):
> > "MariuszK" <> wrote in message
> > news: ups.com...
> > > Hello,
> > > I am looking for effectiv vhdl floating point type.
> > > I need make "+" and "*" operations.
> > > It would be fine if that type had changed (as parameter) bit precision
> > > had 8 to 20 bits.

> >
> > If you are targeting Xilinx FPGAs, there are Floating Point operator

cores
> > available from the core generator. They are fully parameterizable in

both
> > precision and latency. You can instantiate them in VHDL (they won't be
> > automatically inserted by synthesis, I'm afraid).
> >

> I want use Xilinx FPGAs.
> Could you precise where can I find that core generator.
> What tools do you use?


The Core Generator is part of the ISE tool suite from Xilinx. It is also
available from the free "Webpack" edition of the tools. You can read all
about it at the Xilinx website.

> Sorry. I do not understand yours sentence.
> "You can instantiate them in VHDL (they won't be automatically inserted
> by synthesis, I'm afraid)."


So what I mean is, to use these operators you would have to instantiate them
as components and wire up the ports into your design. You cannot just write
"c <= a * b" and have the synthesis tool create a floating-point multiplier
(not yet, anyway). Instead you would write something like:

my_mult : fp_multiplier
generic map (...)
port map
( clk => clock,
a => a,
b => b,
result => c
...
);

Hope that helps.

-Ben-

Hi,
I downloaded the fplibrary from www.ens-lyon.fr/LIP/Arenaire/Ware/FPLibrary and i was able to synthesize it. The problem i am having is that i dont know how to use it in my code. Forexample, if i want to Add two floating point number, how do i write the statement in vhdl.

is it:
tvar <= Add(A, B);

please could you advise me on what to do. What data type do i declare A, B, tvar. I am trying to download my code to xilinx board.
vhdlfan is offline   Reply With Quote
Old 04-29-2008, 01:45 AM   #8
vhdlfan
Junior Member
 
Join Date: Apr 2008
Posts: 2
Default

I quess my question is how do i instantiate the operation when i download fp library either from www.ens-lyon.fr/LIP/Arenaire/Ware/FPLibrary or http://www.eda-stds.org/fphdl/ please help.
vhdlfan is offline   Reply With Quote
Old 10-04-2008, 04:50 PM   #9
shaz.cute86
Junior Member
 
Join Date: Oct 2008
Posts: 1
Unhappy VHDL code for floating point division..

Hi everybody,

Anybody can help me..??...
I want VHDL code for floating point division...
Please help me......

Rgds,
Siti...
shaz.cute86 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump