38 #ifndef __MEM_ADDR_MAPPER_HH__ 39 #define __MEM_ADDR_MAPPER_HH__ 42 #include "params/AddrMapper.hh" 43 #include "params/RangeAddrMapper.hh" 107 :
MasterPort(_name, &_mapper), mapper(_mapper)
114 mapper.recvFunctionalSnoop(pkt);
119 return mapper.recvAtomicSnoop(pkt);
124 return mapper.recvTimingResp(pkt);
129 mapper.recvTimingSnoopReq(pkt);
134 mapper.recvRangeChange();
139 return mapper.isSnooping();
144 mapper.recvReqRetry();
162 :
SlavePort(_name, &_mapper), mapper(_mapper)
169 mapper.recvFunctional(pkt);
174 return mapper.recvAtomic(pkt);
179 return mapper.recvTimingReq(pkt);
184 return mapper.recvTimingSnoopResp(pkt);
189 return mapper.getAddrRanges();
194 mapper.recvRespRetry();
269 #endif //__MEM_ADDR_MAPPER_HH__
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
MapperMasterPort masterPort
Instance of master port, facing the memory side.
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
AddrMapper(const AddrMapperParams *params)
Ports are used to interface objects to each other.
void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
Addr origAddr
The original address the packet was destined for.
void recvRangeChange()
Called to receive an address range change from the peer slave port.
Tick recvAtomicSnoop(PacketPtr pkt)
void recvTimingSnoopReq(PacketPtr pkt)
~AddrMapperSenderState()
Destructor.
MapperSlavePort slavePort
Instance of slave port, i.e.
const PortID InvalidPortID
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
A SlavePort is a specialisation of a port.
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
MapperSlavePort(const std::string &_name, AddrMapper &_mapper)
bool recvTimingSnoopResp(PacketPtr pkt)
Receive a timing snoop response from the peer.
std::vector< AddrRange > originalRanges
This contains a list of ranges the should be remapped.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
uint64_t Tick
Tick count type.
void recvFunctional(PacketPtr pkt)
Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
virtual AddrRangeList getAddrRanges() const =0
bool recvTimingReq(PacketPtr pkt)
virtual Addr remapAddr(Addr addr) const =0
This function does the actual remapping of one address to another.
bool isSnooping() const
Determine if this master port is snooping or not.
bool recvTimingResp(PacketPtr pkt)
const Params * params() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
bool recvTimingSnoopResp(PacketPtr pkt)
A virtual base opaque structure used to hold state associated with the packet (e.g., an MSHR), specific to a SimObject that sees the packet.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
MapperMasterPort(const std::string &_name, AddrMapper &_mapper)
An address mapper changes the packet addresses in going from the slave port side of the mapper to the...
void recvTimingSnoopReq(PacketPtr pkt)
Receive a timing snoop request from the peer.
Tick recvAtomic(PacketPtr pkt)
Range address mapper that maps a set of original ranges to a set of remapped ranges, where a specific range is of the same size (original and remapped), only with an offset.
AddrMapperSenderState(Addr _origAddr)
Construct a new sender state to remember the original address.
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
void recvFunctionalSnoop(PacketPtr pkt)
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
std::vector< AddrRange > remappedRanges
This contains a list of ranges that addresses should be remapped to.
Abstract superclass for simulation objects.