# gendocverilog

> Generate IP documentation from Verilog definition

- Catalog id: `Gendocverilog`; bundle: `gendocverilog`; latest version 20261018
- Documentation page: https://edautils.com/VerilogDocumentGenerator.html
- Keywords: Verilog documentation, IP documentation generator, module datasheet, port documentation
- 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/gendocverilog.md

## Downloads

- EDAUtils download site: https://edautils.ai/download/Gendocverilog (latest file `gendocverilog-20261018.tar.gz`)
- SourceForge: https://sourceforge.net/projects/edautils-free-utilities/files/gendocverilog/
- GitHub Releases: https://github.com/edautils/releases/releases/download/RELEASE_20261018/gendocverilog-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 a Verilog/SystemVerilog design, picks one module (`-top`) and writes an OpenDocument
text file (`.odt`) documenting it: introduction (taken from the module's leading comment),
ports, parameters and a block image of the module. With `-enablecomments` the descriptions
come from the comments attached to the module, ports, parameters and regs. The document is
filled into the ODT template `$EDAUTILS_ROOT/lib/hdldocgen.odt`. Main class:
`com.eu.miscedautils.docgen.GenDocVerilog` (jar `lib/docgenerator.jar`).

### Where it ships

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

### Prerequisites

- Java on `PATH` (the launcher runs plain `java`, with `-Djava.awt.headless=true`). 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`. The template is located through `EDAUTILS_ROOT` (`lib/hdldocgen.odt`).
- Licence feature `VERILOGDOCGEN`. 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),
  `EDAUTILS_LIBRARY_MAP_FILE` (default for `-mapfile`).
- No external tools needed (no office suite is required to write the `.odt`).

### Invocation

```
gendocverilog -in <file.v> | -f <filelist>  -top <module>  [-out <file.odt>]  [options]
```

Tool-specific options:

| Option | Meaning |
|---|---|
| `-top <module>` | Module to document (mandatory; missing it prints the usage and exits 0) |
| `-out <file>` | Output document (default `output.odt` in the current directory) |
| `-enablecomments` | Collect descriptions from comments in the module/ports/params/regs |
| `-noelab` | Do not elaborate the design before documenting |
| `-v2014` / `-v2022` | Select the 2014 document generator; the output content is the same as the default (2009) one, only some message ids differ |
| `-help`, `-h` | Print usage and exit |

Common Verilog-reader options (shared parser, `FVPProcessCmdLineArgs`): `-in <file>`,
`-f <filelist>`, `-excludefilelist <file>`, `+incdir+<p1>+<p2>`, `+define+A+B=1`, `-v95`
(no SystemVerilog keywords), `-nowildcard`, `-nokeywords a:b`, `-blackbox` (blackbox
undefined modules), `-declare_wires_for_undefined_obects`, `-dump`, `-restore <units>`,
`-work <lib>`, `-mapfile <ini>`, `-l <log>` / `-la <log>` (log file / append),
`-quiet`, `-nobanner`, `-dbg`, `-suppress <id1:id2>`, `-user <email>`, `-encryption_key`,
`-encryption_algorithm`, `-private_key_file`, `-public_key_file`.
An unrecognised option is an error (message "Unrecognized option") followed by the usage.

### Inputs / Outputs

- Reads: the Verilog files from `-in` / `-f` and their `` `include`` files;
  `$EDAUTILS_ROOT/lib/hdldocgen.odt`.
- Writes: the `-out` document and `<top>.edautils.png` (block image embedded in the
  document), both in / relative to the current directory.
- Log: `gendocverilog.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** (parse errors, top module
  not found, missing template all return 0). 10 = licence checkout failed.
  1 = `EDAUTILS_ROOT` missing/invalid.
- Message format: `gendocverilog: <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.
- `Top '<name>' not found in the input file ...` ends the run without the summary line.
- Otherwise the run ends with `gendocverilog: Note: <id>: Found N error(s) and M warning(s) ...`;
  this summary is **not printed with `-nobanner`**.

### Examples

Shipped: `examples/i2c_master_top/` (`runme.csh`, `runme.bat`, `infile.list` = `*.v`,
the i2c master RTL):

```
cd $EDAUTILS_ROOT/examples/i2c_master_top
gendocverilog -f infile.list -top i2c_master_top -out i2c_master.odt
```

From the regression suite (`tests.edautilscommandline/tests/gendocverilog/param_map/runme.csh`
via `../runme_common.csh`, which compares only the log against `gendocverilog.log.gld`):

```
gendocverilog -in param_map.v -top param_map
```

### Integration notes

- Non-interactive; does not read stdin. Run with `</dev/null`.
- Writes the log, the default output and the `.png` 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.

### See also

gendocipxact (document from IP-XACT), parseverilog, verilog2ipxact.
