graph TD subgraph "Liberty .lib File" L[Library] --> H[Header: technology, units, PVT] L --> OC["operating_conditions (typical)"] L --> T["lu_table_template (delay_2x2)"] L --> C1["cell (AND2_X1) π’"] L --> C2["cell (DFF_X1) π΅"] L --> C3["cell (INV_X1) π "] C1 --> P1["pin (A) β‘οΈ"] C1 --> P2["pin (B) β‘οΈ"] C1 --> P3["pin (Z) β¬ οΈ"] P3 --> T1["timing ()"] T1 --> CR["cell_rise (table)"] T1 --> RT["rise_transition (table)"] end style L fill:#1a237e,color:#fff style H fill:#3949ab,color:#fff style C1 fill:#2e7d32,color:#fff style C2 fill:#1565c0,color:#fff style C3 fill:#e65100,color:#fff
graph LR subgraph "Liberty Parser Data Model" direction LR G[Group] --> GN["group_name: str"] G --> GA["args: list[str]"] G --> GAT["attributes: list[Attribute]"] G --> GG["groups: list[Group] β recursive!"] GAT --> AT1["Attribute: name + value"] AT1 --> AT1V["value: EscapedString | list | float | int"] end subgraph "Timing Table Access" direction LR T["timing() group"] --> TG["get_groups('cell_rise')"] TG --> CR["cell_rise subgroup"] CR --> V["get_array('values')"] V --> NP["NumPy ndarray β "] end style G fill:#1a237e,color:#fff style GN fill:#3949ab,color:#fff style GA fill:#3949ab,color:#fff style GAT fill:#3949ab,color:#fff style GG fill:#e65100,color:#fff style T fill:#2e7d32,color:#fff style CR fill:#2e7d32,color:#fff style V fill:#1565c0,color:#fff style NP fill:#f44336,color:#fff
flowchart LR V["Verilog (.v)"] --> Y["Yosys\n synthesis"] Y --> J["JSON\n netlist"] J --> E["Cell type\n extraction"] E --> L["Liberty\n .lib file"] L --> C["convert-lib-to-json\nskill"] C --> J2["JSON + Schema\n validation β "] style V fill:#ff9800,color:#000 style Y fill:#2196f3,color:#fff style J fill:#4caf50,color:#fff style E fill:#9c27b0,color:#fff style L fill:#f44336,color:#fff style C fill:#1565c0,color:#fff style J2 fill:#2e7d32,color:#fff
flowchart LR RTL["RTL Verilog\nmy_design.v"] --> YO["Yosys\nsynth"] YO --> LIB["lib-for-verilog\nskill"] LIB --> LIBFILE["cells.lib\nLiberty library"] LIBFILE --> CONV["convert-lib-to-json\nskill"] CONV --> JSONFILE["cells.json\nStructured JSON"] JSONFILE --> SCHEMA["liberty_json_schema.json\nSchema validation"] SCHEMA --> VALID["β Validated output"] JSONFILE --> ANAL["Python analysis\npandas, numpy, etc."] style RTL fill:#ff9800,color:#000 style YO fill:#2196f3,color:#fff style LIB fill:#9c27b0,color:#fff style LIBFILE fill:#f44336,color:#fff style CONV fill:#1565c0,color:#fff style JSONFILE fill:#4caf50,color:#fff style SCHEMA fill:#e65100,color:#fff style VALID fill:#2e7d32,color:#fff style ANAL fill:#607d8b,color:#fff
graph LR LIB["Liberty .lib"] --- JSON["JSON"] JSON --- SCHEMA["Schema\nβ "] SCHEMA --- CONFIDENCE["Confidence\nπ"] CONFIDENCE --- LIB style LIB fill:#f44336,color:#fff style JSON fill:#2196f3,color:#fff style SCHEMA fill:#4caf50,color:#fff style CONFIDENCE fill:#ff9800,color:#fff