projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21f8242
)
sim: Add voltage() function to clocked_object
author
David Guillen Fandos
<david.guillen@arm.com>
Wed, 17 Jun 2015 15:49:40 +0000
(16:49 +0100)
committer
David Guillen Fandos
<david.guillen@arm.com>
Wed, 17 Jun 2015 15:49:40 +0000
(16:49 +0100)
Adding voltage function which returns the current voltage
for a given clocked object. It's handy for power models and
similar stuff that need to retrieve voltage. Function
frequency() is already there, so I see no reason for not having
this one too.
src/sim/clocked_object.hh
patch
|
blob
|
history
diff --git
a/src/sim/clocked_object.hh
b/src/sim/clocked_object.hh
index 5a6e9a6c3dd06b79750f144ded06687b74706d90..b9a2481ec3ae6a3ae1eab6129bfa9f6baa31ef67 100644
(file)
--- a/
src/sim/clocked_object.hh
+++ b/
src/sim/clocked_object.hh
@@
-212,6
+212,11
@@
class Clocked
return clockDomain.clockPeriod();
}
+ inline double voltage() const
+ {
+ return clockDomain.voltage();
+ }
+
inline Cycles ticksToCycles(Tick t) const
{ return Cycles(divCeil(t, clockPeriod())); }