Generate a Liberty .lib library shell from Verilog modules: one cell per module with its pins and directions, for synthesis, timing and floorplan flows. Free EDAUtils tool for Linux and Windows.
Parses Verilog/SystemVerilog and writes a Liberty (.lib) library with one cell per selected module, holding its pins and buses with directions (no timing or power data -- a pin-interface view). Library, cell and pin attributes can be injected from a config file. Output is one file (default output.lib).
Usage
verilog2lib -in <file.v> | -f <files.list> -top <module> | -modules <m1:m2>
[-out <file.lib>] [-libname <name>] [-cfg <config.cfg>]
[-bitblast [-prefixslash]] [-notypeincell]
[-v95] [-nowildcard] [+incdir+<d1>+<d2>] [+define+<M1>+<M2>=<val>]
[-nobanner] [-quiet] [-suppress <id1:id2>]
Every option is listed by verilog2lib -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, modules 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:
verilog2lib: <Severity>: <id>: <text>, severity one ofError,Programming Error,Fatal Error,Warning,Note;<id>is a 5-digit number. - Key messages: Error "The top module named <m> not found ..." (that module is skipped, others are still converted), Error "You must specify module(s) to be converted with the -top or the -modules switch ...", Note
Written Library in file : <out>. The run ends withFound N error(s) and M warning(s) ...(not with-nobanner).
Requirements
Java 11 or newer on PATH (Java 21 recommended), Linux or Windows. Unpack the bundle, run source setup_env.sh and call verilog2lib. Install in one command with curl -fsSL https://edautils.com/install.sh | sh -s -- verilog2lib.