|
gem5
|
#include <AbstractController.hh>
Classes | |
| class | MemoryPort |
| Port that forwards requests and receives responses from the memory controller. More... | |
| struct | SenderState |
| class | StatsCallback |
| Callback class used for collating statistics from all the controller of this type. More... | |
Public Types | |
| typedef RubyControllerParams | Params |
Public Types inherited from MemObject | |
| typedef MemObjectParams | Params |
Public Types inherited from ClockedObject | |
| typedef ClockedObjectParams | Params |
| Parameters of ClockedObject. More... | |
Public Types inherited from SimObject | |
| typedef SimObjectParams | Params |
Public Member Functions | |
| AbstractController (const Params *p) | |
| void | init () |
| init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
| const Params * | params () const |
| NodeID | getVersion () const |
| MachineType | getType () const |
| void | initNetworkPtr (Network *net_ptr) |
| void | blockOnQueue (Addr, MessageBuffer *) |
| bool | isBlocked (Addr) const |
| void | unblock (Addr) |
| bool | isBlocked (Addr) |
| virtual MessageBuffer * | getMandatoryQueue () const =0 |
| virtual MessageBuffer * | getMemoryQueue () const =0 |
| virtual AccessPermission | getAccessPermission (const Addr &addr)=0 |
| virtual void | print (std::ostream &out) const =0 |
| virtual void | wakeup ()=0 |
| virtual void | resetStats ()=0 |
| Reset statistics associated with this object. More... | |
| virtual void | regStats () |
| Register statistics for this object. More... | |
| virtual void | recordCacheTrace (int cntrl, CacheRecorder *tr)=0 |
| virtual Sequencer * | getCPUSequencer () const =0 |
| virtual GPUCoalescer * | getGPUCoalescer () const =0 |
| virtual void | functionalRead (const Addr &addr, PacketPtr)=0 |
| These functions are used by ruby system to read/write the data blocks that exist with in the controller. More... | |
| void | functionalMemoryRead (PacketPtr) |
| virtual int | functionalWriteBuffers (PacketPtr &)=0 |
| The return value indicates the number of messages written with the data from the packet. More... | |
| virtual int | functionalWrite (const Addr &addr, PacketPtr)=0 |
| int | functionalMemoryWrite (PacketPtr) |
| virtual void | enqueuePrefetch (const Addr &, const RubyRequestType &) |
| Function for enqueuing a prefetch request. More... | |
| virtual void | collateStats () |
| Function for collating statistics from all the controllers of this particular type. More... | |
| virtual void | initNetQueues ()=0 |
| Initialize the message buffers. More... | |
| BaseMasterPort & | getMasterPort (const std::string &if_name, PortID idx=InvalidPortID) |
| A function used to return the port associated with this bus object. More... | |
| void | queueMemoryRead (const MachineID &id, Addr addr, Cycles latency) |
| void | queueMemoryWrite (const MachineID &id, Addr addr, Cycles latency, const DataBlock &block) |
| void | queueMemoryWritePartial (const MachineID &id, Addr addr, Cycles latency, const DataBlock &block, int size) |
| void | recvTimingResp (PacketPtr pkt) |
| MachineID | getMachineID () const |
| Stats::Histogram & | getDelayHist () |
| Stats::Histogram & | getDelayVCHist (uint32_t index) |
Public Member Functions inherited from MemObject | |
| const Params * | params () const |
| MemObject (const Params *params) | |
| virtual BaseSlavePort & | getSlavePort (const std::string &if_name, PortID idx=InvalidPortID) |
| Get a slave port with a given name and index. More... | |
Public Member Functions inherited from ClockedObject | |
| ClockedObject (const ClockedObjectParams *p) | |
| const Params * | params () const |
| void | serialize (CheckpointOut &cp) const override |
| Serialize an object. More... | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. More... | |
| Enums::PwrState | pwrState () const |
| std::string | pwrStateName () const |
| std::vector< double > | pwrStateWeights () const |
| Returns the percentage residency for each power state. More... | |
| void | computeStats () |
| Record stats values like state residency by computing the time difference from previous update. More... | |
| void | pwrState (Enums::PwrState) |
| void | regStats () override |
| Register statistics for this object. More... | |
Public Member Functions inherited from SimObject | |
| const Params * | params () const |
| SimObject (const Params *_params) | |
| 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... | |
Public Member Functions inherited from EventManager | |
| EventManager (EventManager &em) | |
| EventManager (EventManager *em) | |
| EventManager (EventQueue *eq) | |
| 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) |
Public Member Functions inherited from Serializable | |
| 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) |
Public Member Functions inherited from Drainable | |
| DrainState | drainState () const |
| Return the current drain state of an object. More... | |
| virtual void | notifyFork () |
| Notify a child process of a fork. More... | |
Public Member Functions inherited from Clocked | |
| void | updateClockPeriod () const |
| Update the tick to the current tick. More... | |
| Tick | clockEdge (Cycles cycles=Cycles(0)) const |
| Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More... | |
| Cycles | curCycle () const |
| Determine the current cycle, corresponding to a tick aligned to a clock edge. More... | |
| Tick | nextCycle () const |
| Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More... | |
| uint64_t | frequency () const |
| Tick | clockPeriod () const |
| double | voltage () const |
| Cycles | ticksToCycles (Tick t) const |
| Tick | cyclesToTicks (Cycles c) const |
Public Member Functions inherited from Consumer | |
| Consumer (ClockedObject *_em) | |
| virtual | ~Consumer () |
| virtual void | storeEventInfo (int info) |
| bool | alreadyScheduled (Tick time) |
| void | insertScheduledWakeupTime (Tick time) |
| void | scheduleEventAbsolute (Tick timeAbs) |
Protected Types | |
| typedef std::vector < MessageBuffer * > | MsgVecType |
| typedef std::set< MessageBuffer * > | MsgBufType |
| typedef std::map< Addr, MsgVecType * > | WaitingBufType |
Protected Member Functions | |
| void | profileRequest (const std::string &request) |
| Profiles original cache requests including PUTs. More... | |
| void | profileMsgDelay (uint32_t virtualNetwork, Cycles delay) |
| Profiles the delay associated with messages. More... | |
| void | stallBuffer (MessageBuffer *buf, Addr addr) |
| void | wakeUpBuffers (Addr addr) |
| void | wakeUpAllBuffers (Addr addr) |
| void | wakeUpAllBuffers () |
Protected Member Functions inherited from Drainable | |
| Drainable () | |
| virtual | ~Drainable () |
| virtual void | drainResume () |
| Resume execution after a successful drain. More... | |
| void | signalDrainDone () const |
| Signal that an object is drained. More... | |
Protected Member Functions inherited from Clocked | |
| Clocked (ClockDomain &clk_domain) | |
| Create a clocked object and set the clock domain based on the parameters. More... | |
| Clocked (Clocked &)=delete | |
| Clocked & | operator= (Clocked &)=delete |
| virtual | ~Clocked () |
| Virtual destructor due to inheritance. More... | |
| void | resetClock () const |
| Reset the object's clock using the current global tick value. More... | |
Protected Member Functions inherited from Consumer | |
| void | scheduleEvent (Cycles timeDelta) |
Additional Inherited Members | |
Static Public Member Functions inherited from SimObject | |
| 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 Public Member Functions inherited from Serializable | |
| static const std::string & | currentSection () |
| Get the fully-qualified name of the active section. More... | |
| static void | serializeAll (const std::string &cpt_dir) |
| static void | unserializeGlobals (CheckpointIn &cp) |
Static Public Attributes inherited from Serializable | |
| static int | ckptCount = 0 |
| static int | ckptMaxCount = 0 |
| static int | ckptPrevCount = -1 |
Definition at line 60 of file AbstractController.hh.
|
protected |
Definition at line 157 of file AbstractController.hh.
|
protected |
Definition at line 156 of file AbstractController.hh.
| typedef RubyControllerParams AbstractController::Params |
Definition at line 63 of file AbstractController.hh.
|
protected |
Definition at line 158 of file AbstractController.hh.
| AbstractController::AbstractController | ( | const Params * | p | ) |
Definition at line 39 of file AbstractController.cc.
References m_version, and Stats::registerDumpCallback().
| void AbstractController::blockOnQueue | ( | Addr | addr, |
| MessageBuffer * | port | ||
| ) |
Definition at line 192 of file AbstractController.cc.
References addr, m_block_map, and m_is_blocking.
Referenced by Sequencer::writeCallback(), and GPUCoalescer::writeCallback().
|
inlinevirtual |
Function for collating statistics from all the controllers of this particular type.
This function should only be called from the version 0 of this controller type.
Definition at line 109 of file AbstractController.hh.
References fatal.
Referenced by AbstractController::StatsCallback::process().
|
inlinevirtual |
Function for enqueuing a prefetch request.
Definition at line 103 of file AbstractController.hh.
References fatal.
Referenced by Prefetcher::initializeStream(), and Prefetcher::issueNextPrefetch().
| void AbstractController::functionalMemoryRead | ( | PacketPtr | pkt | ) |
Definition at line 297 of file AbstractController.cc.
References memoryPort, and MasterPort::sendFunctional().
| int AbstractController::functionalMemoryWrite | ( | PacketPtr | pkt | ) |
Definition at line 303 of file AbstractController.cc.
References QueuedMasterPort::checkFunctional(), memoryPort, and MasterPort::sendFunctional().
These functions are used by ruby system to read/write the data blocks that exist with in the controller.
|
pure virtual |
The return value indicates the number of messages written with the data from the packet.
|
pure virtual |
|
pure virtual |
Referenced by Profiler::collateStats().
|
inline |
Definition at line 129 of file AbstractController.hh.
References m_delayHistogram.
Referenced by Profiler::collateStats().
|
inline |
Definition at line 130 of file AbstractController.hh.
References MipsISA::index, and m_delayVCHistogram.
Referenced by Profiler::collateStats().
|
pure virtual |
Referenced by Profiler::collateStats().
|
inline |
Definition at line 127 of file AbstractController.hh.
References m_machineID.
Referenced by RubySystem::registerAbstractController().
|
pure virtual |
Referenced by RubyPort::init().
|
virtual |
A function used to return the port associated with this bus object.
Reimplemented from MemObject.
Definition at line 220 of file AbstractController.cc.
References memoryPort.
|
pure virtual |
Referenced by recvTimingResp().
|
inline |
Definition at line 69 of file AbstractController.hh.
References MachineID::getType(), and m_machineID.
Referenced by Topology::Topology().
|
inline |
Definition at line 68 of file AbstractController.hh.
References MachineID::getNum(), and m_machineID.
Referenced by Topology::Topology().
|
virtual |
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 56 of file AbstractController.cc.
References Network::getNumberOfVirtualNetworks(), ArmISA::i, Stats::Histogram::init(), m_delayHistogram, m_delayVCHistogram, params(), and X86ISA::size().
|
pure virtual |
Initialize the message buffers.
|
inline |
Definition at line 71 of file AbstractController.hh.
References m_net_ptr.
Referenced by Network::Network().
| bool AbstractController::isBlocked | ( | Addr | addr | ) | const |
Definition at line 199 of file AbstractController.cc.
References m_block_map, and m_is_blocking.
Referenced by GPUCoalescer::getRequestStatus(), and Sequencer::insertRequest().
| bool AbstractController::isBlocked | ( | Addr | addr | ) |
Definition at line 214 of file AbstractController.cc.
References m_block_map.
|
inline |
Definition at line 66 of file AbstractController.hh.
References SimObject::_params.
Referenced by init().
|
pure virtual |
Implements Consumer.
|
protected |
Profiles the delay associated with messages.
Definition at line 89 of file AbstractController.cc.
References m_delayHistogram, m_delayVCHistogram, and Stats::DistBase< Derived, Stor >::sample().
|
protected |
Profiles original cache requests including PUTs.
Definition at line 227 of file AbstractController.cc.
References Clocked::clockEdge(), Packet::createRead(), Packet::dataDynamic(), RubySystem::getBlockSizeBytes(), RubySystem::getWarmupEnabled(), m_masterId, memoryPort, Packet::pushSenderState(), recvTimingResp(), ArmISA::s, QueuedMasterPort::schedTimingReq(), and MasterPort::sendFunctional().
| void AbstractController::queueMemoryWrite | ( | const MachineID & | id, |
| Addr | addr, | ||
| Cycles | latency, | ||
| const DataBlock & | block | ||
| ) |
Definition at line 251 of file AbstractController.cc.
References Clocked::clockEdge(), Packet::createWrite(), Packet::dataDynamic(), RubySystem::getBlockSizeBytes(), DataBlock::getData(), RubySystem::getWarmupEnabled(), m_masterId, memoryPort, Packet::pushSenderState(), recvTimingResp(), ArmISA::s, QueuedMasterPort::schedTimingReq(), and MasterPort::sendFunctional().
| void AbstractController::queueMemoryWritePartial | ( | const MachineID & | id, |
| Addr | addr, | ||
| Cycles | latency, | ||
| const DataBlock & | block, | ||
| int | size | ||
| ) |
Definition at line 278 of file AbstractController.cc.
References Clocked::clockEdge(), Packet::createWrite(), Packet::dataDynamic(), DataBlock::getData(), getOffset(), m_masterId, memoryPort, Packet::pushSenderState(), ArmISA::s, QueuedMasterPort::schedTimingReq(), and X86ISA::size().
|
pure virtual |
| void AbstractController::recvTimingResp | ( | PacketPtr | pkt | ) |
Definition at line 318 of file AbstractController.cc.
References Clocked::clockEdge(), Clocked::cyclesToTicks(), MessageBuffer::enqueue(), Packet::getAddr(), RubySystem::getBlockSizeBytes(), getMemoryQueue(), Packet::getPtr(), AbstractController::SenderState::id, Packet::isRead(), Packet::isResponse(), Packet::isWrite(), m_machineID, panic, Packet::req, ArmISA::s, and Packet::senderState.
Referenced by queueMemoryRead(), queueMemoryWrite(), and AbstractController::MemoryPort::recvTimingResp().
|
virtual |
Register statistics for this object.
Reimplemented from SimObject.
Definition at line 78 of file AbstractController.cc.
References Stats::DataWrap< Derived, InfoProxyType >::desc(), Stats::DataWrap< Derived, InfoProxyType >::flags(), m_fully_busy_cycles, SimObject::name(), Stats::DataWrap< Derived, InfoProxyType >::name(), Stats::nozero, and ClockedObject::regStats().
|
pure virtual |
Reset statistics associated with this object.
Reimplemented from SimObject.
Definition at line 68 of file AbstractController.cc.
References Network::getNumberOfVirtualNetworks(), ArmISA::i, m_delayHistogram, m_delayVCHistogram, Stats::DistBase< Derived, Stor >::reset(), and X86ISA::size().
|
protected |
Definition at line 97 of file AbstractController.cc.
References addr, DPRINTF, m_cur_in_port, m_in_ports, and m_waiting_buffers.
| void AbstractController::unblock | ( | Addr | addr | ) |
Definition at line 205 of file AbstractController.cc.
References m_block_map, and m_is_blocking.
Referenced by Sequencer::writeCallback(), and GPUCoalescer::writeCallback().
|
pure virtual |
Implements Consumer.
|
protected |
Definition at line 132 of file AbstractController.cc.
References addr, Clocked::clockEdge(), m_in_ports, and m_waiting_buffers.
|
protected |
Definition at line 153 of file AbstractController.cc.
References Clocked::clockEdge(), and m_waiting_buffers.
|
protected |
Definition at line 111 of file AbstractController.cc.
References addr, Clocked::clockEdge(), m_cur_in_port, and m_waiting_buffers.
|
protected |
Definition at line 154 of file AbstractController.hh.
Referenced by blockOnQueue(), isBlocked(), and unblock().
|
protected |
Definition at line 165 of file AbstractController.hh.
|
protected |
Definition at line 147 of file AbstractController.hh.
|
protected |
Definition at line 162 of file AbstractController.hh.
Referenced by stallBuffer(), and wakeUpBuffers().
|
protected |
Histogram for profiling delay for the messages this controller cares for.
Definition at line 174 of file AbstractController.hh.
Referenced by getDelayHist(), init(), profileMsgDelay(), and resetStats().
|
protected |
Definition at line 175 of file AbstractController.hh.
Referenced by getDelayVCHist(), init(), profileMsgDelay(), and resetStats().
|
protected |
Counter for the number of cycles when the transitions carried out were equal to the maximum allowed.
Definition at line 170 of file AbstractController.hh.
Referenced by regStats().
|
protected |
Definition at line 161 of file AbstractController.hh.
Referenced by stallBuffer(), and wakeUpAllBuffers().
|
protected |
Definition at line 153 of file AbstractController.hh.
Referenced by blockOnQueue(), isBlocked(), and unblock().
|
protected |
Definition at line 146 of file AbstractController.hh.
Referenced by getMachineID(), getType(), getVersion(), and recvTimingResp().
|
protected |
Definition at line 150 of file AbstractController.hh.
Referenced by queueMemoryRead(), queueMemoryWrite(), and queueMemoryWritePartial().
|
protected |
Definition at line 152 of file AbstractController.hh.
Referenced by initNetworkPtr().
|
protected |
Definition at line 163 of file AbstractController.hh.
|
protected |
Definition at line 166 of file AbstractController.hh.
|
protected |
Definition at line 164 of file AbstractController.hh.
|
protected |
Definition at line 145 of file AbstractController.hh.
Referenced by AbstractController().
|
protected |
Definition at line 159 of file AbstractController.hh.
Referenced by stallBuffer(), wakeUpAllBuffers(), and wakeUpBuffers().
|
protected |
Definition at line 215 of file AbstractController.hh.
Referenced by functionalMemoryRead(), functionalMemoryWrite(), getMasterPort(), queueMemoryRead(), queueMemoryWrite(), and queueMemoryWritePartial().