50 releases (6 breaking)

0.7.4 Dec 3, 2024
0.7.3 Nov 28, 2024
0.6.14 Nov 13, 2024
0.4.11 Jul 30, 2024
0.1.0 Feb 27, 2023

#2620 in Development tools

Download history 1293/week @ 2024-08-26 160/week @ 2024-09-02 441/week @ 2024-09-09 215/week @ 2024-09-16 59/week @ 2024-09-23 31/week @ 2024-09-30 3/week @ 2024-10-07 6/week @ 2024-10-14 428/week @ 2024-11-04 1176/week @ 2024-11-11 176/week @ 2024-11-18 115/week @ 2024-11-25 149/week @ 2024-12-02 518/week @ 2024-12-09

1,167 downloads per month
Used in liberty-db

MIT license

47KB
1K SLoC

liberty-db

pipeline pipeline License liberty-db Docs Benchmark codecov

Highlight Features

Usage

This library is implemented in Rust, with document.

[dependencies]
liberty_db = "0.7"

You can run examples with commands:

# example0
cargo run --example 0_parse_fmt
# example1
cargo run --example 1_parse_fmt_file -- dev/tech/cases/ocv.lib
# example2
cargo run --example 2_prune_lib -- dev/tech/cases/ocv.lib

Benchmark

Basic information as follow, see latest benchmark summary.

Project Comparison

ProjectLangVersionType SupportBoolean
Expression
Comment
AllPartlyAST only
liberty-dbrustlatestcurrent version
si2dr_libertyC1.0Synopsys's version at 2005, many attributes are not supported
OpenTimerC++172STA tool's liberty component
liberty-iorust0.0.4
libertyparserust0.3.0
liberty2jsonrust0.1.0

Self Regression

ProjectLangVersionType SupportBoolean
Expression
Comment
AllPartlyAST only
liberty-dbrustlatestcurrent version
liberty-dbrust0.6.3published at 2024-09-07
liberty-dbrust0.5.9published at 2024-08-27
liberty-dbrust0.4.13published at 2024-08-13
liberty-dbrust0.3.1published at 2023-08-03

Dev

Run unit-test and regression.

cargo test
cargo test --package dev

Run benchmark, it will takes 5h.

cargo bench --bench dev

TODO

  • Reconstruction:

    • parser to GroupBuilder, e.g., use Vec to store GroupSet, no comment attribute
    • build/link GroupBuilder to Group, providing parent's scope, e.g.
      • all Pin name set to build BDD
      • supper group like timing::TimingTableLookUp
      • check all rules
  • Parse:

    • Only Vec<NotNan<f64>> and Value complex attributes need quotes vector, use fast_float2::parse_partial
    • Fix error when make_golden
      • intrinsic_parasitic group
      • leakage_current group
      • dynamic_current group
    • async
    • stream input
  • CI:

    • only do comparsion after tag new version
    • fast regression self in build.yml
  • Other:

    • BDD use ArcStr
    • Linked Group
    • like IndexMap, only sort once and store
    • bitcode support
  • Finished

    • 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

Dependencies

~270–710KB
~16K SLoC