sim: correct ticksToCycles() function.
authorNilay Vaish <nilay@cs.wisc.edu>
Tue, 26 Nov 2013 23:05:22 +0000 (17:05 -0600)
committerNilay Vaish <nilay@cs.wisc.edu>
Tue, 26 Nov 2013 23:05:22 +0000 (17:05 -0600)
src/sim/clocked_object.hh

index c959c5c04a39c9c175108b79ec04d7d3114cde5a..304397a3873ac71431bca272973ab56f6812f0a3 100644 (file)
@@ -192,7 +192,7 @@ class ClockedObject : public SimObject
     }
 
     inline Cycles ticksToCycles(Tick t) const
-    { return Cycles(t / clockPeriod()); }
+    { return Cycles(divCeil(t, clockPeriod())); }
 
 };