Forum Discussion
I would avoid using floating-point in your situation, converting to FP, performing one scaling operation, and converting back to fixed-point does not make sense, just use fixed-point. If you are scaling from 5V to 0.8902V multiply your full signal by (0.8902V/5V) = 0.17804. Depending on how accurate the scaling must be, I would recommend using 24x18 mult with the scale factor in Q1.17 format (or unsigned 18 bit fraction) and the result is taken to be the upper 24 bits (excluding the duplicate sign bit). With respect to hardware used, Quartus has been improving its ability to infer multipliers (in the form of megafunctions) from HDL * operators, but if you want good control over the hardware generated including pipeline stages and clk enables then use the megafunctions. The megafunctions allow for control between using "hard" or "soft" multipliers. Additionally, altmult_add allows more control over the embedded multiplier block than the lpm_mult. Also, the Altera megafunctions will automatically add the partial products.