Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

inference of multipliers from VHDL

Altera_Forum
Honored Contributor II
1,970 Views

Hello, 

 

I am working with a Cyclone 2, she has many 8*8 multipliers. 

 

I have a module where I use multiplications. 

 

After compiling my VHDL code I can see with the "RTL Viewer" the multiplicators. 

 

But when I look the summary of the fitter I can see that my design does not use the embedded multipliers. 

 

So, how the FPGA is doing the multiplication, with LUT's? Why she does not use the embedded multipliers? 

 

Here I attach an image of the RTL. 

 

She is a bad girl "cyclone 2". 

 

Bye, thank you.
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
974 Views

You may want to override the default behaviour by VHDL attributes, e.g. on an architecture level: 

 

architecture rtl of my_design is attribute multstyle : string; attribute multstyle of rtl : architecture is "dsp";
0 Kudos
Altera_Forum
Honored Contributor II
974 Views

Hello, 

 

You are right, thank you. I added this two lines and now the multiplier is inferred. 

 

I have a question please. 

 

How was done the multiplication before add this two lines?  

 

Is better if I use the embedded multipliers I guess. 

 

Good Bye, and once again thank you. 

 

DABG
0 Kudos
Altera_Forum
Honored Contributor II
974 Views

I'm not sure about the criteria that rule multiplier inference. But as long as the timing constraints are kept, there's no problem in using logic style multiplier, particulary with small word width. I hope, that Quartus changes to dsp style, if timing closure can't be achieved.

0 Kudos
Altera_Forum
Honored Contributor II
974 Views

from your RTL Viewer image the circled multipler looks like it has a constant coefficient. this type of multiplier is built very efficiently in LE, it was probably a smart choice for Quartus to use them instead of a multiplier. you can always force a hard multiplier as mentioned.

0 Kudos
Altera_Forum
Honored Contributor II
974 Views

Hello Pancake, 

 

Yes, it was a multiplication with a constant. 

 

I forced the use of an embedded multiplicator (using the magic lines of FVM), but the timing according with the timer analyzer is worst. 

 

I guess, Quartus did a good election when doing it with LE instead using Embedded multipliers. 

 

Good Luck.
0 Kudos
Reply