Overview
- Object ID : 5361 (2026-02-07 05:45:41)
- Author : James Smith
- Content : Code
- Microcontroller : Propeller 2
- Languages : C/C++, SPIN2 PASM2
- Categories : Math, Signals, Speech and Sound
- Licence : MIT
Content
Demo Files:
fft_demo.spin2 Spin2 example program, tested with Propeller Tool and PNut-ts
comparefftbench.c C example program, tested with flexcc (spin2cpp)
Library Files:
cog_fft.spin2 The fastest library with FFT and IFFT support.
inline_fft.spin2 Inline PASM2 FFT for when cogs or memory is limited, or when performance doesn't matter.
sa_fft7.spin2 An independently created FFT library by Mark Tillotson. Has built-in windowing.
Other Files:
SimplestSerial.spin2
thread_factory.c
thread_factory.h
Performance at 160MHz
1024 point butterfly run time = 1018 us FFT ONLY, no bit reversal
1024 point bit-reversal and butterfly run time = 1328 us IFFT In-Place Algorithm
1024 point bit-reversal and butterfly run time = 1297 us In-Place Algorithm
1024 point bit-reversal and butterfly run time = 1204 us IFFT Out-of-Place Algorithm
1024 point bit-reversal and butterfly run time = 1174 us Out-of-Place Algorithm
1024 point bit-reversal and butterfly run time = 664 us Real Input
1024 point bit-reversal and butterfly run time = 3764 us Inline
1024 point bit-reversal and butterfly run time = 12991 us flexcc -2 comparefftbench.c -O3
The IFFT is implemented as an FFT with the inputs and outputs conjugated. That's why it's 2.5% slower. I felt this was an acceptable trade-off between speed, library size, and development effort.