peakrdl-cheader
Generate C Header files from a SystemRDL register model
What it is and what it does
PeakRDL C Header is a code generator that converts SystemRDL register specifications into C header files. It sits on top of the systemrdl-compiler to parse hardware register definitions and uses jinja2 templates to produce C code. The package is designed for hardware-software co-development workflows where register layouts defined in SystemRDL need to be exposed to C firmware or driver code.
The tool is part of the broader PeakRDL ecosystem and targets developers working with register-level hardware abstractions. It automates the error-prone manual translation of register specifications into C headers, ensuring consistency between hardware documentation and software code. The package is production-stable, actively maintained, and has no known security vulnerabilities.
Use it for:
- Generate C headers from SystemRDL register models for embedded firmware development
- Automate register definition synchronization between hardware specs and C driver code
- Create consistent register access structures for SoC bring-up and validation
- Integrate register code generation into hardware-software build pipelines
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates C header files from SystemRDL register models, converting hardware register specifications into C code suitable for software development.
Yes. The package is production-stable, actively maintained, has low install friction, and solves a real problem in hardware-software co-development. The LGPLv3 copyleft license is standard for open-source tools and poses no barrier for most use cases. Install it if you work with SystemRDL register models and need C headers.
Install
peakrdl-cheader on PyPI
pip
pip install peakrdl-cheaderuv
uv add peakrdl-cheaderpoetry
poetry add peakrdl-cheaderInstalling peakrdl-cheader
Before you install
Low install friction with a pure Python wheel. Actively maintained as of March 2026 with recent commits. Depends on systemrdl-compiler and jinja2, both stable and widely available.
License in practice
Licensed under LGPLv3 (copyleft). You may use and modify the package freely, but any derivative work must also be licensed under LGPLv3 and source code must be made available.
Quickstart
pip install peakrdl-cheader
from peakrdl.cheader import CHeaderCompiler
from systemrdl import RDLCompiler
rdl = RDLCompiler()
rdl.compile_file('registers.rdl')
compiler = CHeaderCompiler(rdl.root)
compiler.write('output.h')
Requires a valid SystemRDL input file and systemrdl-compiler to parse it; jinja2 is used internally for template rendering.
Verify before relying
- Whether the package supports incremental compilation or batch processing of multiple register models
- What C standard or dialect the generated headers target
- Whether generated headers include register access macros or only struct definitions
Package facts
| License | LGPLv3 (copyleft) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — systemrdl-compiler, jinja2 |
| Maintenance | actively maintained — 139 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 231,501/month — #9,085 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: peakrdl_cheader-1.1.0-py3-none-any.whl
Keywords: SystemRDL, PeakRDL, CSR, compiler, tool, registers, generator, C, header, software
Tags
More Electronic Design Automation (EDA) packages
Parses and elaborates SystemRDL 2.0 register…
permissive · top 15,000 on PyPI
planarityTests whether a graph is planar, computes…
permissive · top 15,000 on PyPI
cocotbcocotb is a Python framework for writing…
permissive · top 15,000 on PyPI
pyslangpyslang provides Python bindings to parse,…
permissive · top 15,000 on PyPI
peakrdl-ipxactConverts between SystemRDL register…
copyleft · top 15,000 on PyPI
klayoutKLayout is a Python package for layout viewing,…
copyleft · top 15,000 on PyPI
peakrdl-pythonGenerates a Python Register Access Layer (RAL)…
copyleft · top 15,000 on PyPI
peakrdl-systemrdlExports a compiled register model into…
copyleft · top 15,000 on PyPI
peakrdl-htmlGenerates HTML documentation for register…
copyleft · top 15,000 on PyPI
peakrdl-regblockCompiles SystemRDL register descriptions into…
copyleft · top 15,000 on PyPI
peakrdl-cliPeakRDL is a command-line tool that generates…
copyleft · top 15,000 on PyPI
peakrdlPeakRDL is a control and status register (CSR)…
copyleft · top 15,000 on PyPI
peakrdl-uvmGenerates UVM (Universal Verification…
copyleft · top 15,000 on PyPI
siliconcompilerSiliconCompiler is a modular hardware build…
permissive · top 15,000 on PyPI