Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2022-10-26 14:59:51 -07:00
parent 612293f3bd
commit c2e15cd9ee
2 changed files with 20 additions and 15 deletions

View File

@ -22,7 +22,6 @@
#include "Report.hh" #include "Report.hh"
#include "StringUtil.hh" #include "StringUtil.hh"
#include "StaState.hh" #include "StaState.hh"
#include "Vcd.hh"
namespace sta { namespace sta {
@ -33,13 +32,6 @@ using std::isspace;
// Much better syntax definition // Much better syntax definition
// https://web.archive.org/web/20120323132708/http://www.beyondttl.com/vcd.php // https://web.archive.org/web/20120323132708/http://www.beyondttl.com/vcd.php
static void
reportWaveforms(Vcd &vcd,
Report *report);
////////////////////////////////////////////////////////////////
class VcdReader : public StaState class VcdReader : public StaState
{ {
public: public:
@ -69,14 +61,13 @@ private:
VcdScope scope_; VcdScope scope_;
}; };
void Vcd
reportVcdWaveforms(const char *filename, readVcdFile(const char *filename,
StaState *sta) StaState *sta)
{ {
VcdReader reader(sta); VcdReader reader(sta);
Vcd vcd = reader.read(filename); return reader.read(filename);
reportWaveforms(vcd, sta->report());
} }
Vcd 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 static void
reportWaveforms(Vcd &vcd, reportWaveforms(Vcd &vcd,

View File

@ -16,11 +16,13 @@
#pragma once #pragma once
#include "Vcd.hh"
namespace sta { namespace sta {
class StaState; class StaState;
void Vcd
readVcdFile(const char *filename, readVcdFile(const char *filename,
StaState *sta); StaState *sta);