LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where should the reset boolean for high throughput FFT (in FPGA) arrive in the data stream?

I am performing FFT's on rows of image data in an FPGA environment. I want to perform a new FFT for each row. So when exactly should the reset boolean go true, as the 1024th point arrives? Or on the first point of the next row (the 1025th point)?

 

Further questions, when exactly is the data index incremented, as points arrive? As points leave?

 

What should we expect the output to look like and how long would we expect it to be, 512 points? 1024?

 

I've attached a screenshot of my FFT implmentation so you can see my current logic. Can an engineer tell me whether this is doing what I think it's doing? Also, should I expect the Magnitude calculation to come out with 512 points? Or will it come out with the mirrored 1024?

 

Regards,

Alex

 

0 Kudos
Message 1 of 8
(2,678 Views)

AlexAAuck,

I'm not really sure what you're asking as far as the reset boolean is concerned. I don't see a reset boolean. Also, the length parameter should be set by you in the configuration of the FFT. I would suggest taking a look at one of the examples in the LabVIEW Example Finder. If you search FFT and take a look at FFT with Handshaking - R Series.lvproj this might help you better understand the flow and what exactly is taking place.

 

Jordan

0 Kudos
Message 2 of 8
(2,647 Views)

Are you looking at the high through put FFT for FPGA? There's definitely a reset boolean present. If the examples you list don't have reset booleans then they're not going to help me understand what is happening in my situation.

 

Regards,

Alex

0 Kudos
Message 3 of 8
(2,645 Views)

 

It's inside a single cycle timed loop btw.

0 Kudos
Message 4 of 8
(2,644 Views)

Hi Alex,

 

If I understand what you're trying to do correctly, you shouldn't need to use the reset boolean at all.  The FFT block will automatically "rollover" to the next frame as you send it more valid inputs.  That is to say, it will treat the first 1024 points as a single frame, and then it will automatically treat points 1025-2048 as the second frame.  There is no need to reset.  Resetting is also probably harmful in this case because it will clear out any data which is being processed at the time.

 

If you want the tranform to process all of your points in blocks of 1024, it will do that automatically.  If you want it to process some subset of your points, you will need to create your own logic for the input valid signal that only asserts for the points you want to process.  Out of curiosity, what throughtput setting are you using?  There should be two options and your choice will affect how the algorithm operates.

 

To answer your other questions: data index reflects the index of the current output point.  The FFT will return the full 1024 points, you you will have symmetry between the first 512 and the last 512 if your input data is real.  The second 512 will correspond to the negative frequencies with the last point corresponding to the -1 bin.  This should be the same as the standard FFT (not the power spectrum) on the desktop.

 

Let me know if that doesn't answer your question.

 

Ben

 

 

Message 5 of 8
(2,623 Views)

Is your data purley real, btw?  If your data is arbitrary complex values, then there shouldn't be any symmetry in the FFT.  All 1024 points will contain some amount of unique information.

0 Kudos
Message 6 of 8
(2,619 Views)

Hey

 

Thanks for the info, that was exactly what I needed to read. So I should remove the logic for sending reset = true after 1023 points and just let the algorithm handle it?

 

The data is purely real in the first instance, but after passing through the Hanning Window VI I have both imaginary and real outputs, I wired both of them into the FFT. Is this the correct thing to do? Will it still result in symmetry given that the data is real in the first place?

 

Kind regards,

Alex

0 Kudos
Message 7 of 8
(2,605 Views)

Yes, just remove the reset logic, and the algorithm should function correctly.

 

To answer your other question, I don't understand how you have real and imaginary output from the hanning window if the input is purely real.  I think the window function has both real and imaginary inputs and outputs, is that correct?  But if the imaginary input is all zeros, then the imaginary output should be all zeros as well, correct?

 

To say it another way, if you wire the real and imaginary outputs of the window to the real and imaginary inputs of the FFT and your input to the window is purely real, your spectrum will have symmetry.  If the input to the window is complex, then you won't have symmetry.

 

Hope that helps,

 

Ben

Message 8 of 8
(2,584 Views)