Go to the documentation of this file.
41 #include "params/GenericWatchdog.hh"
53 refreshFrame(
p.refresh_start,
p.refresh_start + 0x10000),
54 controlFrame(
p.control_start,
p.control_start + 0x10000),
55 pioLatency(
p.pio_latency),
56 cnt(*
p.system_counter),
61 cnt.registerListener(&cntListener);
77 const size_t size = pkt->
getSize();
78 panic_if(size != 4,
"GenericWatchdog::read: Invalid size %i\n", size);
87 panic(
"%s unknown address %#x\n", __func__,
addr);
90 pkt->
setUintX(resp, ByteOrder::little);
108 panic(
"%s unknown address %#x\n", __func__,
addr);
120 return controlStatus;
130 panic(
"%s unknown address %#x\n", __func__,
addr);
138 const size_t size = pkt->
getSize();
139 panic_if(size != 4,
"GenericWatchdog::write: Invalid size %i\n", size);
148 panic(
"%s unknown address %#x\n", __func__,
addr);
166 panic(
"%s unknown address %#x\n", __func__,
addr);
178 controlStatus =
data & 0x1;
192 panic(
"%s unknown address %#x\n", __func__,
addr);
200 controlStatus.ws0 = 0;
201 controlStatus.ws1 = 0;
224 if (!controlStatus.enabled)
227 if (!controlStatus.ws0) {
228 controlStatus.ws0 = 1;
231 controlStatus.ws1 = 1;
Tick when() const
Get the time that the event is scheduled.
Addr start() const
Get the start address of the range.
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
This device is the base class which all devices senstive to an address range inherit from.
#define UNSERIALIZE_SCALAR(scalar)
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
bool contains(const Addr &a) const
Determine if the range contains an address.
void writeRefresh(Addr addr, uint32_t data)
uint32_t readRefresh(Addr addr)
uint32_t offset
Offset Register.
const uint32_t iidr
Interface Identification Register.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick whenValue(uint64_t target_val)
Returns the tick at which a certain counter value is reached.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
EventFunctionWrapper timeoutEvent
uint64_t Tick
Tick count type.
virtual void clear()=0
Clear a signalled interrupt.
void reschedule(Event &event, Tick when, bool always=false)
constexpr T insertBits(T val, unsigned first, unsigned last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
uint32_t readControl(Addr addr)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & name()
#define SERIALIZE_SCALAR(scalar)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
uint64_t value()
Updates and returns the counter value.
GenericWatchdog(const GenericWatchdogParams ¶ms)
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
uint64_t compare
Compare Register.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
std::ostream CheckpointOut
void writeControl(Addr addr, uint32_t data)
virtual void raise()=0
Signal an interrupt.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const AddrRange refreshFrame
const AddrRange controlFrame
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
void serialize(CheckpointOut &cp) const override
Serialize an object.
ArmInterruptPin *const ws1
bool scheduled() const
Determine if the current event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:55 for gem5 by doxygen 1.8.17