41 #ifndef __DEV_ARM_LOCALTIMER_HH__ 42 #define __DEV_ARM_LOCALTIMER_HH__ 46 #include "params/CpuLocalTimer.hh" 141 std::string
name()
const {
return _name; }
166 return dynamic_cast<const Params *
>(
_params);
175 void init()
override;
196 #endif // __DEV_ARM_SP804_HH__ BitUnion32(TimerCtrl) Bitfield< 0 > enable
void read(PacketPtr pkt, Addr daddr)
Handle read for a single timer.
ArmInterruptPin * intWatchdog
void restartTimerCounter(uint32_t val)
Restart the counter ticking at val.
bool pendingIntTimer
If an interrupt is currently pending.
EndBitUnion(TimerCtrl) BitUnion32(WatchdogCtrl) Bitfield< 0 > enable
Timer(const std::string &name, CpuLocalTimer *_parent, ArmInterruptPin *int_timer, ArmInterruptPin *int_watchdog)
uint32_t timerLoadValue
Value to load into counters when periodic mode reaches 0.
const Params * params() const
EndBitUnion(WatchdogCtrl) protected CpuLocalTimer * parent
Pointer to parent class.
BaseGic * gic
Pointer to the GIC for causing an interrupt.
EventFunctionWrapper timerZeroEvent
void serialize(CheckpointOut &cp) const override
Serialize an object.
CpuLocalTimerParams Params
friend class CpuLocalTimer
ArmInterruptPin * intTimer
Interrupt to cause/clear.
std::vector< std::unique_ptr< Timer > > localTimer
Timers that do the actual work.
TimerCtrl timerControl
Control register as specified above.
uint64_t Tick
Tick count type.
void write(PacketPtr pkt, Addr daddr)
Handle write for a single timer.
EventFunctionWrapper watchdogZeroEvent
Bitfield< 15, 8 > prescalar
uint32_t watchdogLoadValue
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool rawIntTimer
If timer has caused an interrupt.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Basic support for object serialization.
Bitfield< 7, 3 > reserved
void restartWatchdogCounter(uint32_t val)
void timerAtZero()
Called when the counter reaches 0.
Bitfield< 3 > watchdogMode
void init() override
Inits the local timers.
Bitfield< 7, 4 > reserved
uint32_t watchdogDisableReg
std::ostream CheckpointOut
const SimObjectParams * _params
Cached copy of the object parameters.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Generic representation of an Arm interrupt pin.
WatchdogCtrl watchdogControl