38#ifndef __MEM_ADDR_MAPPER_HH__
39#define __MEM_ADDR_MAPPER_HH__
46#include "params/AddrMapper.hh"
47#include "params/RangeAddrMapper.hh"
~AddrMapperSenderState()
Destructor.
Addr origAddr
The original address the packet was destined for.
AddrMapperSenderState(Addr _origAddr)
Construct a new sender state to remember the original address.
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
void recvRangeChange() override
Called to receive an address range change from the peer response port.
bool isSnooping() const override
Determine if this request port is snooping or not.
MapperRequestPort(const std::string &_name, AddrMapper &_mapper)
void recvTimingSnoopReq(PacketPtr pkt) override
Receive a timing snoop request from the peer.
Tick recvAtomicSnoop(PacketPtr pkt) override
Receive an atomic snoop request packet from our peer.
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the peer.
MapperResponsePort(const std::string &_name, AddrMapper &_mapper)
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
Receive an atomic request packet from the peer, and optionally provide a backdoor to the data being a...
bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
void recvRespRetry() override
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override
Receive a request for a back door to a range of memory.
An address mapper changes the packet addresses in going from the response port side of the mapper to ...
MapperRequestPort memSidePort
Instance of request port, facing the memory side.
virtual AddrRangeList getAddrRanges() const =0
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)
virtual ~AddrMapper()=default
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...
This class manages the backdoors for RangeAddrMapper.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
Range address mapper that maps a set of original ranges to a set of remapped ranges,...
MemBackdoorPtr getRevertedBackdoor(MemBackdoorPtr &backdoor, const AddrRange &range) override
This function returns a backdoor that fulfills the initiator request, based on the target backdoor at...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
~RangeAddrMapper()=default
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
void recvRangeChange() override
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
A ResponsePort is a specialization of a port.
void sendRangeChange() const
Called by the owner to send a range change.
Abstract superclass for simulation objects.
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of the Packet class.
A virtual base opaque structure used to hold state associated with the packet (e.g....