# ipxactreg2verilog

> Generate synthesizable Verilog RTL for the registers and address blocks of an IP-XACT component, with a bus interface for register access.

- Catalog id: `Ipxactreg2verilog`; bundle: `ipxactreg2verilog`; latest version 20261018
- Documentation page: https://edautils.com/ip-xact.html
- Keywords: register RTL generator, IP-XACT registers to Verilog, memory map RTL, IEEE 1685
- Terms: as stated on edautils.com, EDAUtils tools are free for commercial and academic use, with no license server. The bundle's own metadata says: "Free to evaluate with the bundled licence; commercial licences from help@edautils.com". Licence prerequisites per tool are under "How an agent runs it".
- This file: https://edautils.com/capabilities/ipxactreg2verilog.md

## Downloads

- EDAUtils download site: https://edautils.ai/download/Ipxactreg2verilog (latest file `ipxactreg2verilog-20261018.tar.gz`)
- SourceForge: https://sourceforge.net/projects/edautils-converters/files/ipxactreg2verilog/
- SourceForge: https://sourceforge.net/projects/ip-xact-tools/files/ipxactreg2verilog/
- GitHub Releases: https://github.com/edautils/releases/releases/download/RELEASE_20261018/ipxactreg2verilog-20261018.tar.gz (release `RELEASE_20261018`; all releases: https://github.com/edautils/releases/releases)

## How an agent runs it

The following is the AGENTS.md shipped at the root of the bundle.

Reads an IP-XACT register description (a component, memoryMaps, memoryMap or addressBlock
XML) and writes a synthesisable Verilog register-interface block: one module holding the
registers, with a generic read/write bus interface (clock, asynchronous reset, read/write
request, read/write address, read/write data, address-valid) whose port names and bus
widths are configurable, plus one output port per register (or per bit field with
`-fieldtypeport`). Main class:
`com.eu.miscedautils.ipxactreg2verilog.GenerateRegisterInterfaceBlock`
(jar `lib/ipxactreg2verilog.jar`).

### Where it ships

Its own bundle, `ipxactreg2verilog.tar.gz` (flow `ipxactreg2verilog`; release tree
`release_scripts/ipxactreg2verilog/1.0`), and as a point tool in the **ipxact-shell** and
**designplayer-shell** bundles (`bin/ipxactreg2verilog` running the shell's jar; this guide as
`tools/ipxactreg2verilog/AGENTS.md`, examples under `tools/ipxactreg2verilog/examples/`).

### Prerequisites

- Java on `PATH` (the launcher runs plain `java`). Use Java 11 or newer (Java 21 recommended: the
  release is built and regression-tested with OpenJDK 21); the bundled JAXB and Eclipse libraries
  are class-file version 55, so a Java 8 runtime fails with `UnsupportedClassVersionError`.
- `EDAUTILS_ROOT` = the unpacked bundle directory (must contain `bin/` and `lib/`). The
  launcher exits 1 with "Environment variable EDAUTILS_ROOT is not set" otherwise.
  `source setup_env.sh` (or `setup_env.csh`) from the bundle root sets `EDAUTILS_ROOT`,
  `EDAUTILS_LICENSE_FILE=$EDAUTILS_ROOT/edautils.lic`, `CLASSPATH` and prepends `bin/` to
  `PATH`.
- Licence feature `IPXACTREG2VERILOG`. The licence file is searched in this order:
  `$EDAUTILS_LICENSE_FILE`, `./edautils.lic` (run directory), `$HOME/edautils.lic`,
  `$EDAUTILS_ROOT/edautils.lic`. No licence for the feature: exit status 10.
- Optional environment: `JAVA_FLAGS` (passed to the JVM, e.g. `-Xmx8g`; with no heap option in it the launcher adds `-Xmx` sized to the machine (`bin/eu_heap.sh`: the largest of 64/32/16/12/8/4 GB within 3/4 of physical or cgroup memory, else 2 GB; `EDAUTILS_MAX_HEAP_GB` caps it)),
  `EDAUTILS_LOG_FILE` / `EDAUTILS_APPEND_LOG_FILE` (log file name; the second appends),
  `EDAUTILS_DISABLE_USAGE_TRACKING=true`, `EDAUTILS_PRINT_STACK_TRACE` (stack traces on
  internal exceptions), `EDAUTILS_ENABLE_DEBUG_ENVIRONMENT=1` (debug messages).
- No external tools needed.

### Invocation

```
ipxactreg2verilog -in <ipxact.xml> [-out <file.v>] [-v2009 | -v2022] [options]
```

Tool-specific options (defaults in brackets):

