gem5
v20.0.0.2
|
Implements a MemChecker monitor, to be inserted between two ports. More...
#include <mem_checker_monitor.hh>
Classes | |
struct | MemCheckerMonitorSenderState |
class | MonitorMasterPort |
This is the master port of the communication monitor. More... | |
class | MonitorSlavePort |
This is the slave port of the communication monitor. More... | |
Public Types | |
typedef MemCheckerMonitorParams | Params |
Parameters of memchecker monitor. More... | |
![]() | |
typedef SimObjectParams | Params |
Public Member Functions | |
const Params * | params () const |
MemCheckerMonitor (Params *params) | |
Constructor based on the Python params. More... | |
~MemCheckerMonitor () | |
Destructor. More... | |
Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) override |
Get a port with a given name and index. More... | |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
![]() | |
virtual | ~SimObject () |
virtual const std::string | name () const |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. More... | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. More... | |
virtual void | regProbePoints () |
Register probe points for this object. More... | |
virtual void | regProbeListeners () |
Register probe listeners for this object. More... | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. More... | |
virtual void | startup () |
startup() is the final initialization call before simulation. More... | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. More... | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. More... | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
const Params * | params () const |
SimObject (const Params *_params) | |
![]() | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
![]() | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
![]() | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
![]() | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. More... | |
virtual void | resetStats () |
Callback to reset stats. More... | |
virtual void | preDumpStats () |
Callback before stats are dumped. More... | |
void | addStat (Stats::Info *info) |
Register a stat with this group. More... | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. More... | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. More... | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. More... | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. More... | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Private Member Functions | |
void | recvFunctional (PacketPtr pkt) |
void | recvFunctionalSnoop (PacketPtr pkt) |
Tick | recvAtomic (PacketPtr pkt) |
Tick | recvAtomicSnoop (PacketPtr pkt) |
bool | recvTimingReq (PacketPtr pkt) |
bool | recvTimingResp (PacketPtr pkt) |
void | recvTimingSnoopReq (PacketPtr pkt) |
bool | recvTimingSnoopResp (PacketPtr pkt) |
AddrRangeList | getAddrRanges () const |
bool | isSnooping () const |
void | recvReqRetry () |
void | recvRespRetry () |
void | recvRangeChange () |
Private Attributes | |
MonitorMasterPort | masterPort |
Instance of master port, facing the memory side. More... | |
MonitorSlavePort | slavePort |
Instance of slave port, i.e. More... | |
bool | warnOnly |
MemChecker * | memchecker |
Additional Inherited Members | |
![]() | |
static void | serializeAll (CheckpointOut &cp) |
Serialize all SimObjects in the system. More... | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
![]() | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
![]() | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. More... | |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
![]() | |
const SimObjectParams * | _params |
Cached copy of the object parameters. More... | |
![]() | |
EventQueue * | eventq |
A pointer to this object's event queue. More... | |
Implements a MemChecker monitor, to be inserted between two ports.
Definition at line 50 of file mem_checker_monitor.hh.
typedef MemCheckerMonitorParams MemCheckerMonitor::Params |
Parameters of memchecker monitor.
Definition at line 55 of file mem_checker_monitor.hh.
MemCheckerMonitor::MemCheckerMonitor | ( | Params * | params | ) |
Constructor based on the Python params.
params | Python parameters |
Definition at line 47 of file mem_checker_monitor.cc.
Referenced by params(), and ~MemCheckerMonitor().
MemCheckerMonitor::~MemCheckerMonitor | ( | ) |
Destructor.
Definition at line 55 of file mem_checker_monitor.cc.
References MemCheckerMonitor().
Referenced by params().
|
private |
Definition at line 338 of file mem_checker_monitor.cc.
References MasterPort::getAddrRanges(), and masterPort.
|
overridevirtual |
Get a port with a given name and index.
This is used at binding time and returns a reference to a protocol-agnostic port.
if_name | Port name |
idx | Index in the case of a VectorPort |
Reimplemented from SimObject.
Definition at line 73 of file mem_checker_monitor.cc.
References SimObject::getPort(), masterPort, and slavePort.
Referenced by params().
|
overridevirtual |
init() is called after all C++ SimObjects have been created and all ports are connected.
Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.
Reimplemented from SimObject.
Definition at line 65 of file mem_checker_monitor.cc.
References fatal, Port::isConnected(), masterPort, and slavePort.
Referenced by params().
|
private |
Definition at line 331 of file mem_checker_monitor.cc.
References SlavePort::isSnooping(), and slavePort.
|
inline |
Definition at line 56 of file mem_checker_monitor.hh.
References SimObject::_params, getPort(), init(), InvalidPortID, MemCheckerMonitor(), and ~MemCheckerMonitor().
Definition at line 119 of file mem_checker_monitor.cc.
References panic.
Definition at line 125 of file mem_checker_monitor.cc.
References panic.
|
private |
Definition at line 85 of file mem_checker_monitor.cc.
References addr, DPRINTF, Packet::getAddr(), Packet::getSize(), masterPort, memchecker, MemChecker::reset(), and MasterPort::sendFunctional().
|
private |
Definition at line 103 of file mem_checker_monitor.cc.
References addr, DPRINTF, Packet::getAddr(), Packet::getSize(), memchecker, MemChecker::reset(), SlavePort::sendFunctionalSnoop(), and slavePort.
|
private |
Definition at line 357 of file mem_checker_monitor.cc.
References SlavePort::sendRangeChange(), and slavePort.
|
private |
Definition at line 345 of file mem_checker_monitor.cc.
References SlavePort::sendRetryReq(), and slavePort.
|
private |
Definition at line 351 of file mem_checker_monitor.cc.
References masterPort, and MasterPort::sendRetryResp().
|
private |
Definition at line 131 of file mem_checker_monitor.cc.
References addr, Packet::cacheResponding(), curTick(), DPRINTF, Packet::getAddr(), Packet::getSize(), Packet::isRead(), Packet::isRequest(), Packet::isWrite(), masterPort, memchecker, Packet::needsResponse(), Packet::popSenderState(), Packet::pushSenderState(), Packet::req, MasterPort::sendTimingReq(), MemCheckerMonitor::MemCheckerMonitorSenderState::serial, MemChecker::startRead(), MemChecker::startWrite(), and Packet::writeData().
|
private |
Definition at line 223 of file mem_checker_monitor.cc.
References MemChecker::abortWrite(), addr, MemChecker::completeRead(), MemChecker::completeWrite(), curTick(), DPRINTF, Packet::getAddr(), MemChecker::getErrorMessage(), Packet::getSize(), Packet::isLLSC(), Packet::isRead(), Packet::isResponse(), Packet::isWrite(), memchecker, SimObject::name(), panic_if, Packet::SenderState::predecessor, Packet::req, Packet::senderState, SlavePort::sendTimingResp(), MemCheckerMonitor::MemCheckerMonitorSenderState::serial, slavePort, warn, warnOnly, and Packet::writeData().
|
private |
Definition at line 319 of file mem_checker_monitor.cc.
References SlavePort::sendTimingSnoopReq(), and slavePort.
|
private |
Definition at line 325 of file mem_checker_monitor.cc.
References masterPort, and MasterPort::sendTimingSnoopResp().
|
private |
Instance of master port, facing the memory side.
Definition at line 144 of file mem_checker_monitor.hh.
Referenced by getAddrRanges(), getPort(), init(), recvFunctional(), recvRespRetry(), recvTimingReq(), and recvTimingSnoopResp().
|
private |
Definition at line 230 of file mem_checker_monitor.hh.
Referenced by recvFunctional(), recvFunctionalSnoop(), recvTimingReq(), and recvTimingResp().
|
private |
Instance of slave port, i.e.
on the CPU side
Definition at line 200 of file mem_checker_monitor.hh.
Referenced by getPort(), init(), isSnooping(), recvFunctionalSnoop(), recvRangeChange(), recvReqRetry(), recvTimingResp(), and recvTimingSnoopReq().
|
private |
Definition at line 228 of file mem_checker_monitor.hh.
Referenced by recvTimingResp().