How ntue2719-commits/image-dsp-benchmark works
This repository benchmarks an integer-only image-processing pipeline with Python, C, and Verilog implementations. Its principal workflow generates or loads an image, converts it to grayscale, adds reproducible salt-and-pepper noise, filters it, computes Sobel magnitude, and thresholds the result into an edge image. The Python golden model orchestrates the sampled stages and emits vectors used by the documented C/RTL comparison. The README also documents CPU/FPGA benchmarking across three boards. C, board projects, and verification internals were not sampled, so their wiring is shown only where documented.
Main entry points: golden_model.py Golden model · README.md Platform benchmarks · c C implementation · rtl RTL pipeline
Components 21
Python reference
- Golden model
python/golden_model.py - Grayscale
python/preprocess.py - Noise injection
python/noise.py - Median filter
python/median.py - Sobel threshold
python/sobel.py - Golden vectors
python/golden_model.py
Compute implementations
- C implementation
c - RTL pipeline
rtl - Line buffer
rtl/line_buffer.v - 3×3 window
rtl/window_3x3.v - RTL median
rtl/median_3x3.v - RTL Sobel
rtl/sobel_3x3.v - Gradient magnitude
rtl/gradient_mag.v - RTL threshold
rtl/Threshold.v
FPGA platforms
- EBAZ4205
fpga/ebaz - Kria KR260
fpga/kr260 - Orange Pi Zero
README.md
Verification and benchmarks
- Bit-exact checks
python - Platform benchmarks
README.md - Benchmark results
results
Other components
- Image provider
Connections 14
- Image provider → Golden model: supplies image
- Golden model → Grayscale: calls
- Golden model → Noise injection: calls
- Golden model → Median filter: calls
- Golden model → Sobel threshold: calls
- Golden model → Golden vectors: writes vectors
- Golden vectors → C implementation: input vectors
- Golden vectors → RTL pipeline: input vectors
- C implementation → Bit-exact checks: compared against
- RTL pipeline → Bit-exact checks: compared against
- EBAZ4205 → Platform benchmarks: benchmarked on
- Kria KR260 → Platform benchmarks: benchmarked on
- Orange Pi Zero → Platform benchmarks: benchmarked on
- Platform benchmarks → Benchmark results: records metrics