Forum Discussion
Altera_Forum
Honored Contributor
14 years agoMultiplication Rounding
Hey guys, I am multiplying two 32 bit numbers using LPM_MULT. Each number is in Q16.16 fixed point format. The product is a 64 bit Q32.32 number. I then shift the product to the ri...
Altera_Forum
Honored Contributor
14 years agoSome engineers use the following notation for bit growth issues:
==1==>
|
==32======16==>
|
==15==>
i.e. of 32 bits data bus: I discard 15 LSBs, discard 1 MSB, pass 16 bits the top part needs saturation as FvM indicated (a must unless you don't expect values to get there). it is symmetric or not. The bottom part means divide by 2^15 and may be truncated directly or rounded. Rounding can be to nearest integer, or basic or unbiased or towards positive inf. or towards negative inf. or towards roof ...etc plenty of methods here but differences are trivial. The rule applies to any data signal irrespective whether you view it as integer(decimal point at start!!) or fractional(decimal point anywhere you imagine)