Skip to content

Commit

Permalink
Update Doc [skip CI]
Browse files Browse the repository at this point in the history
  • Loading branch information
zao111222333 committed Nov 18, 2024
1 parent c279124 commit 946c601
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 11 deletions.
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = ["development-tools"]

[package]
name = "liberty-db"
description = "`liberty` data structre"
description = "A fully defined liberty data structure, efficient parser & formatter"
include = ["/src", "/examples", "/docs/header.html", "README.md"]
version.workspace = true
edition.workspace = true
Expand Down Expand Up @@ -48,6 +48,7 @@ __test_runtime_assert = []
log = { version = "0.4", features = ["std", "serde"] }
simple_logger = "5.0"
serde = { version = "1.0", features = ["derive"] }
bson = "2.13.0"
serde_json = "1.0"
thiserror = "2.0"
strum = "0.26"
Expand Down Expand Up @@ -114,4 +115,5 @@ cfg-if.workspace = true
[dev-dependencies]
dev_utils.workspace = true
simple_logger.workspace = true
criterion.workspace = true
criterion.workspace = true
bson.workspace = true
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,21 @@ cargo bench --bench dev

## TODO

+ stream input
+ Linked Group
+ like IndexMap, only sort once and store
+ CI: only do comparsion after tag new version
+ CI: fast regression self in build.yml
+ Fix error when `make_golden`
+ `intrinsic_parasitic` group
+ `leakage_current` group
+ `dynamic_current` group
+ 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:
+ Linked Group
+ like IndexMap, only sort once and store
+ bitcode support
+ ~~user `define`~~
+ ~~remove `GroupWapper`, `ComplexWapper`, `SimpleWapper`. At leaset remove it in parser and formatter~~
+ ~~fix missing newline at endding~~
Expand Down
49 changes: 49 additions & 0 deletions src/library/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,52 @@ library (undefined) {
"#,
);
}

// #[test]
// fn serde() {
// use num_traits::Zero;
// let mut library = Library::default();
// library.comments_this_entry().or_insert("comment1".into());
// library
// .cell
// .entry("CELL1".into())
// .and_modify(|cell| cell.area = Some(NotNan::one()))
// .or_insert_with(|cell| cell.area = Some(NotNan::zero()));
// library
// .cell
// .entry("CELL2".into())
// .and_modify(|cell| cell.area = Some(NotNan::one()))
// .or_insert_with(|cell| cell.area = Some(NotNan::zero()));
// library
// .cell
// .entry("CELL2".into())
// .and_modify(|cell| cell.area = Some(NotNan::one()))
// .or_insert_with(|cell| cell.area = Some(NotNan::zero()));
// let want = r#"/* comment1 */
// library (undefined) {
// | technology (cmos);
// | delay_model : table_lookup;
// | time_unit : 1ns;
// | voltage_unit : 1V;
// | slew_upper_threshold_pct_rise : 80.0;
// | slew_lower_threshold_pct_rise : 20.0;
// | slew_derate_from_library : 1.0;
// | slew_lower_threshold_pct_fall : 20.0;
// | slew_upper_threshold_pct_fall : 80.0;
// | input_threshold_pct_fall : 50.0;
// | input_threshold_pct_rise : 50.0;
// | output_threshold_pct_rise : 50.0;
// | output_threshold_pct_fall : 50.0;
// | cell (CELL1) {
// | | area : 0.0;
// | }
// | cell (CELL2) {
// | | area : 1.0;
// | }
// }
// "#;
// fmt_cmp(&library, want);
// let serialized = bson::bson!(library).unwrap();
// println!("serialized = {}", serialized);
// fmt_cmp(&bson::from_bson(&serialized).unwrap(), want);
// }

0 comments on commit 946c601

Please sign in to comment.