Forum Discussion
Altera_Forum
Honored Contributor
11 years agoDividing numbers by constants without dividers?
Hi! I would like to divide a number by a set of constants (3, 5 or 7) and I have read in an old post that using a divider might be a waste of resources. I have also read that for simple divisio...
Altera_Forum
Honored Contributor
11 years agoYou can use lpm_mult if you want, it gives you direct control over the primitive, but if it makes the code easier to read why not just stick a multiply directly in the code and let the synthesisor put the multiplier in? As long as you register the inputs and outputs it should infer the registers inside the DSP slot.
If you have trouble with timing, the problem is more likely the routing in and out of the DSP. If this is the case, just add extra registers in the pipeline in your code. But At 178MHz, I dont think you'll need them.