gem5
v20.1.0.0
|
#include <timer_a9global.hh>
Public Types | |
enum | { CounterRegLow32 = 0x00, CounterRegHigh32 = 0x04, ControlReg = 0x08, IntStatusReg = 0x0C, CmpValRegLow32 = 0x10, CmpValRegHigh32 = 0x14, AutoIncrementReg = 0x18, Size = 0x1C } |
Public Member Functions | |
BitUnion32 (CTRL) Bitfield< 0 > enable | |
void | counterAtCmpVal () |
Called when the counter reaches the comparator. More... | |
void | restartCounter () |
Restart the counter ticking. More... | |
uint64_t | getTimeCounterFromTicks (Tick ticks) |
Convert a number of ticks into the time counter format. More... | |
Timer (std::string __name, A9GlobalTimer *parent, int int_num) | |
std::string | name () const |
void | read (PacketPtr pkt, Addr daddr) |
Handle read for a single timer. More... | |
void | write (PacketPtr pkt, Addr daddr) |
Handle write for a single timer. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
Bitfield< 1 > | cmpEnable |
Bitfield< 2 > | intEnable |
Bitfield< 3 > | autoIncrement |
Bitfield< 7, 4 > | reserved |
Bitfield< 15, 8 > | prescalar |
EndBitUnion(CTRL) protected A9GlobalTimer * | parent |
Pointer to parent class. More... | |
const uint32_t | intNum |
Number of interrupt to cause/clear. More... | |
CTRL | control |
Control register as specified above. More... | |
bool | rawInt |
If timer has caused an interrupt. More... | |
bool | pendingInt |
If an interrupt is currently pending. More... | |
uint64_t | cmpVal |
Value of the comparator. More... | |
uint32_t | autoIncValue |
Value to add to comparator when counter reaches comparator. More... | |
EventWrapper< Timer, &Timer::counterAtCmpVal > | cmpValEvent |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
Definition at line 55 of file timer_a9global.hh.
anonymous enum |
Enumerator | |
---|---|
CounterRegLow32 | |
CounterRegHigh32 | |
ControlReg | |
IntStatusReg | |
CmpValRegLow32 | |
CmpValRegHigh32 | |
AutoIncrementReg | |
Size |
Definition at line 62 of file timer_a9global.hh.
A9GlobalTimer::Timer::Timer | ( | std::string | __name, |
A9GlobalTimer * | parent, | ||
int | int_num | ||
) |
Definition at line 55 of file timer_a9global.cc.
A9GlobalTimer::Timer::BitUnion32 | ( | CTRL | ) |
void A9GlobalTimer::Timer::counterAtCmpVal | ( | ) |
Called when the counter reaches the comparator.
Definition at line 230 of file timer_a9global.cc.
References DPRINTF.
uint64_t A9GlobalTimer::Timer::getTimeCounterFromTicks | ( | Tick | ticks | ) |
Convert a number of ticks into the time counter format.
ticks | number of ticks |
Definition at line 79 of file timer_a9global.cc.
|
inline |
Definition at line 126 of file timer_a9global.hh.
Handle read for a single timer.
Definition at line 85 of file timer_a9global.cc.
References curTick(), DPRINTF, Packet::getLE(), panic, prescalar, and Packet::setLE().
Referenced by A9GlobalTimer::read().
void A9GlobalTimer::Timer::restartCounter | ( | ) |
Restart the counter ticking.
Definition at line 209 of file timer_a9global.cc.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 254 of file timer_a9global.cc.
References DPRINTF, and SERIALIZE_SCALAR.
Referenced by A9GlobalTimer::serialize().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 277 of file timer_a9global.cc.
References DPRINTF, and UNSERIALIZE_SCALAR.
Referenced by A9GlobalTimer::unserialize().
Handle write for a single timer.
Definition at line 162 of file timer_a9global.cc.
References DPRINTF, Packet::getLE(), panic, and ULL.
Referenced by A9GlobalTimer::write().
Bitfield<3> A9GlobalTimer::Timer::autoIncrement |
Definition at line 78 of file timer_a9global.hh.
uint32_t A9GlobalTimer::Timer::autoIncValue |
Value to add to comparator when counter reaches comparator.
Definition at line 110 of file timer_a9global.hh.
Bitfield<1> A9GlobalTimer::Timer::cmpEnable |
Definition at line 76 of file timer_a9global.hh.
uint64_t A9GlobalTimer::Timer::cmpVal |
Value of the comparator.
Definition at line 106 of file timer_a9global.hh.
EventWrapper<Timer, &Timer::counterAtCmpVal> A9GlobalTimer::Timer::cmpValEvent |
Definition at line 114 of file timer_a9global.hh.
CTRL A9GlobalTimer::Timer::control |
Control register as specified above.
Definition at line 94 of file timer_a9global.hh.
Bitfield<2> A9GlobalTimer::Timer::intEnable |
Definition at line 77 of file timer_a9global.hh.
const uint32_t A9GlobalTimer::Timer::intNum |
Number of interrupt to cause/clear.
Definition at line 90 of file timer_a9global.hh.
EndBitUnion (CTRL) protected A9GlobalTimer* A9GlobalTimer::Timer::parent |
Pointer to parent class.
Definition at line 81 of file timer_a9global.hh.
bool A9GlobalTimer::Timer::pendingInt |
If an interrupt is currently pending.
Logical and of CTRL.intEnable and rawInt
Definition at line 103 of file timer_a9global.hh.
Bitfield<15,8> A9GlobalTimer::Timer::prescalar |
Definition at line 80 of file timer_a9global.hh.
Referenced by read().
bool A9GlobalTimer::Timer::rawInt |
If timer has caused an interrupt.
This is irrespective of interrupt enable
Definition at line 99 of file timer_a9global.hh.
Bitfield<7,4> A9GlobalTimer::Timer::reserved |
Definition at line 79 of file timer_a9global.hh.