From c58bee829f88e7360b631771852efa097388a5da Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 11 Aug 2015 11:39:23 -0500 Subject: [PATCH] sim: clocked object: function for converting cycles to ticks. --- src/sim/clocked_object.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sim/clocked_object.hh b/src/sim/clocked_object.hh index e064d7a32..5a6e9a6c3 100644 --- a/src/sim/clocked_object.hh +++ b/src/sim/clocked_object.hh @@ -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; } }; /** -- 2.30.2