Example
The easiest way is to use the PeakRDL command line tool:
- PeakRDL CLI
- Python script
# Install the command line tool
python3 -m pip install peakrdl
# Export!
peakrdl halcpp examples/atxmega_spi.rdl -o examples/generated/
from systemrdl import RDLCompiler
from peakrdl_halcpp import HalExporter
rdlc = RDLCompiler()
rdlc.compile_file("atxmega_spi.rdl")
root = rdlc.elaborate()
top_gen = root.children(unroll=True)
top = None
for top in top_gen:
top = top
assert top is not None
exporter = HalExporter()
exporter.export(
node=top,
outdir="generated",
)