Go to the documentation of this file.
43 #include "debug/Checkpoint.hh"
44 #include "debug/Timer.hh"
51 lastWrittenTick(0), loadVal(0), matchVal(0),
52 rawInt(false), maskInt(false), pendingInt(false),
66 DPRINTF(Timer,
"Reading from RTC at offset: %#x\n", daddr);
96 panic(
"Tried to read PL031 at offset %#x that doesn't exist\n", daddr);
111 panic(
"Uart read size too big?\n");
126 DPRINTF(Timer,
"Writing to RTC at offset: %#x\n", daddr);
147 if (pkt->
getLE<uint32_t>()) {
155 panic(
"Tried to read PL031 at offset %#x that doesn't exist\n", daddr);
166 DPRINTF(Timer,
"Setting up new match event match=%d time=%d\n",
matchVal,
173 DPRINTF(Timer,
"-- Event was already schedule, de-scheduling\n");
177 DPRINTF(Timer,
"-- Scheduling new event for: %d\n",
curTick() + ticks_until);
183 DPRINTF(Timer,
"Counter reached zero\n");
189 DPRINTF(Timer,
"-- Causing interrupt\n");
197 DPRINTF(Checkpoint,
"Serializing Arm PL031\n");
219 DPRINTF(Checkpoint,
"Unserializing Arm PL031\n");
242 PL031Params::create()
244 return new PL031(
this);
bool scheduled() const
Determine if the current event is scheduled.
void makeAtomicResponse()
Tick read(PacketPtr pkt) override
Handle a read to the device.
Addr pioAddr
Address that the device listens to.
Tick write(PacketPtr pkt) override
Handle writes to the device.
#define UNSERIALIZE_SCALAR(scalar)
time_t mkutctime(struct tm *time)
virtual void raise()=0
Signal an interrupt.
uint64_t Tick
Tick count type.
void deschedule(Event &event)
Tick when() const
Get the time that the event is scheduled.
EventFunctionWrapper matchEvent
void schedule(Event &event, Tick when)
void resyncMatch()
Called to update the matchEvent when the load Value or match value are written.
ArmInterruptPin *const interrupt
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
bool maskInt
If the timer interrupt mask that is anded with the raw interrupt to generate a pending interrupt.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool rawInt
If timer has caused an interrupt.
void serialize(CheckpointOut &cp) const override
Serialize an object.
bool readId(PacketPtr pkt, uint64_t amba_id, Addr pio_addr)
Addr pioSize
Size that the device's address range.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & name()
#define SERIALIZE_SCALAR(scalar)
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
AmbaPioDeviceParams Params
PL031(Params *p)
The constructor for RealView just registers itself with the MMU.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void counterMatch()
Called when the counter reaches matches.
Tick pioDelay
Delay that the device experinces on an access.
void setLE(T v)
Set the value in the data pointer to v as little endian.
std::ostream CheckpointOut
bool pendingInt
If an interrupt is currently pending.
#define panic(...)
This implements a cprintf based panic() function.
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17