40 #include "debug/SMMUv3.hh" 45 const SMMUv3SlaveInterfaceParams *
p) :
48 microTLB(new
SMMUTLB(p->utlb_entries,
51 mainTLB(new
SMMUTLB(p->tlb_entries,
54 microTLBEnable(p->utlb_enable),
55 mainTLBEnable(p->tlb_enable),
57 microTLBSem(p->utlb_slots),
58 mainTLBSem(p->tlb_slots),
59 microTLBLat(p->utlb_lat),
60 mainTLBLat(p->tlb_lat),
62 atsSlavePort(
name() +
".atsSlave", *this),
63 atsMasterPort(
name() +
".atsMaster", *this),
64 portWidth(p->port_width),
65 wrBufSlotsRemaining(p->wrbuf_slots),
66 xlateSlotsRemaining(p->xlate_slots),
67 pendingMemAccesses(0),
68 prefetchEnable(p->prefetch_enable),
69 prefetchReserveLastWay(
70 p->prefetch_reserve_last_way),
71 deviceNeedsRetry(false),
72 atsDeviceNeedsRetry(false),
73 sendDeviceRetryEvent(*this),
74 atsSendDeviceRetryEvent(this)
85 fatal(
"Slave port is not connected.\n");
92 if (name ==
"ats_master") {
94 }
else if (name ==
"slave") {
96 }
else if (name ==
"ats_slave") {
175 const bool ats_request =
true;
177 proc_name, *
smmu, *
this);
201 const bool ats_request =
true;
262 SMMUv3SlaveInterfaceParams::create()
Ports are used to interface objects to each other.
Tick recvAtomic(PacketPtr pkt)
void sendRangeChange() const
Called by the owner to send a range change.
SMMUDeviceRetryEvent sendDeviceRetryEvent
#define fatal(...)
This implements a cprintf based fatal() function.
const std::string & name()
Port & getPeer()
Return a reference to this port's peer.
void schedAtsTimingResp(PacketPtr pkt)
SMMUATSSlavePort atsSlavePort
bool atsSlaveRecvTimingReq(PacketPtr pkt)
bool isConnected() const
Is this port currently connected to a peer?
unsigned wrBufSlotsRemaining
DrainState
Object drain/handover states.
bool recvTimingReq(PacketPtr pkt)
unsigned xlateSlotsRemaining
const SMMUv3SlaveInterfaceParams * params() const
friend class SMMUTranslationProcess
Draining buffers pending serialization/handover.
void beginTransaction(const SMMUTranslRequest &req)
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
std::string csprintf(const char *format, const Args &...args)
bool atsMasterRecvTimingResp(PacketPtr pkt)
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
void schedTimingResp(PacketPtr pkt, Tick when)
Schedule the sending of a timing response.
uint64_t Tick
Tick count type.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
SMMUv3SlaveInterface(const SMMUv3SlaveInterfaceParams *p)
SMMUATSMasterPort atsMasterPort
Tick atsSlaveRecvAtomic(PacketPtr pkt)
static SMMUTranslRequest fromPacket(PacketPtr pkt, bool ats=false)
void schedule(Event &event, Tick when)
void atsSendDeviceRetry()
void schedTimingResp(PacketPtr pkt)
Tick nextCycle() const
Based on the clock of the object, determine the start tick of the first cycle that is at least one cy...
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void scheduleDeviceRetry()
bool scheduled() const
Determine if the current event is scheduled.
This is an implementation of the SMMUv3 architecture.
virtual const std::string name() const
SMMUAction runProcessTiming(SMMUProcess *proc, PacketPtr pkt)
void sendRetryReq()
Send a retry to the master port that previously attempted a sendTimingReq to this slave port and fail...
DrainState drain() override
Notify an object that it needs to drain its state.
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
EventWrapper< SMMUv3SlaveInterface, &SMMUv3SlaveInterface::atsSendDeviceRetry > atsSendDeviceRetryEvent
Port & getPort(const std::string &name, PortID id) override
Get a port with a given name and index.
SMMUAction runProcessAtomic(SMMUProcess *proc, PacketPtr pkt)
SMMUSlavePort * slavePort