Code Monkey home page Code Monkey logo

fpga-sdft's Introduction

FFT on an FPGA

having a go at some DSP on an FPGA. I'm basing the design on this paper:

http://www.comm.toronto.edu/~dimitris/ece431/slidingdft.pdf

This is a sliding discrete Fourier transform. It requires two real adds and one complex multiply per frequency bin. The transform is run for every new sample taken.

overview

sdft vs fft

Makefile

  • make list - compute the twiddle factor tables
  • make show-sdft - use yosys show to see how the design is inferred
  • make debug-sdft - use iverilog, vvp and gtkwave to show the results of the testbench
  • make read-sdft-vcd - after vcd generated, use Python script to read the vcd and plot the last set of results computed
  • make model-sdft - model sdft in python and compare against numpy's fft
  • make - build everything
  • make prog - program the icestick

Done

  • Read the resources
  • Implement HDL twiddle factor ROM
  • Implement an SDFT in Python using the same pattern
  • Why doesn't makefile build from scratch? - missing a file
  • Why do freq bin regs overflow almost immediately in the testbench? scaling
  • How to do scaling - the twiddle factors are scaled to fill the hole register so things overflow quickly, divide by 127
  • Why doesn't pnr work? - it does, but the module wasn't being used so yosys was removing it
  • make the python tools parse test/localparams.vh - very basic but works OK
  • adc connected, pinout is correct. sampleing has to be done on clock negedge

Todo

  • how to deal with timing analysis being lower than the clock I'm using

FPGA resources used

Using an 8k device:

IOs          18 / 206
GBs          0 / 8
  GB_IOs     0 / 8
LCs          3619 / 7680
  DFF        120
  CARRY      512
  CARRY, DFF 39
  DFF PASS   86
  CARRY PASS 165
BRAMs        13 / 32
WARMBOOTs    0 / 1
PLLs         1 / 2

Resources

fpga-sdft's People

Contributors

mattvenn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fpga-sdft's Issues

FFT with SDFT core

Hello.

I tried to use your sdft module into my project, but its interface is not clear for me.
I tried to implement sdft control the same as into your repo, but I was unsuccessful. I got incorrect results.
Can you provide a small description of the sdft module and its interfaces? I hope it will take not a lot of your time.

Best regards, Andrew.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.