39 #ifndef __DEV_ARM_GLOBAL_TIMER_HH__ 40 #define __DEV_ARM_GLOBAL_TIMER_HH__ 43 #include "params/A9GlobalTimer.hh" 126 std::string
name()
const {
return _name; }
149 return dynamic_cast<const Params *
>(
_params);
175 #endif // __DEV_ARM_GLOBAL_TIMER_HH__
void write(PacketPtr pkt, Addr daddr)
Handle write for a single timer.
BaseGic * gic
Pointer to the GIC for causing an interrupt.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
uint64_t getTimeCounterFromTicks(Tick ticks)
Convert a number of ticks into the time counter format.
A9GlobalTimer(Params *p)
The constructor for RealView just registers itself with the MMU.
EndBitUnion(UserDescFlags) struct UserDesc32
CTRL control
Control register as specified above.
EventWrapper< Timer, &Timer::counterAtCmpVal > cmpValEvent
Timer global_timer
Timer that does the actual work.
Timer(std::string __name, A9GlobalTimer *parent, int int_num)
void restartCounter()
Restart the counter ticking.
EndBitUnion(CTRL) protected A9GlobalTimer * parent
Pointer to parent class.
uint64_t Tick
Tick count type.
const uint32_t intNum
Number of interrupt to cause/clear.
BitUnion32(CTRL) Bitfield< 0 > enable
bool pendingInt
If an interrupt is currently pending.
uint64_t cmpVal
Value of the comparator.
void serialize(CheckpointOut &cp) const override
Serialize an object.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Bitfield< 3 > autoIncrement
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Basic support for object serialization.
void counterAtCmpVal()
Called when the counter reaches the comparator.
A9GlobalTimerParams Params
std::ostream CheckpointOut
const SimObjectParams * _params
Cached copy of the object parameters.
Bitfield< 7, 4 > reserved
void read(PacketPtr pkt, Addr daddr)
Handle read for a single timer.
bool rawInt
If timer has caused an interrupt.
const Params * params() const
Bitfield< 15, 8 > prescalar
uint32_t autoIncValue
Value to add to comparator when counter reaches comparator.