Skip to content

Commit 58981c9

Browse files
committed
Enhance README with DSP diagram, visuals, table, engineering section
1 parent 381899a commit 58981c9

1 file changed

Lines changed: 42 additions & 107 deletions

File tree

README.md

Lines changed: 42 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -7,138 +7,73 @@
77

88
A compact but serious **C++ DSP showcase** focused on practical signal-processing kernels, reproducible verification, and cross-platform engineering discipline.
99

10-
This repository is built to demonstrate more than isolated DSP formulas. It shows how classic signal-processing blocks can be packaged into a modern C++ project with clean builds, automated testing, CI, and benchmark reporting.
10+
---
1111

12-
## Highlights
13-
14-
- modern **C++17** codebase
15-
- **CMake + CTest + GoogleTest** workflow
16-
- CI on **Linux** and **Windows**
17-
- correctness-first implementation with clear optimization headroom
18-
- benchmark reporting for performance-oriented iteration
19-
20-
## Why this repository matters
21-
22-
Many DSP repositories stop at notebook-level prototypes or disconnected code snippets. `cpp-dsp-showcase` is intentionally positioned as a **portfolio-grade engineering sample**: small enough to review quickly, but substantial enough to demonstrate algorithm design, code organization, verification strategy, and performance awareness.
23-
24-
It is especially useful for:
25-
26-
- C++ DSP portfolio presentation
27-
- interview and technical discussion material
28-
- experimentation with classic DSP primitives
29-
- future expansion toward SDR, audio, radar, and measurement-oriented workflows
30-
31-
## Implemented DSP blocks
32-
33-
### Core source files
34-
35-
- `my_project/include/my_project/dsp.hpp`
36-
- `my_project/src/dsp.cpp`
12+
## DSP modules overview
3713

38-
### Available algorithms and helpers
14+
![DSP flow](docs/assets/dsp_modules_flow.svg)
3915

40-
- **Windowed-sinc FIR low-pass design** using a Blackman window and DC normalization
41-
- **Time-domain convolution**
42-
- **Goertzel tone power detector**
43-
- **GCC-PHAT delay estimation**
44-
- **Rational resampler `L/M`** using upsample-filter-decimate flow
45-
- **Utility helpers** for tone generation, RMS, and frequency-response inspection
16+
---
4617

47-
## Verification and performance workflow
18+
## Visual validation artifacts
4819

49-
The repository is structured to validate both correctness and practical usability:
20+
### FIR frequency response
5021

51-
- unit tests are auto-discovered via `gtest_discover_tests`
52-
- a smoke test exercises the demo executable
53-
- a dedicated performance suite is exposed through `ctest -L perf`
54-
- a benchmark target generates a Markdown report at `build/reports/dsp_performance.md`
22+
![FIR](docs/assets/fir_response.png)
5523

56-
## Quick start
24+
### Goertzel tone detection
5725

58-
```bash
59-
cmake -S . -B build -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
60-
cmake --build build --config Release
61-
ctest --test-dir build -C Release --output-on-failure
62-
ctest --test-dir build -C Release -L perf --output-on-failure
63-
cmake --build build --config Release --target benchmark_report
64-
```
26+
![Goertzel](docs/assets/goertzel_detection.png)
6527

66-
## Run the demo
28+
### GCC-PHAT delay estimation
6729

68-
```bash
69-
cmake --build build --config Release --target my_project_demo
70-
./build/my_project/my_project_demo
71-
```
30+
![GCC](docs/assets/gcc_phat_delay.png)
7231

73-
The demo prints key runtime indicators such as input RMS, filtered RMS, passband magnitude, stopband magnitude, and resampled signal length.
32+
---
7433

75-
## Benchmark snapshot
34+
## Algorithm engineering table
7635

