LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Desktop Execution Node (DEN)

Hello all,

 

What I am trying to do on the FPGA is to read a signal that is 500 points in size and find its FFT. However, to do FFT I had to zero pad the signal  for it to reach the nearest power of 2 (i.e: 512). The way I solved the zero padding issue is by nesting a For loop  that iterates 12 times and inserts a zero into the FFT block every iteration. As seen in the attachments, in my host VI I am indexing a text file into the loop and sending it to the FPGA  VI through the DEN. I expected that the data index of the FFT block would increment every iteration during the zero padding (i.e: inside the for loop). However, what happens is that the data index does NOT increment during the iterations of the for loop, instead it just "freezes" during the for loop iterations and continues afterwards. Can anyone provide help with this issue or suggest another solution to do the zero padding for FFT?

 

Quick help is appreciated,

Hazem

Host VI.pngFPGA VI True Case.pngFPGA VI False Case.png

0 Kudos
Message 1 of 10
(4,679 Views)

I don't have my telescope ready to see what is taking place in your images.  Next time, please attach the project.

 

Why are you using a for loop?  You always want exactly 12 0's.  Feed that into your data to begin with and skip the loop.  If you put a for loop inside a while loop, it MUST finish in each iteration of the loop.  If you have two loops with data dependencies, the second will wait on the first.

0 Kudos
Message 2 of 10
(4,654 Views)

I attached the images for better display.

well, I am using the VI images here only to illustrate the point I am asking about. That is not the actual project.

 

My actual code is trying to find cross correlation in the frequency domain. I can not just feed 12 zeroes every 500 points because I have about half a million points!  Moreover, those points are just for simulation purposes and the code should work with a real life ADC.

 

I actually intend that the For loop finish its execution (stuffing the 12 zeroes) before continuing the larger loop. However, what I see is that the zeroes are not stuffed but rather the FFT block "freezes" and does not process further point until the for loop finishes all its iterations.

Download All
0 Kudos
Message 3 of 10
(4,647 Views)

If you want help, why are you making it so hard to help you?  The DEN lets you simulate FPGA VIs with known test vectors.  This means anyone can run this without your specific hardware.

 

What possesses you to continue to post pictures?  We can take a look and make estimations.  I'm not going to bother to download the three pictures.  You made no mention to trying to implement adding fixed 12 0s instead of using the for loop.  You've made a point to tell me I'll have to recreate your code if I want to help you.  I'm willing to help.  But, I'm not willing to rewrite code you already have.

 

Beyod that, what's the difference between waiting for one to finish before the other and the other freezing until the first completes?  It's the same thing.  In both cases, one finishes and then the other operates.

0 Kudos
Message 4 of 10
(4,627 Views)

Hi natasftw,

 

I really appreciate your help. It seems that we are not standing on the same ground. Let me clarify what I am expecting, and what is actually happening.

 

So, the For loop contains the processing (FFT block). Before the 500th point (arriving via the DEN) the For loop would run for a single iteration for each point resulting in processing it and incrementing the data index of the FFT block by 1 in each iteration.

 

After the 500th point, the loop will iterate 12 times padding zeroes AND actually processing those zeroes. The FFT block data index should increment for each of those new inputs (the zeroes).

 

However, this increase does not happen. As if the FFT block is not "called" during the For loop 12 iterations, which does not make sense!

 

I am just restating my question to make sure that we agree on what it actually is.

 

Thanks a lot,

Hazem

 

 

0 Kudos
Message 5 of 10
(4,615 Views)

@hazem93 wrote:
It seems that we are not standing on the same ground. Let me clarify what I am expecting, and what is actually happening.

 

 

I am just restating my question to make sure that we agree on what it actually is.

 

Thanks a lot,

Hazem

 

 


All of this would be avoided if you'd attach your code (NOT PICTURES.  THE CODE) so we could run it ourselves and play around with it.  Again, why are you going out of your way to make it harder to help you?

0 Kudos
Message 6 of 10
(4,607 Views)

 

Unfortunately I can not post the code since it is part of my thesis which I have not yet delivered.

 

If there is any other way you could help or if there is any unclear part in the question I explained, please inform me right away.

 

Thanks

0 Kudos
Message 7 of 10
(4,601 Views)

You can't post the VIs containing the three loops you've already been posting here?  If that were true, you couldn't have posted those VIs either.

0 Kudos
Message 8 of 10
(4,590 Views)

 

ah okay, I thought you were refering to the actual project. Anyhow, since I did not intend for the VIs to actually run, I would modify them and add them here.

 

Thanks

0 Kudos
Message 9 of 10
(4,578 Views)

I have solved the issue! I used a loop timer and improved dependency between blocks.

 

I really thank you so much for your efforts and your concern!! Smiley Happy

0 Kudos
Message 10 of 10
(4,561 Views)