Hey Tom

We recently found a bug in the FFT for a specific parameter set that
causes data corruption that includes overflows. If you use 'embedded' as
your multiplier implementation of choice you may have this bug. 

Basically, in the twiddle_general_dsp48e block, the slice blocks are
configured incorrectly which may bite you if your data and coefficient
bitwidths are not both the default 18. Also, the default setting on the
reinterpret block in the cmult block (in twiddle_general_dsp48e) uses a
binary point of 19, but the default value should be 33 for the default
twiddle block settings. If this is not updated, an effective
multiplication by 2^(33-19=14) can ensue leading to massive overflows
(and DC offsets). I have been unable to replicate the conditions under
which the settings for the reinterpret block do not get updated but it
happened in one of our systems (hence the discovery of this bug). 

Unfortunately, the test system built to help catch bugs is not adequate
(a new sparkly one is in production), and the unit tests passed when
this change was made.

These bugs are fixed in commit 8750e3b of the KAT fork (available from
the SKA organisation at github). You could also use 'behavioural' (the
default) as your multiplier implementation of choice.

Hope this helps and sorry for the inconvenience.

Regards
Andrew


On Mon, 2012-06-18 at 11:54 -0700, Tom Kuiper wrote:
> On 06/18/2012 11:25 AM, Jason Manley wrote:
> > FFT overflow is a latching flag. It probably overflowed before you set the 
> > shift schedule? Try clearing the error and then reading it again. Or just 
> > run rfi_spectrum.py which does a clear after every read (ie it will print 
> > FFT overflows on the screen; if you don't see errors, all is well).
> >    
> The plot shows a plausible looking spectrum but the error messages are 
> still there.  I'll send you the spectrum separately.
> 
> Thanks,
> 
> Tom
> 
> p.s. Congratulations to you and all your colleagues.
> 
> kuiper@roachnest:/usr/local/projects/DSN_Obs/Firmware/KAT/rfi_sys/scripts$ 
> ./rfi_spectrum.py Connecting to ROACH... done.
> Scaling back by 48828 accumulations.
> Starting file 1340045390.spec.h5.
> Plotting channels 0 (  0.0MHz) to 16364 (799.0MHz).
> [2550] Mon Jun 18 11:49:52 2012: input level: -44.73 dBm (ADC -25.23 
> dBm). FFT is overflowing!
>    Storing entry 0... done
>    Local max at chan   100 (  4.88MHz):  32.94dBm
>    Local max at chan 15482 (755.96MHz):  15.77dBm
>    Local max at chan 15475 (755.62MHz):  15.75dBm
>    Local max at chan 15480 (755.86MHz):  15.79dBm
>    Local max at chan 15477 (755.71MHz):  15.78dBm
> [2552] Mon Jun 18 11:49:54 2012: input level: -44.70 dBm (ADC -25.20 
> dBm). FFT is overflowing!
>    Storing entry 1... done
>    Local max at chan   100 (  4.88MHz):  32.91dBm
>    Local max at chan 15465 (755.13MHz):  15.73dBm
>    Local max at chan 15475 (755.62MHz):  15.76dBm
>    Local max at chan 15479 (755.81MHz):  15.75dBm
>    Local max at chan 15477 (755.71MHz):  15.76dBm
> [2553] Mon Jun 18 11:49:56 2012: input level: -44.63 dBm (ADC -25.13 
> dBm). FFT is overflowing!
>    Storing entry 2... done
>    Local max at chan   100 (  4.88MHz):  32.92dBm
>    Local max at chan 15480 (755.86MHz):  15.77dBm
>    Local max at chan 15461 (754.93MHz):  15.75dBm
>    Local max at chan 15475 (755.62MHz):  15.77dBm
>    Local max at chan 15477 (755.71MHz):  15.76dBm
> [2554] Mon Jun 18 11:49:57 2012: input level: -44.70 dBm (ADC -25.20 
> dBm). FFT is overflowing!
> 
> > Jason
> >
> > On 18 Jun 2012, at 20:10, Tom Kuiper wrote:
> >
> >    
> >> I'm trying to run the initialization script for the KAT 16K spectrometer.  
> >> I get FFT overflow even though all the shift bits are set.  How is this 
> >> possible?  Here's the transcript:
> >>
> >> $ ./rfi_init.py
> >> Connecting to ROACH... done.
> >> ------------------------
> >> Programming FPGA... done
> >> Checking clocks... ok, 200 MHz.
> >> Auto-calibrating ADC... done
> >> Attempting automatic RF gain adjustment...
> >>          Gain was -11.5dB, resulting in an ADC input level of -29.30dB. 
> >> Trying gain of -7.20dB...
> >>          Gain was -7.0dB, resulting in an ADC input level of -28.54dB. 
> >> Trying gain of -3.46dB...
> >>          Gain was -3.0dB, resulting in an ADC input level of -26.66dB. 
> >> Trying gain of -1.34dB...
> >>          Gain was -1.0dB, resulting in an ADC input level of -25.45dB. 
> >> Trying gain of -0.55dB...
> >> done!
> >> Setting FFT shift...  set to 0xffff.
> >> Configuring accumulation period to 1.00 seconds... done
> >> Resetting counters... done
> >> Current status: FFT is overflowing!
> >>
> >> Thanks for your help.
> >>
> >> Tom
> >>
> >> -- 
> >> I or me? http://www.oxforddictionaries.com/page/145
> >>
> >>
> >>
> >>      
> >    
> 
> 



Reply via email to