EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

synthesizing

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - FPGA - synthesizing

ECS.MSc.SOC
Guest

Mon Jul 25, 2011 6:37 pm   



Hi all

I want to calculate a simple formula, including multiply and division
operands. I use Verilog language to program FPGA.

Can I use the sign of Multiplication (*) and Division (/)? Or I have
to write the code of a Multiplication algorithm like Booth?

Regards

Rob Gaddi
Guest

Mon Jul 25, 2011 6:37 pm   



On 7/25/2011 9:37 AM, ECS.MSc.SOC wrote:
Quote:
Hi all

I want to calculate a simple formula, including multiply and division
operands. I use Verilog language to program FPGA.

Can I use the sign of Multiplication (*) and Division (/)? Or I have
to write the code of a Multiplication algorithm like Booth?

Regards

That depends on whether you expect the math to be done in the hardware
or at compile time. If it's the latter, you can do whatever you'd like.
If the former, then it'll depend. Most FPGA families have multiplers
and the tools are smart enough to use those multipliers to perform a
multiply when you specify one.

Divides (by other than a power of 2) are a pain, and always require
serial algorithms to do them. You'd be well served trying to replace
that divide with a reciprocal multiply if possible.

--
Rob Gaddi, Highland Technology
Email address is currently out of order

Nico Coesel
Guest

Mon Jul 25, 2011 6:37 pm   



"ECS.MSc.SOC" <mahdiyar.sarayloo_at_gmail.com> wrote:

Quote:
Hi all

I want to calculate a simple formula, including multiply and division
operands. I use Verilog language to program FPGA.

Can I use the sign of Multiplication (*) and Division (/)? Or I have
to write the code of a Multiplication algorithm like Booth?

That depend on the synthesis tools. I guess with most modern tools you
can use the * and / sign. How it gets mapped to the hardware depends
on the target. You really should consult the manual of the synthesis
tool on how this is handled.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico_at_nctdevpuntnl (punt=.)
--------------------------------------------------------------

Tim Wescott
Guest

Mon Jul 25, 2011 6:37 pm   



On Mon, 25 Jul 2011 09:37:22 -0700, ECS.MSc.SOC wrote:

Quote:
Hi all

I want to calculate a simple formula, including multiply and division
operands. I use Verilog language to program FPGA.

Can I use the sign of Multiplication (*) and Division (/)? Or I have to
write the code of a Multiplication algorithm like Booth?

If you can stand the repetition: it depends on your tools, and what
you're trying to do.

If you're multiplying integers then most tools will see a '*' and map it
to a hardware multiplier (or synthesize one). I wouldn't trust a
synthesizer to know how to do a fixed-point multiply that wasn't integer,
although I would give it a whirl and see what happened. Divide is so
resource hungry that there are a tremendous number of system-level
decisions to be made in implementing it: I would be astonished at a
synthesizer that would see a '/' and automagically map it to some sort of
a divide.

You need to read up on the algorithms in question to see why divide is so
different from multiply, and to get an idea of what you might have to do
to make it work. (Although I expect that most FPGA manufacturers and/or
tool chain vendors will have some sort of divide primitive wizard that
you can at least use for the bit-slice portion, even if you have to wrap
it with your own sequencing logic).

--
www.wescottdesign.com

elektroda.net NewsGroups Forum Index - FPGA - synthesizing

Ask a question - edaboard.com

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony