Register map generator

Describe your control/status registers in YAML. Get a synthesizable APB4 SystemVerilog register block, a self-checking testbench, a C header and Markdown documentation. Everything runs in your browser: your spec never leaves your machine.

Spec (YAML)

    How it works

    1. Write your register map in YAML, or click Visual editor to build it graphically: drag registers around the address map, and drag across bits to create, move and resize fields.
    2. Check the Preview tab for bit-field layout, overlaps and gaps.
    3. Download the RTL, testbench, header and docs. All are generated from the same spec, so they always agree.
    4. Run the testbench (iverilog -g2012 or verilator --binary) to check the generated block before you integrate it.

    Spec reference

    KeyWhereMeaning
    nametopBlock name. The module is <name>_regs.
    data_widthtop8, 16, 32 (default) or 64.
    addr_widthtopWidth of paddr. Optional; the minimum that fits the highest offset is used if omitted.
    slverr_on_unmappedtopAssert pslverr on accesses to unmapped offsets (default true).
    offsetregisterByte offset, aligned to the data width. Optional: defaults to the next word after the previous register.
    fieldsregisterList of bit fields. Omit it and give access/reset on the register for one full-width field.
    stroberegisterAdd <reg>_wr_o / <reg>_rd_o one-cycle pulses (e.g. for FIFO push/pop).
    bitsfieldA single bit (3) or range ("15:8"). Quote ranges.
    accessfieldOne of the access types below.
    resetfieldReset value (decimal, 0x…, 0b…). Quote values above 253.

    Access types and hardware ports

    AccessSoftwareHardware portsNotes
    rwread / write_o valueByte strobes respected.
    roread_i valueNo storage; reads sample the input directly.
    wowrite, reads 0_o value
    w1cread, write 1 to clear_o value, _set_iHardware set wins over a same-cycle software clear, so events are never lost.
    w1sread, write 1 to set_o value, _clr_iSoftware set wins over a same-cycle hardware clear.
    rcread, clears on read_o value, _set_iThe read returns the value before clearing; a same-cycle hardware set wins.

    Generated bus interface

    The block is an AMBA APB4 completer with zero wait states (pready tied high), asynchronous active-low reset (presetn), and pstrb byte-lane write masking. Low address bits below the word size are ignored. prdata is driven combinationally from the address during the access phase.

    FAQ

    Is the output synthesizable?

    Yes. It uses plain always_ff/always_comb SystemVerilog with no vendor primitives.

    Is my spec uploaded anywhere?

    No. Generation runs in JavaScript in your browser. "Share link" encodes the spec into the URL fragment, which browsers don't send to the server.

    What about AXI4-Lite, UVM RAL, SystemRDL or IP-XACT?

    These are planned. Tell us which you need most.