10-13-2013 11:07 PM
I have to do a DSP algorithm with two 16 2's compliment bit numbers A (Q1.15 format ) and B(12.4 format) . I need to have the result in Q1.15 format . Can anyone suggest me a good concrete document on this topic.
10-13-2013 11:51 PM
very basic and formally you can do it like this:
Expand both numbers to 12.15 fixed format with respect ot the signedness.
Forget about the decimal point and do integer math. (there is no difference)
Snip out the 1.15 Result , which will be the 16 LSBs of the 12.15 number.
There may be potential to optimize the wordwidth, but you can also leave this to the logic optimization tools.
You have to be carefull if you are using algorithms like CORDIC which might change the decimal point position in the result.
Also in multiplications you have to care about taking the right bits from the result which will have 24.30 format.
Have a nice synthesis
10-14-2013 12:07 AM
10-14-2013 12:03 PM
Thanks for the reference muzaffer.
I've recommended the below reference multiple times. It's written by a DSP guy more angled towards software, but I find the representation he uses is very useful for HW. His paper lists some fundamental rules of fixed-point arithmetic - showing bit growth under common operations, and signedness concerns.
10-14-2013 12:07 PM
I like Randy's work a lot. He is active comp.dsp too.