diff --git a/search/VcdReader.cc b/search/VcdReader.cc index 5347ba0c..33411f25 100644 --- a/search/VcdReader.cc +++ b/search/VcdReader.cc @@ -22,7 +22,6 @@ #include "Report.hh" #include "StringUtil.hh" #include "StaState.hh" -#include "Vcd.hh" namespace sta { @@ -33,13 +32,6 @@ using std::isspace; // Much better syntax definition // https://web.archive.org/web/20120323132708/http://www.beyondttl.com/vcd.php - -static void -reportWaveforms(Vcd &vcd, - Report *report); - -//////////////////////////////////////////////////////////////// - class VcdReader : public StaState { public: @@ -69,14 +61,13 @@ private: VcdScope scope_; }; -void -reportVcdWaveforms(const char *filename, - StaState *sta) +Vcd +readVcdFile(const char *filename, + StaState *sta) { VcdReader reader(sta); - Vcd vcd = reader.read(filename); - reportWaveforms(vcd, sta->report()); + return reader.read(filename); } Vcd @@ -330,7 +321,19 @@ VcdReader::getToken() //////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// +static void +reportWaveforms(Vcd &vcd, + Report *report); + +void +reportVcdWaveforms(const char *filename, + StaState *sta) + +{ + VcdReader reader(sta); + Vcd vcd = reader.read(filename); + reportWaveforms(vcd, sta->report()); +} static void reportWaveforms(Vcd &vcd, diff --git a/search/VcdReader.hh b/search/VcdReader.hh index a03a03eb..d20c1017 100644 --- a/search/VcdReader.hh +++ b/search/VcdReader.hh @@ -16,11 +16,13 @@ #pragma once +#include "Vcd.hh" + namespace sta { class StaState; -void +Vcd readVcdFile(const char *filename, StaState *sta);