liberty-db 0.6.1

`liberty` data structre
Documentation

liberty-db

pipeline pipeline License liberty-db liberty-macros Docs

Highlight Features

  • All liberty datastructure supported, reference to Liberty Version R-2020.09, September 2020
  • Parser & formatter are implemented by static macros, providing a decent preformance and tiny ~2MB parser & formatter binary
  • Well defined document
  • Support define define_group user-defined attributes
  • Verified with library-complier

Usage

This library is implemented in Rust, get start here.

[dependencies]
liberty_db = "0.6"

See more in document

Examples

The examples are in ./examples, you can run them with commands:

# example0
cargo run --package example0_parse_fmt
# example1
cargo run --package example1_parse_fmt_file -- tests/tech/cases/ocv.lib
# example2
cargo run --package example2_prune_lib -- tests/tech/cases/ocv.lib

Test

cargo test
cargo test --package liberty-tests --test tests

Testbench

cargo test --package liberty-tests --lib -- parser_bench::test_all_lib_files --exact --nocapture 
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

TODO List

  • intrinsic_parasitic group
  • leakage_current group
  • dynamic_current group
  • use PDFJS
  • stream input
  • Linked Group
  • user define
  • remove GroupWapper, ComplexWapper, SimpleWapper. At leaset remove it in parser and formatter
  • fix missing newline at endding
  • recursive parse boolean expression
  • macros
  • format to liberty
  • support multi-line \
  • support comment
  • Use MutSet to store GroupMap