Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Nov 10, 2023
1 parent ad00062 commit 6b2c728
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion tests/diff_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use waveform::{Hierarchy, HierarchyItem, ScopeType, SignalRef, TimescaleUnit, Va

fn run_diff_test(vcd_filename: &str, fst_filename: &str) {
{
let wave = waveform::vcd::read(vcd_filename).expect("Failed to load VCD");
let wave = waveform::vcd::read_single_thread(vcd_filename).expect("Failed to load VCD");
diff_test_one(vcd_filename, wave);
}
{
Expand Down Expand Up @@ -362,6 +362,29 @@ fn diff_my_hdl_sigmoid_tb() {
);
}

#[test]
fn diff_my_hdl_simple_memory() {
run_diff_test(
"inputs/my-hdl/Simple_Memory.vcd",
"inputs/my-hdl/Simple_Memory.vcd.fst",
);
}

#[test]
#[ignore] // TODO: this file has a delta cycle, i.e. the same signal (`@`) changes several times in the same cycle (20)
fn diff_my_hdl_top() {
run_diff_test("inputs/my-hdl/top.vcd", "inputs/my-hdl/top.vcd.fst");
}

#[test]
#[ignore] // TODO: add full real support
fn diff_ncsim_ffdiv_32bit_tb() {
run_diff_test(
"inputs/ncsim/ffdiv_32bit_tb.vcd",
"inputs/ncsim/ffdiv_32bit_tb.vcd.fst",
);
}

#[test]
fn diff_treadle_gcd() {
run_diff_test("inputs/treadle/GCD.vcd", "inputs/treadle/GCD.vcd.fst");
Expand Down

0 comments on commit 6b2c728

Please sign in to comment.