PeakRDL

1.5.0 · active · verified Thu Apr 16

PeakRDL is a free and open-source toolchain for control/status register (CSR) automation and code generation. It is centered around the SystemRDL register description language but can also work with other CSR specifications like IP-XACT. The current version is 1.5.0, and it maintains an active development and release cadence, providing a unified command-line interface for tasks such as generating Verilog CSR RTL, compiling C register abstraction layers, and producing documentation.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use the `peakrdl` command-line tool to generate a C header file and HTML documentation from a simple SystemRDL description. First, create a file named `example.rdl` with the provided content, then run the `peakrdl` commands in your terminal.

# example.rdl
addrmap my_device {
    reg { 
        field { sw = rw; hw = r; } control_field[7:0] = 0; 
        field { sw = r; hw = w; } status_field[15:8] = 0; 
    } my_register;
    regfile my_block [2] {
        reg { field { sw = rw; } data[31:0] = 0; } data_reg;
    };
};

# Terminal commands
# Generate a C header file
peakrdl c-header example.rdl -o example.h

# Generate HTML documentation
peakrdl html example.rdl -o html_docs/

view raw JSON →