42#ifndef __MEM_RUBY_SYSTEM_RUBYPORT_HH__
43#define __MEM_RUBY_SYSTEM_RUBYPORT_HH__
50#include "mem/ruby/protocol/RequestStatus.hh"
53#include "params/RubyPort.hh"
93 bool _access_backing_store,
94 PortID id,
bool _no_retry_on_stall);
145 {
panic(
"recvFunctional should never be called on pio response "
162 void init()
override;
ClockedObject(const ClockedObjectParams &p)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
QueuedRequestPort(const std::string &name, ReqPacketQueue &req_queue, SnoopRespPacketQueue &snoop_resp_queue, PortID id=InvalidPortID)
Create a QueuedPort with a given name, and a supplied implementation of two packet queues.
QueuedResponsePort(const std::string &name, RespPacketQueue &resp_queue, PortID id=InvalidPortID)
Create a QueuedPort with a given name, owner, and a supplied implementation of a packet queue.
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void recvRangeChange()
Called to receive an address range change from the peer response port.
SnoopRespPacketQueue snoopRespQueue
MemRequestPort(const std::string &_name, RubyPort &_port)
bool isShadowRomAddress(Addr addr) const
bool access_backing_store
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
MemResponsePort(const std::string &_name, RubyPort &_port, bool _access_backing_store, PortID id, bool _no_retry_on_stall)
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
void evictionCallback(Addr address)
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
bool isPhysMemAddress(PacketPtr pkt) const
void hitCallback(PacketPtr pkt)
void recvRangeChange()
Called to receive an address range change from the peer response port.
SnoopRespPacketQueue snoopRespQueue
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
PioRequestPort(const std::string &_name, RubyPort &_port)
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
PioResponsePort(const std::string &_name, RubyPort &_port)
void ruby_hit_callback(PacketPtr pkt)
std::vector< MemResponsePort * > response_ports
Addr makeLineAddress(Addr addr) const
virtual RequestStatus makeRequest(PacketPtr pkt)=0
void ruby_unaddressed_callback(PacketPtr pkt)
virtual int outstandingCount() const =0
void ruby_stale_translation_callback(Addr txnId)
virtual void descheduleDeadlockEvent()=0
std::string printAddress(Addr addr) const
bool recvTimingResp(PacketPtr pkt, PortID request_port_id)
Called by the PIO port when receiving a timing response.
std::vector< MemResponsePort * > retryList
RubySystem * m_ruby_system
MemResponsePort memResponsePort
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
PioResponsePort pioResponsePort
bool onRetryList(MemResponsePort *port)
PioRequestPort pioRequestPort
RubyPort(const Params &p)
virtual bool isDeadlockEventScheduled() const =0
virtual int functionalWrite(Packet *func_pkt)
unsigned int gotAddrRanges
void addToRetryList(MemResponsePort *port)
MemRequestPort memRequestPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void setController(AbstractController *_cntrl)
AbstractController * m_controller
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
void ruby_eviction_callback(Addr address)
MessageBuffer * m_mandatory_q_ptr
std::vector< PioRequestPort * > request_ports
Addr getOffset(Addr addr) const
std::vector< MemResponsePort * >::iterator CpuPortIter
Vector of M5 Ports attached to this Ruby port.
ClockedObject declaration and implementation.
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
DrainState
Object drain/handover states.
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 Arm Limited 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.
A virtual base opaque structure used to hold state associated with the packet (e.g....
SenderState(MemResponsePort *_port)
Declaration of SimpleTimingPort.