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") {
95 if (backdoor !=
nullptr) {
127 if (backdoor !=
nullptr) {
140 if (needsResponse && !cacheResponding) {
168 if (receivedState == NULL)
169 panic(
"AddrMapper %s got a response without sender state\n",
184 delete receivedState;
210 fatal(
"AddrMapper doesn't support remapping of snooping requests\n");
234 originalRanges(
p.original_ranges),
235 remappedRanges(
p.remapped_ranges),
236 backdoorManager(originalRanges, remappedRanges)
239 fatal(
"AddrMapper: original and shadowed range list must "
244 fatal(
"AddrMapper: original and shadowed range list elements"
245 " 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 start() const
Get the start address of the range.
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)
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor)
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 MemBackdoorPtr getRevertedBackdoor(MemBackdoorPtr &backdoor, const AddrRange &range)=0
This function returns a backdoor that fulfills the initiator request, based on the target backdoor at...
Tick sendAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor)
Send an atomic request packet like above, but also request a backdoor to the data being accessed.
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.
MemBackdoorPtr getRevertedBackdoor(MemBackdoorPtr &backdoor, const AddrRange &range) override
This function returns a backdoor that fulfills the initiator request, based on the target backdoor at...
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.
Addr end() const
Get the end address of the range.
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.
void sendMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor)
Send a request for a back door to a range of memory.
bool needsResponse() const
const AddrRange & range() const
BackdoorManager backdoorManager
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.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor)
Tick recvAtomic(PacketPtr pkt)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
AddrRange getAddrRange() const
Get address range to which this packet belongs.
MemBackdoor::Flags flags() const
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the response port by calling its corresponding rece...
MemBackdoorPtr getRevertedBackdoor(MemBackdoorPtr backdoor, const AddrRange &pkt_range)
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 Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17