Go to the documentation of this file.
42 memSidePort(
name() +
"-mem_side_port", *this),
43 cpuSidePort(
name() +
"-cpu_side_port", *this)
51 fatal(
"Address mapper is not connected on both sides.\n");
57 if (if_name ==
"mem_side_port") {
59 }
else if (if_name ==
"cpu_side_port") {
111 if (needsResponse && !cacheResponding) {
139 if (receivedState == NULL)
140 panic(
"AddrMapper %s got a response without sender state\n",
155 delete receivedState;
181 fatal(
"AddrMapper doesn't support remapping of snooping requests\n");
205 originalRanges(
p->original_ranges),
206 remappedRanges(
p->remapped_ranges)
209 fatal(
"AddrMapper: original and shadowed range list must "
214 fatal(
"AddrMapper: original and shadowed range list elements"
215 " aren't all of the same size\n");
220 RangeAddrMapperParams::create()
bool recvTimingSnoopResp(PacketPtr pkt)
std::vector< AddrRange > remappedRanges
This contains a list of ranges that addresses should be remapped to.
#define fatal(...)
This implements a cprintf based fatal() function.
Addr remapAddr(Addr addr) const
This function does the actual remapping of one address to another.
bool recvTimingReq(PacketPtr pkt)
bool cacheResponding() const
virtual Addr remapAddr(Addr addr) const =0
This function does the actual remapping of one address to another.
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
bool recvTimingResp(PacketPtr pkt)
void recvFunctionalSnoop(PacketPtr pkt)
uint64_t Tick
Tick count type.
An address mapper changes the packet addresses in going from the response port side of the mapper to ...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Tick sendAtomicSnoop(PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time,...
std::vector< AddrRange > originalRanges
This contains a list of ranges the should be remapped.
void sendFunctional(PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
Tick recvAtomic(PacketPtr pkt)
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the response port by calling its corresponding rece...
void sendTimingSnoopReq(PacketPtr pkt)
Attempt to send a timing snoop request packet to the request port by calling its corresponding receiv...
Tick recvAtomicSnoop(PacketPtr pkt)
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
void recvTimingSnoopReq(PacketPtr pkt)
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Ports are used to interface objects to each other.
bool needsResponse() const
virtual void sendRetryResp()
Send a retry to the response port that previously attempted a sendTimingResp to this request port and...
bool isSnooping() const
Find out if the peer request port is snooping or not.
AddrRangeList getAddrRanges() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & name()
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
AddrMapper(const AddrMapperParams *params)
virtual const std::string name() const
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...
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
MapperResponsePort cpuSidePort
Instance of response port, i.e.
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
void sendFunctionalSnoop(PacketPtr pkt) const
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
bool isConnected() const
Is this port currently connected to a peer?
MapperRequestPort memSidePort
Instance of request port, facing the memory side.
Range address mapper that maps a set of original ranges to a set of remapped ranges,...
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
SenderState * senderState
This packet's sender state.
RangeAddrMapper(const RangeAddrMapperParams *p)
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
SenderState * predecessor
void sendRangeChange() const
Called by the owner to send a range change.
void recvFunctional(PacketPtr pkt)
Addr origAddr
The original address the packet was destined for.
#define panic(...)
This implements a cprintf based panic() function.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17