Skip to content

Commit 3c461f2

Browse files
committed
stats
Signed-off-by: James Cherry <cherry@parallaxsw.com>
1 parent 7def9a2 commit 3c461f2

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

parasitics/SpefReader.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "SpefReader.hh"
1818

1919
#include "Zlib.hh"
20+
#include "Stats.hh"
2021
#include "Report.hh"
2122
#include "Debug.hh"
2223
#include "StringUtil.hh"
@@ -64,6 +65,7 @@ readSpefFile(const char *filename,
6465
// Use zlib to uncompress gzip'd files automagically.
6566
gzFile stream = gzopen(filename, "rb");
6667
if (stream) {
68+
Stats stats(sta->debug(), sta->report());
6769
SpefReader reader(filename, stream, instance, ap,
6870
pin_cap_included, keep_coupling_caps, coupling_cap_factor,
6971
reduce, corner, min_max, sta);
@@ -73,6 +75,7 @@ readSpefFile(const char *filename,
7375
success = (::SpefParse_parse() == 0);
7476
gzclose(stream);
7577
spef_reader = nullptr;
78+
stats.report("Read spef");
7679
}
7780
else
7881
throw FileNotReadable(filename);

power/Power.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <cmath> // abs
2121

2222
#include "cudd.h"
23+
#include "Stats.hh"
2324
#include "Debug.hh"
2425
#include "EnumNameMap.hh"
2526
#include "Hash.hh"
@@ -233,6 +234,7 @@ Power::power(const Corner *corner,
233234
pad.clear();
234235

235236
ensureActivities();
237+
Stats stats(debug_, report_);
236238
LeafInstanceIterator *inst_iter = network_->leafInstanceIterator();
237239
while (inst_iter->hasNext()) {
238240
Instance *inst = inst_iter->next();
@@ -255,6 +257,7 @@ Power::power(const Corner *corner,
255257
}
256258
}
257259
delete inst_iter;
260+
stats.report("Find power");
258261
}
259262

260263
bool
@@ -617,6 +620,7 @@ Power::ensureActivities()
617620
// No need to propagate activites if global activity is set.
618621
if (!global_activity_.isSet()) {
619622
if (!activities_valid_) {
623+
Stats stats(debug_, report_);
620624
// Clear existing activities.
621625
activity_map_.clear();
622626
seq_activity_map_.clear();
@@ -646,6 +650,7 @@ Power::ensureActivities()
646650
pass, visitor.maxChange());
647651
pass++;
648652
}
653+
stats.report("Find power activities");
649654
activities_valid_ = true;
650655
}
651656
}

power/VcdReader.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "VcdReader.hh"
2121

2222
#include "Zlib.hh"
23+
#include "Stats.hh"
2324
#include "Report.hh"
2425
#include "Error.hh"
2526
#include "StringUtil.hh"
@@ -79,6 +80,7 @@ VcdReader::read(const char *filename)
7980
vcd_ = &vcd;
8081
stream_ = gzopen(filename, "r");
8182
if (stream_) {
83+
Stats stats(debug_, report_);
8284
filename_ = filename;
8385
file_line_ = 1;
8486
stmt_line_ = 1;
@@ -113,6 +115,7 @@ VcdReader::read(const char *filename)
113115
token = getToken();
114116
}
115117
gzclose(stream_);
118+
stats.report("Read VCD");
116119
}
117120
else
118121
throw FileNotReadable(filename);

0 commit comments

Comments
 (0)