fix some errors/typos and prep for refactoring
This commit is contained in:
parent
d5db622db3
commit
6abcd7ce32
4 changed files with 30 additions and 54 deletions
|
@ -6,8 +6,6 @@ use std::fs::File;
|
|||
|
||||
use fastwave_backend::*;
|
||||
|
||||
use num::{BigUint};
|
||||
|
||||
fn indented_print(indent : u8, name : &String) {
|
||||
for _ in 0..indent {print!(" |");}
|
||||
print!("---");
|
||||
|
@ -19,7 +17,15 @@ fn print_root_scope_tree(root_idx: ScopeIdx, vcd: &VCD, indent : u8) {
|
|||
} else {
|
||||
for child_scope_idx in vcd.child_scopes_by_idx(root_idx) {
|
||||
indented_print(indent, vcd.scope_name_by_idx(child_scope_idx));
|
||||
let ScopeIdx(idx) = child_scope_idx;
|
||||
// for signal_idx in vcd.get_children_signal_idxs(child_scope_idx) {
|
||||
// let signal = vcd.try_signal_idx_to_signal(signal_idx).unwrap();
|
||||
// match signal {
|
||||
// Signal::Data {..} => {}
|
||||
// Signal::Alias {..} => {}
|
||||
// }
|
||||
// // let to_print = format!("{},{}", signal.name(), )
|
||||
// }
|
||||
// vcd.try_signal_idx_to_signal(idx)
|
||||
print_root_scope_tree(child_scope_idx, vcd.clone(), indent + 1);
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +53,11 @@ fn main() -> std::io::Result<()> {
|
|||
ui_all_scopes(&vcd);
|
||||
|
||||
|
||||
// let state_signal = vcd.
|
||||
let file_path = "tests/vcd-files/amaranth/up_counter.vcd";
|
||||
let file = File::open(file_path)?;
|
||||
let vcd = parse_vcd(file).unwrap();
|
||||
// let state_signal = vcd.all_si
|
||||
// for signal_idx in vcd.si
|
||||
// let name = state_signal.name();
|
||||
// let time = BigUint::from(57760000u32);
|
||||
// let val = state_signal
|
||||
|
|
Reference in a new issue