Tuesday 11 August 2015

fpga - Avoid using DSPs in Quartus Prime


I like to implement a simple module without using any DSPs on the FPGA. In other words, I like the whole design to be implemented using logic. Is there an option in Quartus Prime that allows me to disable mapping multipliers to DSPs?


If not, can you introduce a good implementation for a multiplier that I can use and fool Quartus Prime to implement it using logic?



Answer



There are two ways to achieve what you desire. One is a project setting, so will affect the entire design, which may or may not be desirable. The other way is module specific using attributes.





Project Wide


Open the project settings, and navigate to the "Compiler Settings" tab on the left. Click the button for "Advanced Settings (Synthesis)" to open the advanced settings window.


Find the option for "DSP Block Balancing", and select "Logic Elements".


This will completely disable the automatic inferring of DSP blocks, instead forcing all inferred multipliers to be implemented in logic.




Module Specific


The module specific alternative is to use the Verilog multstyle attribute to inform Quartus that you want to use logic based multipliers. To do this, add the following line directly above the module definition:


(* multstyle = "logic" *)

For example, you might have:



(* multstyle = "logic" *) module someMultipler ( ...

This will tell Quartus to use logic for any multiplier in this module.


You can do the same to request DSP blocks as well, using (* multstyle = "dsp" *)


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...