diff options
Diffstat (limited to 'src/sim/clock_domain.cc')
-rw-r--r-- | src/sim/clock_domain.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sim/clock_domain.cc b/src/sim/clock_domain.cc index ff96f2808..0d1836e83 100644 --- a/src/sim/clock_domain.cc +++ b/src/sim/clock_domain.cc @@ -49,6 +49,20 @@ #include "sim/voltage_domain.hh" #include "sim/clocked_object.hh" +void +ClockDomain::regStats() +{ + using namespace Stats; + + // Expose the current clock period as a stat for observability in + // the dumps + currentClock + .scalar(_clockPeriod) + .name(params()->name + ".clock") + .desc("Clock period in ticks") + ; +} + double ClockDomain::voltage() const { |