Forum Discussion
Altera_Forum
Honored Contributor
16 years agoparrado
Thanks for clarification. What I'm ultimately up against is large bit growth through the path. I take 8b pixels in. Shift them down to make them signed as the fft core wants signed values. That gives me a S7.0 format (-128 to +127). I then multiply them by the window coeffs which are U0.8 format. Result is S7.8 for 16bits into the first fft core which handles the image rows. Looking at Altera's chart for amount of shift possible out of a 256 point core (11 shifts), I need a 27b wide scaled result register. I've verified that the output at this point carries 8 fractional bits compared to FFTW algorithm that Matlab uses. The second fft core then would have to be 27 bits on the input. Assuming the same worst case shift out of that, my output would need 27+11 bits for output scaling. Now I'm up to 38 bits. The complex multiply of the two images will yield 76 bits. As you can see, widths are getting crazy wide. I keep thinking I should be able to drop fractional bits at various points without losing enough accuracy to throw my final result off. I'll keep running sims with various scenarios to see if it's possible to trim widths along the way. Thanks for any thoughts you may have regarding keeping those intermediate values at reasonable widths.