| Option | Meaning |
|---|---|
| `-in <file>` | IP-XACT XML input (mandatory; read by the shared parser options) |
| `-out <file>` | Output Verilog file [`output.v`] |
| `-v2009` / `-v2022` | Input is IP-XACT 1685-2009 / 1685-2022 [1685-2014] |
| `-clk <name>` | Clock port [`clk`] |
| `-async_rst <name>` | Asynchronous reset port [`async_rst`] |
| `-read_request <name>` / `-write_request <name>` | Request ports [`rd`] / [`wr`] |
| `-read_address <name>` / `-write_address <name>` | Address ports [`rd_addr`] / [`wr_addr`] |
| `-read_data <name>` / `-write_data <name>` | Data ports [`rd_data`] / [`write_data`] |
| `-addr_valid <name>` | Address-valid output [`addr_valid`] |
| `-address_bus_width <n>` / `-data_bus_width <n>` | Bus widths [32] / [32] |
| `-base_address <n>` | Base address, decimal or `0x` hex |
| `-regwidth <n>` | Register width for an address-block input (not in `-help`) |
| `-fieldtypeport` | One port per bit field instead of per register |
| `-ignore_bitfield_access` | Use only the register's access type, ignore bit-field access |
| `-template <file.v or filelist>` | Existing Verilog whose last module is filled in instead of a new module (not in `-help`) |
| `-apb <file>` / `-ahb <file>` | Parsed as Verilog after generation; the result is not used, so they do not change the output (not in `-help`) |
| `-help`, `-h` | Print usage and exit |

Common Verilog-reader options (shared parser, `FVPProcessCmdLineArgs`): `-in <file>`,
`-f <filelist>`, `-out <file>`, `+incdir+<p1>+<p2>`, `+define+A+B=1`, `-v95`, `-nowildcard`,
`-l <log>` / `-la <log>` (log file / append), `-quiet`, `-nobanner`, `-dbg`,
`-suppress <id1:id2>`, `-user <email>`; the parser options only matter for `-template`.
An unrecognised option is an error ("Unrecognized option"); the run then stops **without**
printing the usage or the summary, and the option named in the message can be the wrong
argument (see Exit status).

### Inputs / Outputs

- Reads: the `-in` XML; the `-template` Verilog if given.
- Writes: the `-out` Verilog file (default `output.v` in the current directory). The
  module is named after the IP-XACT element (for example the address block), unless
  `-template` supplies it.
- Log: `ipxactreg2verilog.log` in the current directory (override with `-l`/`-la` or
  `EDAUTILS_LOG_FILE`).

### Exit status and messages

- 0 on a normal finish, **including runs that reported errors** (missing `-in`, unreadable
  XML, bad `-regwidth`/`-*_bus_width`/`-base_address`, unrecognised option all return 0).
  10 = licence checkout failed. 1 = `EDAUTILS_ROOT` missing/invalid.
- Message format: `ipxactreg2verilog: <Severity>: <id>: <text>`, severity one of `Error`,
  `Fatal Error`, `Warning`, `Note`; `<id>` is a 5-digit message number. Usage lines have
  no severity or id.
- Typical failures: `NULL object passed as component definition XML ...` (no `-in`),
  `Unsupported IP-XACT Element of type : ...`, `Failed to parse argument : -<opt> <val>`,
  `Failed to process ...` (Fatal, nothing written).
- The "Unrecognized option" message indexes the original argument list with the position
  in the list of tool-specific leftovers, so it may name a different argument than the
  one rejected.
- The run ends with `ipxactreg2verilog: Note: <id>: Found N error(s) and M warning(s) ...`;
  this summary is **not printed with `-nobanner`**.

### Examples

Shipped: `examples/addressblk/` (`runme.csh`, `runme.bat`, `addrblk.xml`):

```
cd $EDAUTILS_ROOT/examples/addressblk
ipxactreg2verilog -v2009 -in addrblk.xml -out output.v
```

From the regression suite
(`tests.edautilscommandline/tests/ipxactreg2verilog/test_1reg_override_defaults/runme.csh`
via `../runme_common.csh`, which diffs `output.v` against `output.v.gld`):

```
ipxactreg2verilog -in test_1reg_override_defaults.xml -out output.v \
    -clk clock -async_rst async_reset -read_request rd_req -write_request wr_req -v2009
```

### Integration notes

- Non-interactive; does not read stdin. Run with `</dev/null`.
- Writes the log and default output into the current directory: give each parallel run its
  own working directory (or distinct `-out` and `-l`).
- Set `EDAUTILS_DISABLE_USAGE_TRACKING=true` to stop usage registration.
- Success test: exit status 0 **and** the log contains `Found 0 error(s)` (do not use
  `-nobanner` if you rely on that line) **and** the `-out` file exists.
- (2026-10-03) A block of several registers declares `rd_valid_internal`/`wr_valid_internal` once
  (it used to repeat them per register, which no compiler accepts).

### See also

genregistercmodel, genregisteruvmmodel, ipxact2verilog, xls2ipxact.
