Use this skill when a flow needs a Synopsys .db and only has either a Liberty .lib or an RTL top module whose ports should become a black-box stub cell.
Commands
The bundled script is scripts/lib_db_gen.py.
Convert an existing Liberty file to DB:
python3 .agents/skills/lib-db-gen/scripts/lib_db_gen.py convert \
--lib path/to/input.lib \
--db path/to/output.db
Generate an early black-box Liberty from a Verilog top and compile it to DB:
python3 .agents/skills/lib-db-gen/scripts/lib_db_gen.py stub \
--top-v path/to/top.v \
--top top_module_name \
--lib path/to/top_stub.lib \
--db path/to/top_stub.db
Use --no-run to only emit the .lib and the Library Compiler Tcl script. Use --lc-shell /path/to/lc_shell when lc_shell is not on PATH. Use --work-dir <dir> to control where Library Compiler writes lc_command.log and lc_output.txt; by default this is <db-output-dir>/lc_work, not the repository root.
Workflow
- Prefer a real foundry or platform Liberty for timing signoff and mapped synthesis.
- Use
convertfor real Liberty to.dbconversion. - Use
stubonly for early integration, link, or black-box bring-up. The generated cell has ports and zero-area placeholder attributes; it is not timing or power evidence. - Keep generated
.db,.lib, and LC logs out of Git unless they are reviewed release collateral. - For Design Compiler setup, point local ignored config such as
scripts/local.mkat the generated.db, for exampleSKY130HD_DC_DB := /path/to/lib.db.
Notes
stubparses ANSI-style module headers and simple non-ANSI declarations.- Numeric packed ranges like
[7:0]become Liberty bus types. Parameterized widths are treated as scalar with a warning; use a resolved wrapper if bus width fidelity matters. - The generated stub DB is for black-box linking, not cell mapping. It does not replace a standard-cell target library.