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