Skip to content

Commit

Permalink
Fix VCD timestamps.
Browse files Browse the repository at this point in the history
VCD simulation timestamps are integers.
eb71c31 changed them to doubles which
causes the files to be unreadable.
  • Loading branch information
mx-shift committed Jun 20, 2024
1 parent 59d4760 commit 1e3ed3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/scsimon/sm_vcd_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void scsimon_generate_value_change_dump(const string &filename, const vector<sha
<< "$end" << endl;

for (shared_ptr<DataSample> cur_sample : data_capture_array) {
vcd_ofstream << "#" << (double)cur_sample->GetTimestamp() * ScsiMon::ns_per_loop << endl;
vcd_ofstream << "#" << (uint64_t)((double)cur_sample->GetTimestamp() * ScsiMon::ns_per_loop) << endl;
vcd_output_if_changed_bool(vcd_ofstream, cur_sample->GetBSY(), PIN_BSY, SYMBOL_PIN_BSY);
vcd_output_if_changed_bool(vcd_ofstream, cur_sample->GetSEL(), PIN_SEL, SYMBOL_PIN_SEL);
vcd_output_if_changed_bool(vcd_ofstream, cur_sample->GetCD(), PIN_CD, SYMBOL_PIN_CD);
Expand Down

0 comments on commit 1e3ed3b

Please sign in to comment.