Generate Reed-Solomon encoder/decoder hardware (Verilog) from high-level specifications.
- Project Overview
- Prerequisites
- Installation & Setup
- Quick Start
- Generating Verilog
- Running the Test Suite
- Project Structure
- Contributing
- License & Acknowledgements
The Reed-Solomon-Generator repository provides a Python-based toolchain that:
- Takes Reed-Solomon parameters (field size, irreducible polynomial, parity length, etc.) and produces synthesizable Verilog modules.
- Supports three main hardware blocks:
| Block | Source file | Description |
|---|---|---|
| RS Segment Generator | src/generators/RSSegmentVerilog.py |
Generates the per-segment multiplier logic used by the accumulator. |
| RS Accumulator | src/generators/RSAccumulatorVerilog.py |
Implements the core Reed-Solomon accumulator (parity calculation). |
| RS AXI-Stream ECC Generator | src/generators/RSAXISVerilog.py |
Wraps the accumulator with an AXI-Stream front-end for easy integration in FPGA designs. |
The generated Verilog can be dropped into an any RTL project and connected to other IP blocks via the provided AXI-Stream interface.
This project is developed in Devcontainer Docker environment other ways are probably possible but not supported. Defined in Dockerfile and in PyProject.toml
-
Clone the repository
git clone git@github.com:SatLab-AGH/Reed-Solomon-ECC-Generator.git cd reed-solomon-generator -
Open the devcontainer
If you use VSCode with Remote-Containers, the configuration lives in
.devcontainer/devcontainer.json. Opening the folder in VSCode will automatically spin up a Docker container with all extensions listed (Python, C/C++, Verilog, Ruff, etc.). -
Sync Python environment with
uvuv sync --active # installs dependencies from pyproject.toml -
(For contributors) Install pre-commit
pre-commit install
Below is a minimal example command that generates a complete Verilog module for a Reed-Solomon encoder with 10-bit symbols and 16 parity symbols.
/workspace/.venv/bin/python /workspace/src/main.py --WORD_SIZE 10 --ECC_LEN 16 --OUTPUT_DIR output The core generation flow is:
- Mastrovito matrix
MastrovitoMatrixcreates the multiplication matrix needed for GF(2^m) operations. - Segment multiplier
RSSegmentVeriloguses the matrix and the list of constant multiplicants to emit per-segment Verilog. - Accumulator
RSAccumulatorVerilogwires the segment modules together and adds the parity-generation logic. - AXI-Stream wrapper
RSAXISVerilogadds the AXI-Stream interface and feedback control.
The repository ships with a pytest-compatible test suite under tests/.
. ./scripts/mcore_regr.sh-
Fork the repository and create a feature branch.
-
Run the pre-commit hooks before committing:
pre-commit run --all-files
-
Write tests for any new functionality.
-
Submit a Merge Request via GitHub.
Note: Main work is done on SatLab AGH internal repository, any features and bugs will be worked on there and then merged to main mirrored to GitHub for the time project is developed for SatLab AGH.
This repository is shared via MIT License.
This code is developed for DZIDA Laser Communication Project for a PUCHACZ Sattelite mission.
Jan Rosa is developer contributing to Reed-Solomon Encoder Module.
Mateusz Maź is developer contributing to Reed-Solomon Decoder Module.
Huge thanks people contributing to: