# ipxactinterface2svinterface

> Generate SystemVerilog interfaces from IP-XACT bus and abstraction definitions.

- Catalog id: `Ipxactinterface2svinterface`; bundle: `ipxactinterface2svinterface`; latest version 20261018
- Documentation page: https://edautils.com/DownloadLinks.html
- Keywords: IP-XACT to SystemVerilog interface, bus definition, abstraction definition, SystemVerilog interface generator
- 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/ipxactinterface2svinterface.md

## Downloads

- EDAUtils download site: https://edautils.ai/download/Ipxactinterface2svinterface (latest file `ipxactinterface2svinterface-20261018.tar.gz`)
- SourceForge: https://sourceforge.net/projects/edautils-converters/files/ipxactinterface2svinterface/
- SourceForge: https://sourceforge.net/projects/ip-xact-tools/files/ipxactinterface2svinterface/
- GitHub Releases: https://github.com/edautils/releases/releases/download/RELEASE_20261018/ipxactinterface2svinterface-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 one IP-XACT **abstraction definition** (the RTL view of a bus, e.g. `APB_rtl.xml`) and writes
it as a SystemVerilog `interface` into one file (default `output.sv`): one `wire` per logical port,
plus a `modport master`, `modport slave` and `modport system` built from the per-mode directions.
The interface is named after the abstraction definition. Main class:
`com.eu.miscedautils.shell.IPXACTInterface2SVInterface` (jar `lib/designplayer.jar`).

### Where it ships

Its own bundle, `ipxactinterface2svinterface.tar.gz` (flow `ipxactinterface2svinterface`; release
tree `release_scripts/ipxactinterface2svinterface/1.0`), and as a point tool in the
**ipxact-shell**, **baya-shell** and **designplayer-shell** bundles
(`bin/ipxactinterface2svinterface` running the shell's jar; this guide as
`tools/ipxactinterface2svinterface/AGENTS.md`, examples under
`tools/ipxactinterface2svinterface/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=$EDAUTILS_ROOT/lib/designplayer.jar`
  and prepends `bin/` to `PATH`.
- Licence feature `IPXACTINTERFACE2SVINTERFACE` (plus a valid licence file). The licence file is
  searched in this order: `$EDAUTILS_LICENSE_FILE`, `./edautils.lic` (run directory),
  `$HOME/edautils.lic`, `$EDAUTILS_ROOT/edautils.lic`. No licence or no feature: Error
  "Failed to checkout LICENSE for the feature : IPXACTINTERFACE2SVINTERFACE", 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).
  The IP-XACT loaders read the `EDAUTILS_IPXACT_SEARCH_PATH*` variables; whether this flow ever
  needs a search path (it loads a single file) was not determined.
- No XSD schemas or XSL files are read: the file is loaded through compiled JAXB bindings, so the
  bundle ships neither `bin/schemas` nor `bin/xsl`. No external tools needed.

### Invocation

```
ipxactinterface2svinterface -in <abstractionDef.xml> [-out <file.sv>] [-v2009 | -v2022]
```

| Option | Meaning |
|---|---|
| `-in <file>` | IP-XACT abstraction definition XML (mandatory) |
| `-out <file>` | Output SystemVerilog file (default `output.sv`) |
| `-v2009` | Input is IEEE 1685-2009 (SPIRIT namespace) |
| `-v2022` | Input is IEEE 1685-2022 |
| `-user <email>` | Usage-tracking user id |
| `-help` | Print the usage and return |

Without `-v2009`/`-v2022` the input is read as IEEE 1685-2014. Giving both is refused: Error
"Both -v2009 and -v2022 were given; the input file is read as one IP-XACT revision.", the usage,
exit 0. There is no `-nobanner`, `-quiet` or `-suppress`. Any other word prints
"Unrecognized option : <opt>" and the usage. No arguments prints the usage; missing `-in` prints
Error "Missing mandatory input -in <ip-xact file> ..." and the usage. An option given without its
value throws an index exception, reported as an internal error (exit 0).

The input must be an abstraction definition. The `README.txt` example (`-in businterface.xml`)
suggests a bus interface; a component or bus definition is not what this tool reads.

### Inputs / Outputs

- Reads: the `-in` XML only.
- Writes: `-out` (default `output.sv` in the current directory), only when the abstraction
  definition was loaded; otherwise nothing is written and the errors are in the log.
- Log: `ipxactinterface2svinterface.log` in the current directory (override with `EDAUTILS_LOG_FILE`).

### Exit status and messages

- 0 on every normal return, **including failures** (unloadable input, usage errors, internal
  exceptions). 10 = licence checkout failed. 1 = out of memory, or `EDAUTILS_ROOT`
  missing/invalid (launcher).
- Message format: `ipxactinterface2svinterface: <Severity>: <id>: <text>`; `<id>` is a 5-digit
  number. Usage lines have no severity or id.
- A run that gets past option parsing prints the banner, `Running with option: ...`,
  `Processing IP-XACT Interface: <VLNV>`, and ends with `Found N error(s) and M warning(s) ...`.

### Examples

Shipped: `examples/busdef.amba/` (`runme.csh`, `runme.bat`, `APB/1.0/APB_rtl.xml`):

```
cd $EDAUTILS_ROOT/examples/busdef.amba
ipxactinterface2svinterface -in APB/1.0/APB_rtl.xml -out APB.sv
```

`APB_rtl.xml` is a 1685-2009 file (SPIRIT namespace), but the shipped `runme.csh`/`runme.bat`
omit `-v2009`. The regression suite passes `-v2009` for this same file; do the same. Whether the
command above, without `-v2009`, produces the same output was not confirmed.

From the regression suite (reference:
`tests.edautilscommandline/tests/ipxactinterface2svinterface/busdef.amba/runme.csh` via
`../runme_common.csh`; golden `APB.sv.gld`; also `busdef.clock`):

```
ipxactinterface2svinterface -in APB/1.0/APB_rtl.xml -out APB.sv -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 `EDAUTILS_LOG_FILE`).
- Set `EDAUTILS_DISABLE_USAGE_TRACKING=true` to stop usage registration.
- Success test: exit status 0 **and** the log contains `Found 0 error(s)` **and** the `-out`
  file exists. Delete a stale `-out` before the run, since a failed load leaves it untouched.
- Windows: `bin/ipxactinterface2svinterface.bat` names the main class `ccom.eu.miscedautils...`
  (a typo, doubled `c`), so it fails with a class-not-found error. Run
  `java %JAVA_FLAGS% com.eu.miscedautils.shell.IPXACTInterface2SVInterface ...` with `CLASSPATH`
  from `setup_env.bat` instead.

### See also

ipxact-shell and baya-shell (`baya::connect_ipxact_interfaces_by_converting_into_sv_interface`),
ipxact2verilog, validateipxact.
