clocked_object.hh (9793:6e6cefc1db1f) clocked_object.hh (9987:7efa5d115a4e)
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 178 unchanged lines hidden (view full) ---

187 }
188
189 inline Tick clockPeriod() const
190 {
191 return clockDomain.clockPeriod();
192 }
193
194 inline Cycles ticksToCycles(Tick t) const
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 178 unchanged lines hidden (view full) ---

187 }
188
189 inline Tick clockPeriod() const
190 {
191 return clockDomain.clockPeriod();
192 }
193
194 inline Cycles ticksToCycles(Tick t) const
195 { return Cycles(t / clockPeriod()); }
195 { return Cycles(divCeil(t, clockPeriod())); }
196
197};
198
199#endif //__SIM_CLOCKED_OBJECT_HH__
196
197};
198
199#endif //__SIM_CLOCKED_OBJECT_HH__