|
gem5
v22.0.0.2
|
#include <timer_sp804.hh>
Public Types | |
| enum | { LoadReg = 0x00, CurrentReg = 0x04, ControlReg = 0x08, IntClear = 0x0C, RawISR = 0x10, MaskedISR = 0x14, BGLoad = 0x18, Size = 0x20 } |
Public Member Functions | |
| BitUnion32 (CTRL) Bitfield< 0 > oneShot | |
| void | counterAtZero () |
| Called when the counter reaches 0. More... | |
| void | restartCounter (uint32_t val) |
| Restart the counter ticking at val. More... | |
| Timer (std::string __name, Sp804 *parent, ArmInterruptPin *_interrupt, Tick clock) | |
| 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 > | timerSize |
| Bitfield< 3, 2 > | timerPrescale |
| Bitfield< 5 > | intEnable |
| Bitfield< 6 > | timerMode |
| Bitfield< 7 > | timerEnable |
| EndBitUnion(CTRL) protected Sp804 * | parent |
| Pointer to parent class. More... | |
| ArmInterruptPin *const | interrupt |
| Pointer to the interrupt pin. More... | |
| const Tick | clock |
| Number of ticks in a clock input. 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... | |
| uint32_t | loadValue |
| Value to load into counter when periodic mode reaches 0. More... | |
| EventFunctionWrapper | zeroEvent |
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 62 of file timer_sp804.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| LoadReg | |
| CurrentReg | |
| ControlReg | |
| IntClear | |
| RawISR | |
| MaskedISR | |
| BGLoad | |
| Size | |
Definition at line 66 of file timer_sp804.hh.
| gem5::Sp804::Timer::Timer | ( | std::string | __name, |
| Sp804 * | parent, | ||
| ArmInterruptPin * | _interrupt, | ||
| Tick | clock | ||
| ) |
Definition at line 61 of file timer_sp804.cc.
References counterAtZero().
| gem5::Sp804::Timer::BitUnion32 | ( | CTRL | ) |
| void gem5::Sp804::Timer::counterAtZero | ( | ) |
Called when the counter reaches 0.
Definition at line 203 of file timer_sp804.cc.
References DPRINTF.
Referenced by Timer().
|
inline |
Definition at line 125 of file timer_sp804.hh.
References gem5::Named::_name.
Handle read for a single timer.
Definition at line 91 of file timer_sp804.cc.
References gem5::curTick(), DPRINTF, gem5::Packet::getLE(), panic, gem5::Packet::setLE(), and timerPrescale.
Referenced by gem5::Sp804::read().
| void gem5::Sp804::Timer::restartCounter | ( | uint32_t | val | ) |
Restart the counter ticking at val.
| val | the value to start at (pre-16 bit masking if en) |
Definition at line 182 of file timer_sp804.cc.
References gem5::bits(), 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 230 of file timer_sp804.cc.
References DPRINTF, and SERIALIZE_SCALAR.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 252 of file timer_sp804.cc.
References DPRINTF, and UNSERIALIZE_SCALAR.
Handle write for a single timer.
Definition at line 145 of file timer_sp804.cc.
References DPRINTF, gem5::Packet::getLE(), and panic.
Referenced by gem5::Sp804::write().
| const Tick gem5::Sp804::Timer::clock |
Number of ticks in a clock input.
Definition at line 97 of file timer_sp804.hh.
| CTRL gem5::Sp804::Timer::control |
Control register as specified above.
Definition at line 100 of file timer_sp804.hh.
| Bitfield<5> gem5::Sp804::Timer::intEnable |
Definition at line 82 of file timer_sp804.hh.
| ArmInterruptPin* const gem5::Sp804::Timer::interrupt |
Pointer to the interrupt pin.
Definition at line 94 of file timer_sp804.hh.
| uint32_t gem5::Sp804::Timer::loadValue |
Value to load into counter when periodic mode reaches 0.
Definition at line 111 of file timer_sp804.hh.
| EndBitUnion (CTRL) protected Sp804* gem5::Sp804::Timer::parent |
Pointer to parent class.
Definition at line 85 of file timer_sp804.hh.
| bool gem5::Sp804::Timer::pendingInt |
If an interrupt is currently pending.
Logical and of CTRL.intEnable and rawInt
Definition at line 108 of file timer_sp804.hh.
| bool gem5::Sp804::Timer::rawInt |
If timer has caused an interrupt.
This is irrespective of interrupt enable
Definition at line 104 of file timer_sp804.hh.
| Bitfield<7> gem5::Sp804::Timer::timerEnable |
Definition at line 84 of file timer_sp804.hh.
| Bitfield<6> gem5::Sp804::Timer::timerMode |
Definition at line 83 of file timer_sp804.hh.
| Bitfield<3,2> gem5::Sp804::Timer::timerPrescale |
Definition at line 81 of file timer_sp804.hh.
Referenced by read().
| Bitfield<1> gem5::Sp804::Timer::timerSize |
Definition at line 80 of file timer_sp804.hh.
| EventFunctionWrapper gem5::Sp804::Timer::zeroEvent |
Definition at line 115 of file timer_sp804.hh.