Forum Discussion
Altera_Forum
Honored Contributor
14 years agoWith fixed point always remember the range of your values as well and how operators affect them. For example if I had two eight bit fixed point values and I add them together my result is potentially 9 bits. Likewise if I multiplied those two values together I would need 16 bits to store the result.
So often with high precision fixed point math hardware, if you want to maintain 100% accuracy without rounding through the calculation the logic typically starts off narrow and becomes wider as the data moves through various operators. Then at the end you sometimes truncate the width by downscaling the number. If you round off bits after each operator then keep in mind errors will accumulate. I recommend google searching "fixed point math", there are probably plenty of sites that show graphically how you apply it to hardware/software. It'll probably make more sense if you see pictures of it.