Navan Ruthramoorthy" wrote in message <oj0hd9$hpo$1@newscl01ah.mathworks.com>...
> "Daniel Yang" wrote in message <oivfhh$42j$1@newscl01ah.mathworks.com>...
> > In order to convert simulink into HDL code, I cannot use the buffer block, and thus, must do a elementbased fft. Unfortunately, no matter how I try, I cannot get the samplebased fft to work (using the HDLoptimized FFT), and the FFT only works when I do it on a frame. My first question is as follows.
> >
> > Theoretically, doing a samplebased FFT, then creating a buffer should be the same as buffering, then doing the FFT on the frame. However, these return different outputs. Why is this?
> >
> > Secondly, the Spectrum Analyzer achieves the desired result flawlessly (whether using framebased or samplebased input). Is there a way to find the spectrum analyzer code, or is it possible to reveal how the Spectrum Analyzer is coded?
> >
> > Thanks in advance!
>
> Any specific reason why you cannot use a buffer? HDLoptimized FFT will have latency in its output. When you compare your results you need to account for this latency. Except for latency it should match the FFT results. I would expect Spectrum Analyzer to have an internal buffer and then compute the spectrum when the buffer is full.
>
> Navan
Hello,
Thank you for your fast response. I may be naive, but buffers don't work for HDL generation. While checking compatibility, the software states that the block is not compatible for HDL generation. Is there a way to fix this, or another block that does what a buffer does.
Thanks.
