summaryrefslogtreecommitdiff
path: root/lib/Kratos/DFADriver.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kratos/DFADriver.pm')
-rw-r--r--lib/Kratos/DFADriver.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index 466cf64..b59dec1 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -192,6 +192,17 @@ sub printf_aggr {
}
}
+sub printf_counter_status {
+ my ($self, $hash, $key) = @_;
+
+ $hash = $hash->{$key};
+
+ if (2 ** 32 / $hash->{median} < 10e6) {
+ printf(" %s: 32bit energy counter will overflow after %.f ms\n",
+ 'power', (2 ** 32 / $hash->{median}) / 1000);
+ }
+}
+
sub printf_aggr_tex {
my ( $self, $hash, $key, $unit, $divisor) = @_;
@@ -481,6 +492,7 @@ sub assess_model {
$self->printf_clip($state);
$self->printf_aggr( $state, 'power', 'µW' );
+ $self->printf_counter_status( $state, 'power' );
$self->printf_parameterized( $state, 'power' );
$self->printf_fit( $state, 'power', 'µW' );
}