Jump to content
  • 0

Using FFT to analyze a sine wave


bhav

Question

Hello, I am a total beginner in FPGAs. I am to analyse an input wave using A/D and then take FFT of certain number of samples. Input wave is of 50 Hz and sampling frequency of A/D is 1.6Khz. However that is only math! I am not able to check whether my code works or not. Right now I am done only with the A/D part thanks to zybdo xadc demo on this website! Can anyone help me by telling whether my A/C is wor king fine?  Also please guide me as how I could proceed. Thank you.

project_6.xpr

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

@bhav,

I recently put a demonstration project together for just this purpose on my github page.  You can find it here.  Although it's entirely a simulated project, you should find some useful pieces within it.  Key details include:

  1. 1Msps A/D, based upon Digilent's PMod MIC3--a MEM's based PMod.  Of course, since this is entirely a simulated project, no PMod MIC3 is actually required.  The project just demonstrates how Verilog code can interact with the A/D in a simulated fashion.  In this case, there's a MICNCO C++ file that simulates the Pmod.
  2. 1ksps complex FFT.  (My core generator doesn't yet build real FFT's)
  3. DMA data write to memory.  This is all based upon a wishbone bus--much simpler to work with than AXI.
  4. Video read from memory onto a simulated VGA 800x600 screen.  (GTK based)  The pixel clock is a 40MHz clock, the system bus/memory clock runs at 100MHz.
  5. The video slides from the right to the left as new data comes in.

Feel free to take a look, and then ask yourself how you would go about simulating your task in order to know that your code works in the first place.

Dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...