• Stars
    star
    213
  • Rank 185,410 (Top 4 %)
  • Language
    C++
  • Created about 8 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A configurable C++ generator of pipelined Verilog FFT cores

A Generic Piplined FFT Core Generator

This generic pipelined FFT project contains all of the software necessary to create the IP to generate an arbitrary sized FFT. The FFT has been modified for operation in one of the following modes:

  • Two samples in per clock and, after some delay, two samples out per clock. This uses 6 multiplies per FFT stage in the butterflies. This was the purpose of the original dblclkfft. (Why double clock? I don't know. Double-sample FFT might've been a better name.)

  • One sample in per clock, with the i_ce line being high for every incoming sample--up to one sample per clock. There's also options to run with at least one clock between samples, or even two clocks between samples (or more). This mode uses 3, 2, or 1 multiplies per FFT stage respectively.

  • Eventually, I want to support a real FFT mode which will accept real samples input, and alternately produce real and imaginary samples output--or the converse for the inverse FFT.

The FFT generated by this project is very configurable. By simple adjustment of a command line parameter, the FFT created will either be a forward FFT or an inverse FFT. The number of bits processed, kept, and maintained by this FFT are also configurable. Even the number of bits used for the twiddle factors, or whether or not to bit reverse the outputs, are all configurable parts to this FFT core.

These features make this open source pipelined FFT module very different and unique among the other open HDL cores you may find.

For those who wish to get started right away, please download the package, change into the sw directory and run make. There is no need to run a configure script, fftgen is completely portable C++. Then, once built, go ahead and run fftgen without any arguments. This will cause fftgen to print a usage statement to the screen. Review the usage statement, and run fftgen a second time with the arguments you need.

Windows Users

My test platform is an Ubuntu system. I don't normally test the core generator on Windows platforms. Others have used it on Windows platforms quite successfully. There are two problems they have encountered when doing so:

  1. I use a mkdir(dirname, chmod) function in the core generator to make a directory in which to place the generated core. Windows doesn't seem to support this function, but rather a similar mkdir(dirname) function. Switching between the two is simple enough.

  2. The generator also uses the lstat(path, statbuf) function to make certain that it doesn't overwrite any pre-existing files having the same name as the directory it wishes to create. This function can be replaced with the constant 1 or boolean true in order to bypass the check and build the design on a Windows system.

There is a #define option set at the top of the generator that applies these changes for some versions of Microsoft Visual C++.

Current State

This particular version of the FFT core now passes all my tests. It has yet to meet hardware to be finally verified.

  • The FFT test bench doesn't yet have a threshold that adjusts with input parameters to determine success or failure (yet).

  • I haven't started on the real-only version of this FFT.

While my previously stated goal ws to continue working with this core until it has a real-FFT capability before releasing it back into the master branch, I'm actually so excited that I got it to this point that I'm going to move it from dev to master earlier, and come back to get the real only version.

Common Confusions

This core does not contain any overflow protection. Should you send it data large enough to overflow its internal registers, you will likely get something unexpected in return.

This is perhaps for the best. While overflow detection is a possible addition, overflow protection will only minimize an already bad situation. It would be better to avoid that bad situation in the first place by providing the core with enough bits of precision to do its mathematics with.

Commercial Applications

Should you find the LGPLv3 license insufficient for your needs, other licenses can be purchased from Gisselquist Technology, LLC.

Likewise, please contact us should you wish to fund the further development of this core.

More Repositories

1

zipcpu

A small, light weight, RISC CPU soft core
Verilog
1,268
star
2

wb2axip

Bus bridges and other odds and ends
Verilog
469
star
3

wbuart32

A simple, basic, formally verified UART controller
Verilog
272
star
4

sdspi

SD-Card controller, using either SPI, SDIO, or eMMC interfaces
Verilog
185
star
5

autofpga

A utility for Composing FPGA designs from Peripherals
C++
167
star
6

vgasim

A Video display simulator
Verilog
154
star
7

eth10g

10Gb Ethernet Switch
C
147
star
8

dspfilters

A collection of demonstration digital filters
Verilog
138
star
9

openarty

An Open Source configuration of the Arty platform
Verilog
119
star
10

dpll

A collection of phase locked loop (PLL) related projects
Verilog
95
star
11

cordic

A series of CORDIC related projects
C++
85
star
12

qspiflash

A set of Wishbone Controlled SPI Flash Controllers
Verilog
72
star
13

wbscope

A wishbone controlled scope for FPGA's
Verilog
72
star
14

sdr

A basic Soft(Gate)ware Defined Radio architecture
Verilog
71
star
15

interpolation

Digital Interpolation Techniques Applied to Digital Signal Processing
Verilog
53
star
16

zbasic

A bare bones, basic, ZipCPU system designed for both testing and quick integration into new systems
Verilog
42
star
17

wbi2c

Wishbone controlled I2C controllers
Verilog
40
star
18

fftdemo

A demonstration showing how several components can be compsed to build a simulated spectrogram
Verilog
39
star
19

s6soc

CMod-S6 SoC
Verilog
35
star
20

dbgbus

A collection of debugging busses developed and presented at zipcpu.com
Verilog
33
star
21

rtcclock

A Real Time Clock core for FPGA's
Verilog
22
star
22

arrowzip

A ZipCPU based demonstration of the MAX1000 FPGA board
Verilog
21
star
23

wbfmtx

A wishbone controlled FM transmitter hack
Verilog
21
star
24

icozip

A ZipCPU demonstration port for the icoboard
Verilog
17
star
25

xulalx25soc

A System on a Chip Implementation for the XuLA2-LX25 board
Verilog
16
star
26

wbpwmaudio

A wishbone controlled PWM (audio) controller
Verilog
15
star
27

videozip

A ZipCPU SoC for the Nexys Video board supporting video functionality
Verilog
14
star
28

wbspi

A collection of SPI related cores
Verilog
14
star
29

website

The ZipCPU blog
HTML
14
star
30

wbpmic

Wishbone controller for a MEMs microphone
Verilog
14
star
31

qoiimg

Quite OK image compression Verilog implementation
Verilog
14
star
32

fwmpy

A multiply core generator
C++
13
star
33

zipversa

A Versa Board implementation using the AutoFPGA/ZipCPU infrastructure
Verilog
13
star
34

wbhyperram

A cross platform, formally verified, open source, hyperRAM controller with simulator
11
star
35

axidmacheck

AXI DMA Check: A utility to measure DMA speeds in simulation
Verilog
10
star
36

wbicapetwo

Wishbone to ICAPE interface conversion
Verilog
8
star
37

tinyzip

A ZipCPU based demonstration for the TinyFPGA BX board
Verilog
8
star
38

wbsata

Wishbone SATA Controller
Verilog
8
star
39

tttt

A 4x4x4 Tic-Tac-Toe game suitable for porting to embedded hardware platforms
C
8
star
40

autofpga-demo

A demonstration of how AutoFPGA can compose a design from simple components
Verilog
8
star
41

debouncer

Digital logic necessary to debounce buttons
Verilog
8
star
42

kimos

Enclustra Mercury demonstration project
C
8
star
43

openz7

OpenZ7, an open source Zynq demo based on the Arty Z7-20
Verilog
6
star
44

zipstormmx

ZipSTORM-MX, an iCE40 ZipCPU demonstration project
Verilog
5
star
45

cputest-harness

A simulation test harness, containing serial port, QSPI flash, and an output done I/O--just provide the CPU
C++
4
star
46

xtimesheet

A very simple timesheet tracking program using text files and a GTK/Glade interface
C++
1
star