Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2024-11-20 13:11:10 -08:00
parent 7def9a256e
commit 3c461f2d35
3 changed files with 11 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include "SpefReader.hh"
#include "Zlib.hh"
#include "Stats.hh"
#include "Report.hh"
#include "Debug.hh"
#include "StringUtil.hh"
@ -64,6 +65,7 @@ readSpefFile(const char *filename,
// Use zlib to uncompress gzip'd files automagically.
gzFile stream = gzopen(filename, "rb");
if (stream) {
Stats stats(sta->debug(), sta->report());
SpefReader reader(filename, stream, instance, ap,
pin_cap_included, keep_coupling_caps, coupling_cap_factor,
reduce, corner, min_max, sta);
@ -73,6 +75,7 @@ readSpefFile(const char *filename,
success = (::SpefParse_parse() == 0);
gzclose(stream);
spef_reader = nullptr;
stats.report("Read spef");
}
else
throw FileNotReadable(filename);

View File

@ -20,6 +20,7 @@
#include <cmath> // abs
#include "cudd.h"
#include "Stats.hh"
#include "Debug.hh"
#include "EnumNameMap.hh"
#include "Hash.hh"
@ -233,6 +234,7 @@ Power::power(const Corner *corner,
pad.clear();
ensureActivities();
Stats stats(debug_, report_);
LeafInstanceIterator *inst_iter = network_->leafInstanceIterator();
while (inst_iter->hasNext()) {
Instance *inst = inst_iter->next();
@ -255,6 +257,7 @@ Power::power(const Corner *corner,
}
}
delete inst_iter;
stats.report("Find power");
}
bool
@ -617,6 +620,7 @@ Power::ensureActivities()
// No need to propagate activites if global activity is set.
if (!global_activity_.isSet()) {
if (!activities_valid_) {
Stats stats(debug_, report_);
// Clear existing activities.
activity_map_.clear();
seq_activity_map_.clear();
@ -646,6 +650,7 @@ Power::ensureActivities()
pass, visitor.maxChange());
pass++;
}
stats.report("Find power activities");
activities_valid_ = true;
}
}

View File

@ -20,6 +20,7 @@
#include "VcdReader.hh"
#include "Zlib.hh"
#include "Stats.hh"
#include "Report.hh"
#include "Error.hh"
#include "StringUtil.hh"
@ -79,6 +80,7 @@ VcdReader::read(const char *filename)
vcd_ = &vcd;
stream_ = gzopen(filename, "r");
if (stream_) {
Stats stats(debug_, report_);
filename_ = filename;
file_line_ = 1;
stmt_line_ = 1;
@ -113,6 +115,7 @@ VcdReader::read(const char *filename)
token = getToken();
}
gzclose(stream_);
stats.report("Read VCD");
}
else
throw FileNotReadable(filename);