Hi, Tim, On Aug 22, 2013, at 10:03 AM, Timothy Madden wrote:
> In simulation, nothing seems to come out: all zeros...Do these fft blocks > simulate correctly? Yes, they should simulate fine. > Question on FFT > > Say we have 4 input streams, that is, 4 lines of data of one data stream > divided into 4 busses that are > decimated by 4. So sample rate of whole stream is 512MHz, and sample rate of > each decimated stream is 128MHz. > This is the normal output from the 4x MKID ADC, where the data is divided > into 4 streams. > > > We connect these streams to FFT inputs, assuming a 4K FFT. > What will the sample rate of each bin be? Will it be 128MHz/ 4096, or is > there more delay and some time domain data is missed? > > Also, what does sync_out do? I assume it is high for valid FFT coef. data > output, but is there any way to > trigger on the start of a new FFT coef. set? I guess we have to make a > counter to count bins, and hope the > counter stays in sync w/ FFT output? > > Also, what is difference between "simultaneous streams" and "simultaneous > inputs" when setting up the FFT? I think the number of "simultaneous inputs" is the de-multiplex factor. Fast ADCs sample at a clock rate much higher than the FPGA clock rate. To work with the data, the FPGA must handle multiple ADC samples per FPGA clock cycle. The number of samples handled per FPGA clock cycle (for a single digitized signal) is often called the "demux factor". It sounds like the demux factor is 4 for the MKID ADC. For ADC sample rate "Fadc" and demux factor "D", the FPGA fabric will run at "Ffpga = Fadc / D". I think the number of "simultaneous streams" refers to how many signals you want to process in parallel in the FFT. I think it makes multiple parallel FFTs that share twiddle factors. The sync_out lets you know when the output spectrum starts. sync_out hoes high for one cycle preceding the first channel of the output spectrum. sync_out need not go high for every output spectrum. Since the FFT is streaming, the spectra come out one right after the other so you only really need the first sync_out pulse to make sense of the output spectra. Regarding FFT sync, the casper website has a memo that describes some restrictions on the FFT sync_in signal (and therefore the sync_out signal). Basically, you can't assert sync_in for each input window of the FFT. See the memo for details. Are you waiting long enough for the data to start appearing at the output? Which mlib_devel are you using? There is an ongoing flurry of activity (especially related to the FFT and PFB_FIR blocks) as mlib_devel is getting updated for the upcoming CASPER workshop. Hope this helps, Dave

