Skip to content

Commit

Permalink
change file path names and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendumoulin committed Sep 30, 2024
1 parent ff1f8a3 commit 65e9553
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Generate csv files from a clocked vcd trace
Current limitations:
- Captures all signals in a fixed scope related to `gemmx`
- Assumes clock is `TOP.clk_i`
- requires file to be called `src/sim.vcd`
- outputs to a fixed `result.csv`
- requires file to be called `sim.vcd`
- outputs to a fixed `sim.csv`
- Does not support vector values, these are all set to 0, only scalar values are supported for now.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn parse_vcd_to_data(vcd_file: &str) -> Result<(), Box<dyn std::error::Error>> {
}

// Prepare CSV writer
let mut wtr = csv::Writer::from_path("result.csv")?;
let mut wtr = csv::Writer::from_path("sim.csv")?;

// Write headers (variable names)
let mut headers: Vec<String> = Vec::new();
Expand Down Expand Up @@ -94,7 +94,7 @@ fn parse_vcd_to_data(vcd_file: &str) -> Result<(), Box<dyn std::error::Error>> {
}

fn main() {
if let Err(e) = parse_vcd_to_data("src/sim.vcd") {
if let Err(e) = parse_vcd_to_data("sim.vcd") {
eprintln!("Error parsing VCD file: {}", e);
}
}

0 comments on commit 65e9553

Please sign in to comment.