Hi, Andrew,

When dropping "upper" bits (i.e. MSB and some number of adjacent bits) of a 2s complement value, overflow will not occur if (and only if) all the dropped bits are the same (i.e. either all 0s or all 1s). IOW, overflow will occur if (and only if) all the dropped bits are NOT the same.

I don't know why real and imag would be wired intentionally differently for this. Sounds like a bug.

Hope this helps,
Dave

On Sep 3, 2008, at 8:28 , Andrew Martens wrote:

Hi all

I have been looking at the the butterfly_direct block in the FFT subsection of the 10.1 library and have noticed a few things I hope someone can help me with.

They relate to the logic that seems to be used to test for overflow ('of' output). There are 4 Slice blocks extracting the most significant bits and testing if they are all 1's (with an 'and' block) or all 0's (with a 'nor' block). There are two things that seem to be out of place for me;

1. The blocks testing the real and imaginary components of each stream are different. For the real component of a channel, all 4 Slices feed the 'nor' block whereas, for the imaginary component, the 4th bit from MSB feeds the 'nor' block twice and the 3rd doesn't. I would guess that this is not meant to be the case?

2. Taking the four MSBs means that (for twiddle_general_3_mult as twiddle block at least) that these are all bits above the binary point i.e not fractional bits. The test for all 1's would make this a small negative number (i.e close to 0) and the test for all 0's would be a small positive value, just above 0. Is this logic testing for overflow and underflow by testing if the bits are all '1' or '0' respectively?

There is probably a clever answer to this or I have misunderstood something somewhere. Could someone have a look at this and let me know what they think.

Thanks
Andrew


Reply via email to