41#ifndef __DEV_IO_DEVICE_HH__
42#define __DEV_IO_DEVICE_HH__
45#include "params/BasicPioDevice.hh"
46#include "params/PioDevice.hh"
62template <
class Device>
80 return delay + receive_delay;
86 return device->getAddrRanges();
138 void init()
override;
Addr pioAddr
Address that the device listens to.
BasicPioDevice(const Params &p, Addr size)
AddrRangeList getAddrRanges() const override
Determine the address ranges that this device responds to.
Tick pioDelay
Delay that the device experinces on an access.
Addr pioSize
Size that the device's address range.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
This device is the base class which all devices senstive to an address range inherit from.
PioDevice(const Params &p)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
virtual Tick read(PacketPtr pkt)=0
Pure virtual function that the device must implement.
virtual AddrRangeList getAddrRanges() const =0
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
PioPort< PioDevice > pioPort
The pioPort that handles the requests for us and provides us requests that it sees.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual Tick write(PacketPtr pkt)=0
Pure virtual function that the device must implement.
The PioPort class is a programmed i/o port that all devices that are sensitive to an address range us...
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
Device * device
The device that this port serves.
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
Ports are used to interface objects to each other.
The simple timing port uses a queued port to implement recvFunctional and recvTimingReq through recvA...
ClockedObject declaration and implementation.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of SimpleTimingPort.
const std::string & name()