Realtime 64x decimation with a 768 tap anti-alias FIR-filter of a 20 MHz bit-stream for XMOS XCORE-200 using one thread

XCore Project reviews, ideas, videos and proposals.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Realtime 64x decimation with a 768 tap anti-alias FIR-filter of a 20 MHz bit-stream for XMOS XCORE-200 using one thread

Post by lilltroll »

Hi

I just want to share my efficient implementation of 64X decimation of 20MHz 1-bit Sigma-Delta data stream on xCORE-200.

https://github.com/lilltroll77/Decimate_bitstream_XMOS

Key features is:
  • Only 4 CPU/thread cycles of latency (40 ns) between the last bit (of 64) are read on the port until the result is filtered and decimated, ready to be sent out to another thread over a streaming channel.
  • A 768 tap FIR-filter (anti-alias ) can run at ~20MHz indata in just one thread. The taps can be chosen arbitrary, so minimum-phase filters can be used, for the highest possible closed-loop bandwidth
Usage
For use with isolated 20MHz 1 bit ADC chips, used for current measurements. No need for an extra dedicated ASIC or FPGA for deciamtion.

Implementation
Asm, interrupts and LUT
Probably not the most confused programmer anymore on the XCORE forum.