ticked_object.cc (11800:54436a1784dc) ticked_object.cc (12113:bdf1545c9919)
1/*
1/*
2 * Copyright (c) 2013-2014 ARM Limited
2 * Copyright (c) 2013-2014, 2017 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

55 *numCyclesLocal))
56{ }
57
58void
59Ticked::regStats()
60{
61 if (numCyclesLocal) {
62 numCycles
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

55 *numCyclesLocal))
56{ }
57
58void
59Ticked::regStats()
60{
61 if (numCyclesLocal) {
62 numCycles
63 .name(object.name() + ".tickCycles")
63 .name(object.name() + ".totalTickCycles")
64 .desc("Number of cycles that the object ticked or was stopped");
65 }
66
67 tickCycles
68 .name(object.name() + ".tickCycles")
69 .desc("Number of cycles that the object actually ticked");
70
71 idleCycles

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

93 * checkpointed object but not this one.
94 * An example would be a CPU model using Ticked restores from a
95 * simple CPU without without Ticked */
96 optParamIn(cp, "lastStopped", lastStoppedUint);
97
98 lastStopped = Cycles(lastStoppedUint);
99}
100
64 .desc("Number of cycles that the object ticked or was stopped");
65 }
66
67 tickCycles
68 .name(object.name() + ".tickCycles")
69 .desc("Number of cycles that the object actually ticked");
70
71 idleCycles

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

93 * checkpointed object but not this one.
94 * An example would be a CPU model using Ticked restores from a
95 * simple CPU without without Ticked */
96 optParamIn(cp, "lastStopped", lastStoppedUint);
97
98 lastStopped = Cycles(lastStoppedUint);
99}
100
101TickedObject::TickedObject(TickedObjectParams *params,
101TickedObject::TickedObject(const TickedObjectParams *params,
102 Event::Priority priority) :
103 ClockedObject(params),
104 /* Make numCycles in Ticked */
105 Ticked(*this, NULL, priority)
106{ }
107
108void
109TickedObject::regStats()
110{
111 Ticked::regStats();
102 Event::Priority priority) :
103 ClockedObject(params),
104 /* Make numCycles in Ticked */
105 Ticked(*this, NULL, priority)
106{ }
107
108void
109TickedObject::regStats()
110{
111 Ticked::regStats();
112 ClockedObject::regStats();
112}
113
114void
115TickedObject::serialize(CheckpointOut &cp) const
116{
117 Ticked::serialize(cp);
118 ClockedObject::serialize(cp);
119}
120void
121TickedObject::unserialize(CheckpointIn &cp)
122{
123 Ticked::unserialize(cp);
124 ClockedObject::unserialize(cp);
125}
113}
114
115void
116TickedObject::serialize(CheckpointOut &cp) const
117{
118 Ticked::serialize(cp);
119 ClockedObject::serialize(cp);
120}
121void
122TickedObject::unserialize(CheckpointIn &cp)
123{
124 Ticked::unserialize(cp);
125 ClockedObject::unserialize(cp);
126}