Forum Discussion
Altera_Forum
Honored Contributor
13 years agokosh is correct, with constant inputs Quartus will just plug in the answer instead of instantiating hardware for the division (just like software compilers would).
If you want to experiment with different implementations and want a somewhat accurate logic count I would assign the inputs and outputs to virtual pins. Depending on what you are attempting lpm_div might be overkill. Do you have bounds on your inputs (assuming they aren't constant... otherwise there is no point using lpm_div). For example a narrow division by constant can be replaced with a lookup table. Or if you are performing a wide division by constant you can replace that with shifts and adds. If you don't care about pipelining the results you can also go with a serial divider (implemented as long division). So there are lots of alternatives but most of them require you to determine the bounds of the problem you are trying to solve.