Generate empty Verilog modules (ports only) for every cell in a Liberty .lib library, for netlist compilation without vendor models.
Reads a Liberty (.lib) library and writes an empty Verilog module (port list and directions only, no body) for each selected cell into one file (default output.v) -- black-box stubs for simulation, linting or netlist reading.
Usage
lib2verilog -in <file.lib> -cells <cell1:cell2> | -cells all | -all [-out <file.v>]
Every option is listed by lib2verilog -help, and the complete reference is in the capability file that ships with the tool's AGENTS.md.
Exit status
- 0 on a normal finish, including runs that reported errors (parse errors, cells not found, usage errors, internal exceptions). 1 = the
-outfile cannot be opened, out of memory, orEDAUTILS_ROOTmissing/invalid (launcher). 10 = license checkout failed. - Message format:
lib2verilog: <Severity>: <id>: <text>, severity one ofError,Fatal Error,Warning,Note;<id>is a 5-digit number. Usage lines have no severity or id. - A requested cell that is absent logs Error "Cell '<c>' not found in the parsed library : <lib>" (once per
librarygroup searched); the other cells are still written.
Requirements
Java 11 or newer on PATH (Java 21 recommended), Linux or Windows. Unpack the bundle, run source setup_env.sh and call lib2verilog. Install in one command with curl -fsSL https://edautils.com/install.sh | sh -s -- lib2verilog.