Skip to content

Liberty parser & datastruct project recommendation #8

@zao111222333

Description

@zao111222333

Hi,
I know this project from Rust China Conf 2024, that is a great open-source project and I am very interested in. Here I want to recommend my Liberty data structure & parser project which I have maintained for nearly 2 years. https://github.com/zao111222333/liberty-db

This project implements the Liberty syntax (simple/complex/group) and almost all Liberty data structures. Its parser can recognize weird syntax in foundry-provided library (e.g. TSMC), meanwhile the output formatted .lib file is compatible with library compiler.
The parser utilizes Rust’s procedural macros to enhance performance as much as possible through static methods. Additionally, the complete parser & formatter binary implemented with this library is only ~2MB in size.

Here is a benchmark result, the strength of liberty-db are not fully realized, since it also post-processes the data and stores it in specific data structures, in addition to parsing the syntax.

liberty-db liberty-io libertyparse Test Liberty File
402.79ms 115.81ms 342.70ms tests/tech/SAED32_EDK/ccs/saed32hvt_pg_ff0p95v125c.lib
599.51ms 284.08ms 839.44ms tests/tech/SAED32_EDK/ccs/saed32hvt_dlvl_ff0p85v25c_i0p85v.lib
83.12ms 40.12ms 122.26ms tests/tech/SAED32_EDK/nldm/saed32hvt_dlvl_ff0p85v25c_i0p85v.lib
4.50s 1.48s PANIC tests/tech/SAED32_EDK/nldm/saed32hvt_ff0p85v25c.lib
3.00ms 20.58ms 5.08ms tests/tech/freepdk45/gscl45nm.lib
125.41µs FAIL FAIL tests/tech/cases/no_semicolon.lib
66.77µs FAIL 131.15µs tests/tech/cases/formula.lib
16.04ms 8.67ms 25.57ms tests/tech/cases/ocv.lib
13.69ms 6.76ms FAIL tests/tech/sky130/sky130_fd_sc_hs__bufinv_8__tt_1p80V_25C_ccsnoise.cell.lib
2.13s 870.17ms 2.85s tests/tech/nangate/NangateOpenCellLibrary_typical.lib

This project will greatly benefit from feedback and suggestions for improvement. Hope we can collaborate, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions