Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
708 Views

Two FFT blocks of different sizes exhibit problem

Design has FFT blocks of different sizes sizes. Finding incorrect results unless the sizes are the same. I am using version 13 DSP Builder, and have not synthesized the design, but have simulated the design with Simulink. If I make the FFT sizes the same, which isn't what I want to do, then I can get correct results. I am thinking that there are shared resources between the two FFT blocks, making a ***conflict*** when I use two different FFT parameterized links. 

 

I will try to obtain a more recent DSP builder to see if the problem goes away, but I don't have too much hope for this, but will let you know if I succeed with a more recent DSP builder version. 

 

It would be nice if the MATLAB Simulink S-fuctions were open source, because I cannot determine what is causing the conflict. 

 

Thanks, 

Jamie_ct
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
21 Views

 

--- Quote Start ---  

Design has FFT blocks of different sizes sizes. Finding incorrect results unless the sizes are the same. I am using version 13 DSP Builder, and have not synthesized the design, but have simulated the design with Simulink. If I make the FFT sizes the same, which isn't what I want to do, then I can get correct results. I am thinking that there are shared resources between the two FFT blocks, making a ***conflict*** when I use two different FFT parameterized links. 

 

I will try to obtain a more recent DSP builder to see if the problem goes away, but I don't have too much hope for this, but will let you know if I succeed with a more recent DSP builder version. 

 

It would be nice if the MATLAB Simulink S-fuctions were open source, because I cannot determine what is causing the conflict. 

 

Thanks, 

Jamie_ct 

--- Quote End ---  

 

 

 

After trying a newer version of DSP Builder (thanks Altera!) version 15, I found that I should use subsystems, not model references, in my designs. In fact, my old design would not even work in version 15 without this change. (Apparently, it did not understand ufix2 type, but rather only ufix8 or ufix16 types, which I used model references in version 15.) I ran the sample code in version 15 for an FFT using the blocks in the Common FFT library, not the Radix2 FFT library, and I added a second FFT size of 512 in parallel with the 2K FFT, and the results were correct in fixed point. So, the problem may just go away. Lesson learned: use subsystems, and perhaps the different FFT library. The root cause of the original problem is not entirely clear. 

 

 

 

Jamie_ct
Altera_Forum
Honored Contributor I
21 Views

Model Referencing isn't supporting in DSP Builder (Standard or Advanced). Best solution to achieving a similar result is to create library blocks to use, and to make use of subsystems. For FFTs, there should be a large number of FFT examples available to start from, and these are generally open to inspection by looking under the masks.

Altera_Forum
Honored Contributor I
21 Views

Thanks, sharkster. 

 

This confirms my suspicions, about not using model references. I am getting good results with subsystems now using the fixed point FFT libraries. 

 

Learning the hard way! 

Jamie_ct
Reply