Skip to content

Lay007/cpp-dsp-showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp-dsp-showcase

C++17 CMake CI License: MIT

cpp-dsp-showcase is a compact, production-style DSP showcase in modern C++. It is structured as a small engineering portfolio project rather than a single demo: deterministic kernels, unit tests, benchmark tooling, CI, and supporting SDR course material all live in one repository.

Highlights

  • C++17 DSP library with a compact and installable public API
  • Deterministic unit tests for FIR, Goertzel, GCC-PHAT, and rational resampling
  • Optional AVX2 acceleration for hot paths
  • Benchmark executable plus generated markdown performance reports
  • SDR-oriented lab track and supporting plots under docs/
  • Installable CMake package export for downstream projects

Implemented modules

Area What is included
FIR filtering Windowed-sinc low-pass design, direct convolution, FFT overlap-save convolution
Tone detection Single-frequency and batched Goertzel power estimation
Delay estimation GCC-PHAT baseline for integer delay recovery
Sample-rate conversion Rational L/M resampler with anti-alias filtering
Tooling Demo apps, benchmarks, unit tests, generated documentation assets

Build

cmake -S . -B build -DBUILD_TESTING=ON -DDSP_ENABLE_AVX2=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
ctest --test-dir build --build-config Release --output-on-failure

Generate the benchmark markdown report:

cmake --build build --config Release --target benchmark_report

Install the library and exported CMake package:

cmake --install build --config Release --prefix install

Using the library from another CMake project

find_package(cpp_dsp_showcase CONFIG REQUIRED)

add_executable(example main.cpp)
target_link_libraries(example PRIVATE dsp_core::dsp)

The public header is:

dsp_core/dsp.hpp

Executables

Target Purpose
dsp_core_demo Smoke-test style DSP demo with FIR and resampling output
iq_analysis_demo Read CI16 IQ data and evaluate tone power with Goertzel
dsp_core_benchmark Run timing measurements and optionally emit a markdown report

Project layout

.
|- dsp_core/
|  |- include/dsp_core/dsp.hpp
|  |- src/
|  |- tests/
|  `- bench/
|- docs/
|  |- assets/
|  `- labs/
|- tools/
|- cmake/
`- .github/workflows/

Documentation

Visuals

DSP module flow

DSP flow

FIR response

FIR response

Goertzel detection

Goertzel detection

GCC-PHAT delay

GCC-PHAT delay

Benchmark dashboard

Benchmark dashboard

Scope and intent

This repository is intentionally positioned between classroom material and production engineering: the code is small enough to study, but structured enough to demonstrate how DSP kernels should be validated, benchmarked, and packaged in a real C++ codebase.

License

MIT

About

C++ DSP showcase with CMake, CTest, benchmarks and CI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors