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") {
94 memSidePort.sendMemBackdoorReq(remapped_req, backdoor);
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");
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");
Addr origAddr
The original address the packet was destined for.
MapperRequestPort memSidePort
Instance of request port, facing the memory side.
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...
virtual void recvRangeChange()
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor)
MapperResponsePort cpuSidePort
Instance of response port, i.e.
Tick recvAtomicSnoop(PacketPtr pkt)
bool recvTimingResp(PacketPtr pkt)
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor)
void recvFunctionalSnoop(PacketPtr pkt)
bool recvTimingReq(PacketPtr pkt)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void recvTimingSnoopReq(PacketPtr pkt)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void recvFunctional(PacketPtr pkt)
bool recvTimingSnoopResp(PacketPtr pkt)
Tick recvAtomic(PacketPtr pkt)
virtual Addr remapAddr(Addr addr) const =0
This function does the actual remapping of one address to another.
AddrMapper(const AddrMapperParams ¶ms)
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
const AddrRange & range() const
MemBackdoor::Flags flags() const
virtual std::string name() const
AddrRange getAddrRange() const
Get address range to which this packet belongs.
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
bool needsResponse() const
SenderState * senderState
This packet's sender state.
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...
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
bool cacheResponding() const
Ports are used to interface objects to each other.
MemBackdoorPtr getRevertedBackdoor(MemBackdoorPtr &backdoor, const AddrRange &range) override
This function returns a backdoor that fulfills the initiator request, based on the target backdoor at...
std::vector< AddrRange > originalRanges
This contains a list of ranges the should be remapped.
std::vector< AddrRange > remappedRanges
This contains a list of ranges that addresses should be remapped to.
RangeAddrMapper(const RangeAddrMapperParams &p)
Addr remapAddr(Addr addr) const override
This function does the actual remapping of one address to another.
AddrRangeList getAddrRanges() const override
BackdoorManager backdoorManager
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
Addr end() const
Get the end address of the range.
Addr start() const
Get the start address of the range.
#define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
SimObject(const Params &p)
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
MemBackdoor * MemBackdoorPtr
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
SenderState * predecessor