• 0

Using FFT to analyze a sine wave


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.


Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @bhav,

I need more that just the xpr file to launch your project. I would look at our working hdl xadc project for the zybo here. Here is forum thread that discusses using the zybo xadc in the ps. The forum thread has a block design and sdk code of a working project.

thank you,



Share this post

Link to post
Share on other sites
  • 0


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.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now