.. _peakrdl_cfg:
Configuring PeakRDL-etana
=========================
If using the `PeakRDL command line tool `_,
some aspects of the ``regblock`` command have additional configuration options
available via the PeakRDL TOML file.
All regblock-specific options are defined under the ``[regblock]`` TOML heading.
.. data:: cpuifs
Mapping of additional CPU Interface implementation classes to load.
The mapping's key indicates the cpuif's name.
The value is a string that describes the import path and cpuif class to
load.
For example:
.. code-block:: toml
[regblock]
cpuifs.my-cpuif-name = "my_cpuif_module:MyCPUInterfaceClass"
.. data:: default_reset
Choose the default style of reset signal if not explicitly
specified by the SystemRDL design. If unspecified, the default reset
is active-high and synchronous.
Choice of:
* ``rst`` (default)
* ``rst_n``
* ``arst``
* ``arst_n``
For example:
.. code-block:: toml
[regblock]
default_reset = "arst"
Command Line Options
====================
The following command-line options are available when using the PeakRDL command line tool:
CPU Interface Selection
-----------------------
.. option:: --cpuif
Select the CPU interface protocol. All interfaces use **flattened signals** (individual ports)
rather than SystemVerilog structs.
Available options:
* ``apb3-flat`` - AMBA APB3 interface (flattened signals)
* ``apb4-flat`` - AMBA APB4 interface (flattened signals) **[default]**
* ``ahb-flat`` - AMBA AHB interface (flattened signals, shared bus stall support)
* ``axi4-lite-flat`` - AMBA AXI4-Lite interface (flattened signals)
* ``avalon-mm-flat`` - Avalon Memory-Mapped interface (flattened signals)
* ``obi-flat`` - Open Bus Interface (flattened signals)
* ``wishbone-flat`` - Wishbone B4 Classic interface (flattened signals)
* ``passthrough`` - Direct internal protocol passthrough
.. note::
PeakRDL-etana **only supports flattened signal interfaces**. This is the key
architectural difference from PeakRDL-regblock. All ``-flat`` variants use
individual signal ports (e.g., ``s_apb_psel``, ``s_apb_pready``) instead of
SystemVerilog interface types.
Hardware Interface Customization
---------------------------------
.. option:: --in-str
Customize the prefix for hardware interface input signals. Default is ``hwif_in``.
Example:
.. code-block:: bash
peakrdl etana design.rdl --in-str my_hw_in -o output/
.. option:: --out-str
Customize the prefix for hardware interface output signals. Default is ``hwif_out``.
Example:
.. code-block:: bash
peakrdl etana design.rdl --out-str my_hw_out -o output/
Reset Configuration
-------------------
.. option:: --default-reset