38#ifndef __DEV_ARM_SP804_HH__
39#define __DEV_ARM_SP804_HH__
46#include "params/Sp804.hh"
This is a base class for AMBA devices that have to respond to Device and Implementer ID calls.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Generic representation of an Arm interrupt pin.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Basic support for object serialization.
EndBitUnion(CTRL) protected Sp804 * parent
Pointer to parent class.
Timer(std::string __name, Sp804 *parent, ArmInterruptPin *_interrupt, Tick clock)
CTRL control
Control register as specified above.
Bitfield< 7 > timerEnable
void counterAtZero()
Called when the counter reaches 0.
uint32_t loadValue
Value to load into counter when periodic mode reaches 0.
bool pendingInt
If an interrupt is currently pending.
void restartCounter(uint32_t val)
Restart the counter ticking at val.
const Tick clock
Number of ticks in a clock input.
EventFunctionWrapper zeroEvent
BitUnion32(CTRL) Bitfield< 0 > oneShot
void serialize(CheckpointOut &cp) const override
Serialize an object.
void write(PacketPtr pkt, Addr daddr)
Handle write for a single timer.
bool rawInt
If timer has caused an interrupt.
void read(PacketPtr pkt, Addr daddr)
Handle read for a single timer.
ArmInterruptPin *const interrupt
Pointer to the interrupt pin.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Bitfield< 3, 2 > timerPrescale
void serialize(CheckpointOut &cp) const override
Serialize an object.
Timer timer0
Timers that do the actual work.
Sp804(const Params &p)
The constructor for RealView just registers itself with the MMU.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick read(PacketPtr pkt) override
Handle a read to the device.
Tick write(PacketPtr pkt) override
All writes are simply ignored.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.