diff --git a/Cargo.toml b/Cargo.toml index 6996831..6b0390b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "fastwave" +name = "fastwave_backend" version = "0.1.0" edition = "2021" @@ -13,4 +13,4 @@ num = "0.4" clap = { version = "3.1.8", features = ["derive"] } chrono = "0.4" # TODO : remove itertools once date parser is reworked. -itertools = "0.10.3" \ No newline at end of file +itertools = "0.10.3" diff --git a/README.md b/README.md index d393385..7d44f3e 100644 --- a/README.md +++ b/README.md @@ -56,11 +56,11 @@ This repository comes with several smaller VCD files emitted from various EDA tools. If you want a larger VCD file, grab one from [here](https://drive.google.com/file/d/1pfm2qo2l8fGTHHJ8TLrg1vSGaV_TUbp2/view?usp=sharing). +Here are some examples you can run: The first build of the program may take some time. -``cargo run --release --example parse_vcd tests/vcd-files/aldec/SPI_Write.vcd`` - -You can also run the vcd example with: cargo run --release --example vcd1. +1. ``cargo run --release --example parse_vcd tests/vcd-files/aldec/SPI_Write.vcd`` +2. ``cargo run --release --example vcd`` You can run all the tests with ``cargo test`` diff --git a/examples/parse_vcd.rs b/examples/parse_vcd.rs index 6fbcc60..9833f3c 100644 --- a/examples/parse_vcd.rs +++ b/examples/parse_vcd.rs @@ -5,7 +5,7 @@ use clap::Parser; use std::fs::File; -use fastwave::*; +use fastwave_backend::*; use num::{BigUint}; diff --git a/examples/vcd.rs b/examples/vcd.rs index 1579729..659aebf 100644 --- a/examples/vcd.rs +++ b/examples/vcd.rs @@ -4,20 +4,18 @@ // the root of the folder containing the sources for this program. use std::fs::File; -use fastwave::*; +use fastwave_backend::*; use num::{BigUint}; fn indented_print(indent : u8, name : &String) { - for _ in 0..indent {print!(" ");} - print!(" |"); - print!(" "); + for _ in 0..indent {print!(" |");} + print!("---"); println!("{name}"); } fn print_root_scope_tree(root_idx: ScopeIdx, vcd: &VCD, indent : u8) { if vcd.child_scopes_by_idx(root_idx).is_empty() { - indented_print(indent, vcd.scope_name_by_idx(root_idx)); } else { for child_scope_idx in vcd.child_scopes_by_idx(root_idx) { indented_print(indent, vcd.scope_name_by_idx(child_scope_idx)); diff --git a/tests/integration_test.rs b/tests/integration_test.rs index b6fa3a2..78f4822 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -12,7 +12,7 @@ fn parse_all_VCDs() { // see if we can parse all signal trees successfully for file_name in FILES { let file = File::open(file_name).unwrap(); - let vcd = fastwave::parse_vcd(file); + let vcd = fastwave_backend::parse_vcd(file); if !vcd.is_ok() { dbg!(file_name);