|
gem5
v22.0.0.2
|
#include <timer_cpulocal.hh>
Public Types | |
| enum | { TimerLoadReg = 0x00, TimerCounterReg = 0x04, TimerControlReg = 0x08, TimerIntStatusReg = 0x0C, WatchdogLoadReg = 0x20, WatchdogCounterReg = 0x24, WatchdogControlReg = 0x28, WatchdogIntStatusReg = 0x2C, WatchdogResetStatusReg = 0x30, WatchdogDisableReg = 0x34, Size = 0x38 } |
Public Member Functions | |
| BitUnion32 (TimerCtrl) Bitfield< 0 > enable | |
| EndBitUnion (TimerCtrl) BitUnion32(WatchdogCtrl) Bitfield< 0 > enable | |
| void | timerAtZero () |
| Called when the counter reaches 0. More... | |
| void | watchdogAtZero () |
| void | restartTimerCounter (uint32_t val) |
| Restart the counter ticking at val. More... | |
| void | restartWatchdogCounter (uint32_t val) |
| Timer (const std::string &name, CpuLocalTimer *_parent, ArmInterruptPin *int_timer, ArmInterruptPin *int_watchdog) | |
| 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 gem5::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 > | autoReload |
| Bitfield< 2 > | intEnable |
| Bitfield< 7, 3 > | reserved |
| Bitfield< 15, 8 > | prescalar |
| Bitfield< 3 > | watchdogMode |
| Bitfield< 7, 4 > | reserved |
| EndBitUnion(WatchdogCtrl) protected CpuLocalTimer * | parent |
| Pointer to parent class. More... | |
| ArmInterruptPin * | intTimer |
| Interrupt to cause/clear. More... | |
| ArmInterruptPin * | intWatchdog |
| TimerCtrl | timerControl |
| Control register as specified above. More... | |
| WatchdogCtrl | watchdogControl |
| bool | rawIntTimer |
| If timer has caused an interrupt. More... | |
| bool | rawIntWatchdog |
| bool | rawResetWatchdog |
| uint32_t | watchdogDisableReg |
| bool | pendingIntTimer |
| If an interrupt is currently pending. More... | |
| bool | pendingIntWatchdog |
| uint32_t | timerLoadValue |
| Value to load into counters when periodic mode reaches 0. More... | |
| uint32_t | watchdogLoadValue |
| EventFunctionWrapper | timerZeroEvent |
| EventFunctionWrapper | watchdogZeroEvent |
Friends | |
| class | CpuLocalTimer |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
| static const std::string & | currentSection () |
| Gets the fully-qualified name of the active section. More... | |
| static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
| Generate a checkpoint file so that the serialization can be routed to it. More... | |
Definition at line 65 of file timer_cpulocal.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| TimerLoadReg | |
| TimerCounterReg | |
| TimerControlReg | |
| TimerIntStatusReg | |
| WatchdogLoadReg | |
| WatchdogCounterReg | |
| WatchdogControlReg | |
| WatchdogIntStatusReg | |
| WatchdogResetStatusReg | |
| WatchdogDisableReg | |
| Size | |
Definition at line 69 of file timer_cpulocal.hh.
| gem5::CpuLocalTimer::Timer::Timer | ( | const std::string & | name, |
| CpuLocalTimer * | _parent, | ||
| ArmInterruptPin * | int_timer, | ||
| ArmInterruptPin * | int_watchdog | ||
| ) |
Definition at line 79 of file timer_cpulocal.cc.
References timerAtZero().
| gem5::CpuLocalTimer::Timer::BitUnion32 | ( | TimerCtrl | ) |
| gem5::CpuLocalTimer::Timer::EndBitUnion | ( | TimerCtrl | ) |
|
inline |
Definition at line 148 of file timer_cpulocal.hh.
References gem5::Named::_name.
Handle read for a single timer.
Definition at line 115 of file timer_cpulocal.cc.
References gem5::curTick(), DPRINTF, panic, prescalar, and gem5::Packet::setLE().
| void gem5::CpuLocalTimer::Timer::restartTimerCounter | ( | uint32_t | val | ) |
Restart the counter ticking at val.
| val | the value to start at |
Definition at line 268 of file timer_cpulocal.cc.
References gem5::curTick(), DPRINTF, and gem5::X86ISA::val.
| void gem5::CpuLocalTimer::Timer::restartWatchdogCounter | ( | uint32_t | val | ) |
Definition at line 286 of file timer_cpulocal.cc.
References gem5::curTick(), DPRINTF, and gem5::X86ISA::val.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 359 of file timer_cpulocal.cc.
References DPRINTF, and SERIALIZE_SCALAR.
| void gem5::CpuLocalTimer::Timer::timerAtZero | ( | ) |
Called when the counter reaches 0.
Definition at line 305 of file timer_cpulocal.cc.
References DPRINTF.
Referenced by Timer().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 395 of file timer_cpulocal.cc.
References DPRINTF, and UNSERIALIZE_SCALAR.
| void gem5::CpuLocalTimer::Timer::watchdogAtZero | ( | ) |
Definition at line 328 of file timer_cpulocal.cc.
Handle write for a single timer.
Definition at line 191 of file timer_cpulocal.cc.
References DPRINTF, gem5::Packet::getLE(), and panic.
|
friend |
Definition at line 159 of file timer_cpulocal.hh.
| Bitfield< 1 > gem5::CpuLocalTimer::Timer::autoReload |
Definition at line 86 of file timer_cpulocal.hh.
| Bitfield< 2 > gem5::CpuLocalTimer::Timer::intEnable |
Definition at line 87 of file timer_cpulocal.hh.
| ArmInterruptPin* gem5::CpuLocalTimer::Timer::intTimer |
Interrupt to cause/clear.
Definition at line 108 of file timer_cpulocal.hh.
| ArmInterruptPin* gem5::CpuLocalTimer::Timer::intWatchdog |
Definition at line 109 of file timer_cpulocal.hh.
| EndBitUnion (WatchdogCtrl) protected CpuLocalTimer* gem5::CpuLocalTimer::Timer::parent |
Pointer to parent class.
Definition at line 99 of file timer_cpulocal.hh.
| bool gem5::CpuLocalTimer::Timer::pendingIntTimer |
If an interrupt is currently pending.
Logical and of Timer or Watchdog Ctrl.enable and rawIntTimer or rawIntWatchdog
Definition at line 124 of file timer_cpulocal.hh.
| bool gem5::CpuLocalTimer::Timer::pendingIntWatchdog |
Definition at line 125 of file timer_cpulocal.hh.
| Bitfield< 15, 8 > gem5::CpuLocalTimer::Timer::prescalar |
Definition at line 89 of file timer_cpulocal.hh.
Referenced by read().
| bool gem5::CpuLocalTimer::Timer::rawIntTimer |
If timer has caused an interrupt.
This is irrespective of interrupt enable
Definition at line 117 of file timer_cpulocal.hh.
| bool gem5::CpuLocalTimer::Timer::rawIntWatchdog |
Definition at line 118 of file timer_cpulocal.hh.
| bool gem5::CpuLocalTimer::Timer::rawResetWatchdog |
Definition at line 119 of file timer_cpulocal.hh.
| Bitfield<7,3> gem5::CpuLocalTimer::Timer::reserved |
Definition at line 88 of file timer_cpulocal.hh.
| Bitfield<7,4> gem5::CpuLocalTimer::Timer::reserved |
Definition at line 97 of file timer_cpulocal.hh.
| TimerCtrl gem5::CpuLocalTimer::Timer::timerControl |
Control register as specified above.
Definition at line 112 of file timer_cpulocal.hh.
| uint32_t gem5::CpuLocalTimer::Timer::timerLoadValue |
Value to load into counters when periodic mode reaches 0.
Definition at line 128 of file timer_cpulocal.hh.
| EventFunctionWrapper gem5::CpuLocalTimer::Timer::timerZeroEvent |
Definition at line 133 of file timer_cpulocal.hh.
| WatchdogCtrl gem5::CpuLocalTimer::Timer::watchdogControl |
Definition at line 113 of file timer_cpulocal.hh.
| uint32_t gem5::CpuLocalTimer::Timer::watchdogDisableReg |
Definition at line 120 of file timer_cpulocal.hh.
| uint32_t gem5::CpuLocalTimer::Timer::watchdogLoadValue |
Definition at line 129 of file timer_cpulocal.hh.
| Bitfield<3> gem5::CpuLocalTimer::Timer::watchdogMode |
Definition at line 96 of file timer_cpulocal.hh.
| EventFunctionWrapper gem5::CpuLocalTimer::Timer::watchdogZeroEvent |
Definition at line 136 of file timer_cpulocal.hh.