Skip to content

Commit 6328ab0

Browse files
oharboeclaude
andcommitted
asap7: add lib2v.py to generate behavioral Verilog from Liberty files
Verilator cannot simulate the vendor-supplied Verilog because it uses Verilog-1995 UDP primitives. This script parses .lib/.lib.gz files and generates clean behavioral Verilog for gate-level netlist simulation. Supports all cell types (combinational, DFF, latch, ICG, scan-DFF, multi-bit DFF) and all ASAP7 Vt variants (RVT, LVT, SLVT, SRAM). Physical-only cells (TAPCELL, FILLER, DECAP) are generated from LEF. Includes unit tests (37 tests) hooked up via Bazel py_test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 2453de8 commit 6328ab0

3 files changed

Lines changed: 1371 additions & 0 deletions

File tree

‎flow/scripts/BUILD.bazel‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
load("@rules_python//python:defs.bzl", "py_library", "py_test")
2+
3+
py_library(
4+
name = "lib2v",
5+
srcs = ["lib2v.py"],
6+
visibility = ["//visibility:public"],
7+
)
8+
9+
py_test(
10+
name = "test_lib2v",
11+
srcs = ["test_lib2v.py"],
12+
deps = [":lib2v"],
13+
)

0 commit comments

Comments
 (0)