sim: clocked object: function for converting cycles to ticks.
authorNilay Vaish <nilay@cs.wisc.edu>
Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)
src/sim/clocked_object.hh

index e064d7a32ee14d67e28c2f9f2bca65376040905d..5a6e9a6c3dd06b79750f144ded06687b74706d90 100644 (file)
@@ -215,6 +215,8 @@ class Clocked
     inline Cycles ticksToCycles(Tick t) const
     { return Cycles(divCeil(t, clockPeriod())); }
 
+    inline Tick cyclesToTicks(Cycles c) const
+    { return clockPeriod() * c; }
 };
 
 /**