44 masterPort(
name() +
"-master", *this),
45 slavePort(
name() +
"-slave", *this)
53 fatal(
"Address mapper is not connected on both sides.\n");
59 if (if_name ==
"master") {
69 if (if_name ==
"slave") {
121 if (needsResponse && !cacheResponding) {
149 if (receivedState == NULL)
150 panic(
"AddrMapper %s got a response without sender state\n",
165 delete receivedState;
191 fatal(
"AddrMapper doesn't support remapping of snooping requests\n");
215 originalRanges(p->original_ranges),
216 remappedRanges(p->remapped_ranges)
219 fatal(
"AddrMapper: original and shadowed range list must "
224 fatal(
"AddrMapper: original and shadowed range list elements"
225 " aren't all of the same size\n");
230 RangeAddrMapperParams::create()
MapperMasterPort masterPort
Instance of master port, facing the memory side.
AddrMapper(const AddrMapperParams *params)
Addr origAddr
The original address the packet was destined for.
Tick recvAtomicSnoop(PacketPtr pkt)
void recvTimingSnoopReq(PacketPtr pkt)
const std::string & name()
MapperSlavePort slavePort
Instance of slave port, i.e.
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the slave port by calling its corresponding receive...
Tick sendAtomicSnoop(PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time...
void sendFunctionalSnoop(PacketPtr pkt)
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the slave port by calling its corresponding receive function...
virtual BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID)
Get a slave port with a given name and index.
virtual void sendRetryResp()
Send a retry to the slave port that previously attempted a sendTimingResp to this master port and fai...
AddrRangeList getAddrRanges() const
A BaseSlavePort is a protocol-agnostic slave port, responsible only for the structural connection to ...
std::vector< AddrRange > originalRanges
This contains a list of ranges the should be remapped.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
RangeAddrMapper(const RangeAddrMapperParams *p)
bool isSnooping() const
Find out if the peer master port is snooping or not.
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the master port by calling its corresponding receive function...
SenderState * predecessor
uint64_t Tick
Tick count type.
void recvFunctional(PacketPtr pkt)
bool recvTimingReq(PacketPtr pkt)
virtual Addr remapAddr(Addr addr) const =0
This function does the actual remapping of one address to another.
bool needsResponse() const
bool recvTimingResp(PacketPtr pkt)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool cacheResponding() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
bool recvTimingSnoopResp(PacketPtr pkt)
void sendRangeChange() const
Called by the owner to send a range change.
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
Addr remapAddr(Addr addr) const
This function does the actual remapping of one address to another.
virtual const std::string name() const
An address mapper changes the packet addresses in going from the slave port side of the mapper to the...
void sendRetryReq()
Send a retry to the master port that previously attempted a sendTimingReq to this slave port and fail...
SenderState * senderState
This packet's sender state.
Tick recvAtomic(PacketPtr pkt)
The MemObject class extends the ClockedObject with accessor functions to get its master and slave por...
A BaseMasterPort is a protocol-agnostic master port, responsible only for the structural connection t...
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.
void sendTimingSnoopReq(PacketPtr pkt)
Attempt to send a timing snoop request packet to the master port by calling its corresponding receive...
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
virtual BaseMasterPort & getMasterPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a master port with a given name and index.
void recvFunctionalSnoop(PacketPtr pkt)
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.
virtual BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID)
Get a slave port with a given name and index.
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time...
std::vector< AddrRange > remappedRanges
This contains a list of ranges that addresses should be remapped to.
virtual BaseMasterPort & getMasterPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a master port with a given name and index.
void sendFunctional(PacketPtr pkt)
Send a functional request packet, where the data is instantly updated everywhere in the memory system...