77-
A local performance snapshot is available in [docs/perf_report.md](docs/perf_report.md):
36+
| Algorithm | Validation | Complexity | Optimization target |
37+
|---|---|---|---|
38+
| FIR (windowed-sinc) | unit tests + freq response | O(N·M) | SIMD / FFT convolution |
39+
| Convolution | impulse + RMS checks | O(N·M) | overlap-save FFT |
40+
| Goertzel | tone detection tests | O(N) | vectorization |
41+
| GCC-PHAT | delay accuracy tests | O(N²) (DFT) | FFT-based cross-spectrum |
42+
| Resampler L/M | length + spectral checks | O(N·M) | polyphase filters |
7843

79-
| Benchmark | Samples | Avg time (ms) | Throughput (MSa/s) |
80-
|---|---:|---:|---:|
81-
| FIR 127-tap convolution | 32768 | 2.794 | 11.727 |
82-
| Goertzel power detector | 8192 | 0.044 | 184.380 |
83-
| GCC-PHAT delay estimate | 1024 | 179.096 | 0.006 |
44+
---
8445

85-
These values are hardware-, compiler-, and configuration-dependent, but they make the repository immediately more useful for discussing optimization priorities.
46+
## Engineering decisions
8647

87-
## CI
48+
This repository intentionally prioritizes **clarity and correctness over premature optimization**.
8849

89-
Workflow file:
50+
Key design choices:
9051

91-
- `.github/workflows/cmake-multi-platform.yml`
52+
- **Readable DSP kernels** instead of opaque optimized code
53+
- **Naive DFT baseline for GCC-PHAT** to make algorithm structure explicit
54+
- **Time-domain FIR** as a reference implementation before FFT acceleration
55+
- **Strict test coverage** before performance tuning
56+
- **Separation of concerns**: DSP / tests / benchmarks / reports
9257

93-
### CI matrix
58+
Trade-offs:
9459

95-
- `ubuntu-latest`
96-
- `windows-latest`
60+
- Lower raw performance in exchange for transparency
61+
- Explicit optimization roadmap (SIMD, FFT, fixed-point)
9762

98-
### CI responsibilities
63+
This makes the project ideal as a **portfolio artifact and engineering discussion base**.
9964

100-
- configure and build the project
101-
- run the full automated test suite
102-
- run performance-labeled tests
103-
- generate and upload the benchmark report artifact
65+
---
10466

105-
## Repository layout
106-
107-
- `my_project/include/my_project/dsp.hpp` — public DSP API
108-
- `my_project/src/` — implementations and demo executable
109-
- `my_project/tests/` — unit tests
110-
- `my_project/bench/` — performance benchmark executable
111-
- `docs/dsp_tasks.md` — advanced DSP backlog
112-
- `docs/perf_report.md` — local performance snapshot
113-
114-
## Performance notes
115-
116-
A notable current optimization target is the GCC-PHAT path, where the implementation currently uses a naive DFT-based approach. That keeps the algorithm readable while leaving clear room for future FFT-based acceleration.
117-
118-
In other words, the repository is already strong as a correctness-first showcase while still exposing realistic performance engineering opportunities.
119-
120-
## Roadmap
121-
122-
See [docs/dsp_tasks.md](docs/dsp_tasks.md) for the advanced backlog. Current directions include:
123-
124-
- sub-sample TDOA
125-
- adaptive filters (`LMS`, `NLMS`, `RLS`)
126-
- polyphase channelizer
127-
- OFDM synchronization
128-
- beamforming
129-
- fixed-point DSP kernels
130-
- SIMD-oriented optimization and performance hardening
131-
132-
## Future improvements
67+
## Highlights
13368

134-
Potential next steps for making the repository even stronger:
69+
- modern **C++17** codebase
70+
- **CMake + CTest + GoogleTest** workflow
71+
- CI on **Linux** and **Windows**
72+
- correctness-first implementation with clear optimization headroom
73+
- benchmark reporting for performance-oriented iteration
13574

136-
- replace naive DFT paths with FFT-based implementations
137-
- add SIMD-accelerated kernels for selected hot loops
138-
- introduce fixed-point variants for embedded-oriented DSP paths
139-
- add richer benchmark comparisons across platforms and toolchains
140-
- include small visual artifacts such as impulse-response or frequency-response plots
75+
---
14176

14277
## License
14378

144-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
79+
MIT

0 commit comments

Comments
 (0)