gem5 v24.0.0.0
|
#include <RubySystem.hh>
Public Member Functions | |
PARAMS (RubySystem) | |
RubySystem (const Params &p) | |
~RubySystem () | |
memory::SimpleMemory * | getPhysMem () |
Cycles | getStartCycle () |
bool | getAccessBackingStore () |
Profiler * | getProfiler () |
void | regStats () override |
Callback to set stat parameters. | |
void | collateStats () |
void | resetStats () override |
Callback to reset stats. | |
void | memWriteback () override |
Write back dirty buffers to memory using functional writes. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
void | drainResume () override |
Resume execution after a successful drain. | |
void | process () |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. | |
void | startup () override |
startup() is the final initialization call before simulation. | |
bool | functionalRead (Packet *ptr) |
bool | functionalWrite (Packet *ptr) |
void | registerNetwork (Network *) |
void | registerAbstractController (AbstractController *) |
void | registerMachineID (const MachineID &mach_id, Network *network) |
void | registerRequestorIDs () |
bool | eventQueueEmpty () |
void | enqueueRubyEvent (Tick tick) |
Public Member Functions inherited from gem5::ClockedObject | |
ClockedObject (const ClockedObjectParams &p) | |
Public Member Functions inherited from gem5::SimObject | |
const Params & | params () const |
SimObject (const Params &p) | |
virtual | ~SimObject () |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual void | regProbePoints () |
Register probe points for this object. | |
virtual void | regProbeListeners () |
Register probe listeners for this object. | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. | |
virtual Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a port with a given name and index. | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
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) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. | |
virtual | ~Group () |
virtual void | preDumpStats () |
Callback before stats are dumped. | |
void | addStat (statistics::Info *info) |
Register a stat with this group. | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Public Member Functions inherited from gem5::Clocked | |
void | updateClockPeriod () |
Update the tick to the current tick. | |
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. | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. | |
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. | |
uint64_t | frequency () const |
Tick | clockPeriod () const |
double | voltage () const |
Cycles | ticksToCycles (Tick t) const |
Tick | cyclesToTicks (Cycles c) const |
Static Public Member Functions | |
static int | getRandomization () |
static uint32_t | getBlockSizeBytes () |
static uint32_t | getBlockSizeBits () |
static uint32_t | getMemorySizeBits () |
static bool | getWarmupEnabled () |
static bool | getCooldownEnabled () |
Static Public Member Functions inherited from gem5::SimObject | |
static void | serializeAll (const std::string &cpt_dir) |
Create a checkpoint by serializing all SimObjects in the system. | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. | |
static void | setSimObjectResolver (SimObjectResolver *resolver) |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
static SimObjectResolver * | getSimObjectResolver () |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Public Attributes | |
Profiler * | m_profiler |
CacheRecorder * | m_cache_recorder |
std::vector< std::map< uint32_t, AbstractController * > > | m_abstract_controls |
Public Attributes inherited from gem5::ClockedObject | |
PowerState * | powerState |
Private Member Functions | |
RubySystem (const RubySystem &obj) | |
RubySystem & | operator= (const RubySystem &obj) |
void | makeCacheRecorder (uint8_t *uncompressed_trace, uint64_t cache_trace_size, uint64_t block_size_bytes) |
void | processRubyEvent () |
Static Private Member Functions | |
static void | readCompressedTrace (std::string filename, uint8_t *&raw_data, uint64_t &uncompressed_trace_size) |
static void | writeCompressedTrace (uint8_t *raw_data, std::string file, uint64_t uncompressed_trace_size) |
Private Attributes | |
memory::SimpleMemory * | m_phys_mem |
const bool | m_access_backing_store |
std::vector< std::unique_ptr< Network > > | m_networks |
std::vector< AbstractController * > | m_abs_cntrl_vec |
Cycles | m_start_cycle |
std::unordered_map< MachineID, unsigned > | machineToNetwork |
std::unordered_map< RequestorID, unsigned > | requestorToNetwork |
std::unordered_map< unsigned, std::vector< AbstractController * > > | netCntrls |
Static Private Attributes | |
static bool | m_randomization |
static uint32_t | m_block_size_bytes |
static uint32_t | m_block_size_bits |
static uint32_t | m_memory_size_bits |
static bool | m_warmup_enabled = false |
static unsigned | m_systems_to_warmup = 0 |
static bool | m_cooldown_enabled = false |
Additional Inherited Members | |
Public Types inherited from gem5::ClockedObject | |
using | Params = ClockedObjectParams |
Parameters of ClockedObject. | |
Public Types inherited from gem5::SimObject | |
typedef SimObjectParams | Params |
Protected Member Functions inherited from gem5::Drainable | |
Drainable () | |
virtual | ~Drainable () |
void | signalDrainDone () const |
Signal that an object is drained. | |
Protected Member Functions inherited from gem5::Clocked | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. | |
void | resetClock () const |
Reset the object's clock using the current global tick value. | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. | |
Protected Attributes inherited from gem5::SimObject | |
const SimObjectParams & | _params |
Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. | |
Definition at line 63 of file RubySystem.hh.
gem5::ruby::RubySystem::RubySystem | ( | const Params & | p | ) |
Definition at line 79 of file RubySystem.cc.
References collateStats(), gem5::floorLog2(), gem5::isPowerOf2(), m_abstract_controls, m_block_size_bits, m_block_size_bytes, m_memory_size_bits, m_phys_mem, m_profiler, m_randomization, gem5::MipsISA::p, and gem5::statistics::registerDumpCallback().
gem5::ruby::RubySystem::~RubySystem | ( | ) |
Definition at line 170 of file RubySystem.cc.
References m_profiler.
|
private |
|
inline |
Definition at line 93 of file RubySystem.hh.
References gem5::ruby::Profiler::collateStats(), and m_profiler.
Referenced by RubySystem().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from gem5::Drainable.
Definition at line 357 of file RubySystem.cc.
References m_cache_recorder.
|
inline |
Definition at line 112 of file RubySystem.hh.
References gem5::ArmISA::e, processRubyEvent(), gem5::EventManager::schedule(), and gem5::Clocked::tick.
Referenced by memWriteback(), and startup().
|
inline |
Definition at line 111 of file RubySystem.hh.
References gem5::EventQueue::empty(), and gem5::EventManager::eventq.
bool gem5::ruby::RubySystem::functionalRead | ( | Packet * | ptr | ) |
Definition at line 509 of file RubySystem.cc.
References DPRINTF, gem5::ruby::AbstractController::functionalRead(), gem5::Packet::getAddr(), m_networks, gem5::ruby::makeLineAddress(), netCntrls, gem5::Packet::requestorId(), requestorToNetwork, and warn.
bool gem5::ruby::RubySystem::functionalWrite | ( | Packet * | ptr | ) |
Definition at line 726 of file RubySystem.cc.
References gem5::X86ISA::addr, DPRINTF, gem5::Packet::getAddr(), m_networks, gem5::ruby::makeLineAddress(), netCntrls, gem5::Packet::requestorId(), and requestorToNetwork.
|
inline |
Definition at line 80 of file RubySystem.hh.
References m_access_backing_store.
|
inlinestatic |
Definition at line 73 of file RubySystem.hh.
References m_block_size_bits.
Referenced by gem5::ruby::Sequencer::getCurrentUnaddressedTransactionID(), gem5::ruby::getOffset(), gem5::ruby::Sequencer::incrementUnaddressedTransactionCnt(), gem5::ruby::DMASequencer::init(), gem5::ruby::makeLineAddress(), gem5::ruby::DirectoryMemory::mapAddressToLocalIdx(), and gem5::ruby::PrefetchEntry::PrefetchEntry().
|
inlinestatic |
Definition at line 72 of file RubySystem.hh.
References m_block_size_bytes.
Referenced by gem5::ruby::RubyPrefetcher::accessNonunitFilter(), gem5::ruby::DataBlock::alloc(), gem5::ruby::DataBlock::atomicPartial(), gem5::ruby::CacheRecorder::CacheRecorder(), gem5::ruby::DataBlock::clear(), gem5::ruby::DataBlock::copyPartial(), gem5::ruby::DataBlock::DataBlock(), gem5::ruby::CacheRecorder::enqueueNextFetchRequest(), gem5::ruby::DataBlock::equal(), gem5::ruby::DataBlock::getData(), gem5::ruby::CacheMemory::init(), gem5::ruby::DirectoryMemory::init(), gem5::ruby::DMASequencer::issueNext(), gem5::ruby::RubyPrefetcherProxy::issuePrefetch(), gem5::ruby::VIPERCoalescer::issueRequest(), gem5::ruby::makeNextStrideAddress(), gem5::ruby::DMASequencer::makeRequest(), memWriteback(), gem5::ruby::DataBlock::operator=(), gem5::ruby::DataBlock::print(), gem5::ruby::RubyPort::MemResponsePort::recvAtomic(), gem5::ruby::RubyPort::MemResponsePort::recvFunctional(), gem5::ruby::AbstractController::recvTimingResp(), gem5::ruby::RubyPort::ruby_eviction_callback(), gem5::ruby::RubyPort::ruby_stale_translation_callback(), serialize(), gem5::ruby::AbstractController::serviceMemoryQueue(), gem5::ruby::DataBlock::setData(), and unserialize().
|
inlinestatic |
Definition at line 76 of file RubySystem.hh.
References m_cooldown_enabled.
Referenced by gem5::ruby::GPUCoalescer::completeHitCallback(), gem5::ruby::Sequencer::completeHitCallback(), gem5::ruby::GPUCoalescer::hitCallback(), gem5::ruby::Sequencer::hitCallback(), gem5::ruby::GPUCoalescer::makeRequest(), processRubyEvent(), and gem5::ruby::UncoalescedTable::updateResources().
|
inlinestatic |
Definition at line 74 of file RubySystem.hh.
References m_memory_size_bits.
|
inline |
Definition at line 78 of file RubySystem.hh.
References m_phys_mem.
Referenced by gem5::ruby::RubyPort::MemResponsePort::hitCallback().
|
inline |
Definition at line 84 of file RubySystem.hh.
References m_profiler.
|
inlinestatic |
Definition at line 71 of file RubySystem.hh.
References m_randomization.
Referenced by gem5::ruby::MessageBuffer::enqueue().
|
inline |
Definition at line 79 of file RubySystem.hh.
References m_start_cycle.
|
inlinestatic |
Definition at line 75 of file RubySystem.hh.
References m_warmup_enabled.
Referenced by gem5::ruby::GPUCoalescer::completeHitCallback(), gem5::ruby::Sequencer::completeHitCallback(), gem5::ruby::MessageBuffer::enqueue(), gem5::ruby::Sequencer::hitCallback(), gem5::ruby::GPUCoalescer::makeRequest(), processRubyEvent(), gem5::ruby::AbstractController::serviceMemoryQueue(), and gem5::ruby::UncoalescedTable::updateResources().
|
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 gem5::SimObject.
Definition at line 426 of file RubySystem.cc.
References registerRequestorIDs().
|
private |
Definition at line 176 of file RubySystem.cc.
References m_abs_cntrl_vec, and m_cache_recorder.
Referenced by memWriteback(), and unserialize().
|
overridevirtual |
Write back dirty buffers to memory using functional writes.
After returning, an object implementing this method should have written all its dirty data back to memory. This method is typically used to prepare a system with caches for checkpointing.
Reimplemented from gem5::SimObject.
Definition at line 220 of file RubySystem.cc.
References gem5::curTick(), gem5::EventQueue::deschedule(), DPRINTF, gem5::EventQueue::empty(), enqueueRubyEvent(), gem5::MipsISA::event, gem5::EventManager::eventq, getBlockSizeBytes(), gem5::EventQueue::getHead(), gem5::ruby::CacheRecorder::getNumRecords(), gem5::Event::isAutoDelete(), m_abs_cntrl_vec, m_cache_recorder, m_cooldown_enabled, makeCacheRecorder(), gem5::Event::name(), gem5::EventQueue::schedule(), gem5::EventManager::setCurTick(), gem5::simulate(), warn_once, and gem5::Event::when().
|
private |
gem5::ruby::RubySystem::PARAMS | ( | RubySystem | ) |
void gem5::ruby::RubySystem::process | ( | ) |
|
private |
Definition at line 488 of file RubySystem.cc.
References gem5::ruby::CacheRecorder::enqueueNextFetchRequest(), gem5::ruby::CacheRecorder::enqueueNextFlushRequest(), getCooldownEnabled(), getWarmupEnabled(), and m_cache_recorder.
Referenced by enqueueRubyEvent().
|
staticprivate |
Definition at line 368 of file RubySystem.cc.
References fatal, and gem5::ArmISA::fd.
Referenced by unserialize().
void gem5::ruby::RubySystem::registerAbstractController | ( | AbstractController * | cntrl | ) |
Definition at line 107 of file RubySystem.cc.
References gem5::ruby::AbstractController::getMachineID(), m_abs_cntrl_vec, and m_abstract_controls.
Definition at line 116 of file RubySystem.cc.
References fatal_if, m_networks, gem5::ruby::MachineIDToString(), and machineToNetwork.
void gem5::ruby::RubySystem::registerNetwork | ( | Network * | network_ptr | ) |
Definition at line 101 of file RubySystem.cc.
References m_networks.
void gem5::ruby::RubySystem::registerRequestorIDs | ( | ) |
Definition at line 136 of file RubySystem.cc.
References fatal_if, gem5::ArmISA::id, m_abs_cntrl_vec, gem5::ruby::MachineIDToString(), machineToNetwork, netCntrls, gem5::SimObject::params(), and requestorToNetwork.
Referenced by init().
|
inlineoverridevirtual |
Callback to set stat parameters.
This callback is typically used for complex stats (e.g., distributions) that need parameters in addition to a name and a description. Stat names and descriptions should typically be set from the constructor usingo from the constructor using the ADD_STAT macro.
Reimplemented from gem5::statistics::Group.
Definition at line 90 of file RubySystem.hh.
References gem5::statistics::Group::regStats().
|
overridevirtual |
Callback to reset stats.
Reimplemented from gem5::statistics::Group.
Definition at line 498 of file RubySystem.cc.
References gem5::Clocked::curCycle(), m_networks, m_start_cycle, and gem5::statistics::Group::resetStats().
Referenced by startup().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::ClockedObject.
Definition at line 329 of file RubySystem.cc.
References gem5::ruby::CacheRecorder::aggregateRecords(), fatal, getBlockSizeBytes(), m_cache_recorder, gem5::Named::name(), SERIALIZE_SCALAR, and writeCompressedTrace().
|
overridevirtual |
startup() is the final initialization call before simulation.
All state is initialized (including unserialized state, if any, such as the curTick() value), so this is the appropriate place to schedule initial event(s) for objects that need them.
Reimplemented from gem5::SimObject.
Definition at line 432 of file RubySystem.cc.
References gem5::curTick(), DPRINTF, enqueueRubyEvent(), gem5::EventManager::eventq, m_cache_recorder, m_systems_to_warmup, m_warmup_enabled, gem5::EventQueue::replaceHead(), gem5::Clocked::resetClock(), resetStats(), gem5::EventManager::setCurTick(), gem5::simulate(), and gem5::simulate_limit_event.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::ClockedObject.
Definition at line 399 of file RubySystem.cc.
References getBlockSizeBytes(), gem5::CheckpointIn::getCptDir(), m_systems_to_warmup, m_warmup_enabled, makeCacheRecorder(), readCompressedTrace(), UNSERIALIZE_OPT_SCALAR, and UNSERIALIZE_SCALAR.
|
staticprivate |
Definition at line 300 of file RubySystem.cc.
References gem5::CheckpointIn::dir(), fatal, and gem5::ArmISA::fd.
Referenced by serialize().
|
private |
Definition at line 150 of file RubySystem.hh.
Referenced by makeCacheRecorder(), memWriteback(), registerAbstractController(), and registerRequestorIDs().
std::vector<std::map<uint32_t, AbstractController *> > gem5::ruby::RubySystem::m_abstract_controls |
Definition at line 160 of file RubySystem.hh.
Referenced by gem5::ruby::Profiler::collateStats(), registerAbstractController(), and RubySystem().
|
private |
Definition at line 146 of file RubySystem.hh.
Referenced by getAccessBackingStore().
|
staticprivate |
Definition at line 139 of file RubySystem.hh.
Referenced by getBlockSizeBits(), and RubySystem().
|
staticprivate |
Definition at line 138 of file RubySystem.hh.
Referenced by getBlockSizeBytes(), and RubySystem().
CacheRecorder* gem5::ruby::RubySystem::m_cache_recorder |
Definition at line 159 of file RubySystem.hh.
Referenced by gem5::ruby::GPUCoalescer::completeHitCallback(), gem5::ruby::Sequencer::completeHitCallback(), drainResume(), makeCacheRecorder(), memWriteback(), processRubyEvent(), serialize(), and startup().
|
staticprivate |
Definition at line 144 of file RubySystem.hh.
Referenced by getCooldownEnabled(), and memWriteback().
|
staticprivate |
Definition at line 140 of file RubySystem.hh.
Referenced by getMemorySizeBits(), and RubySystem().
|
private |
Definition at line 149 of file RubySystem.hh.
Referenced by functionalRead(), functionalWrite(), registerMachineID(), registerNetwork(), and resetStats().
|
private |
Definition at line 145 of file RubySystem.hh.
Referenced by getPhysMem(), and RubySystem().
Profiler* gem5::ruby::RubySystem::m_profiler |
Definition at line 158 of file RubySystem.hh.
Referenced by collateStats(), getProfiler(), RubySystem(), and ~RubySystem().
|
staticprivate |
Definition at line 137 of file RubySystem.hh.
Referenced by getRandomization(), and RubySystem().
|
private |
Definition at line 151 of file RubySystem.hh.
Referenced by getStartCycle(), and resetStats().
|
staticprivate |
Definition at line 143 of file RubySystem.hh.
Referenced by startup(), and unserialize().
|
staticprivate |
Definition at line 142 of file RubySystem.hh.
Referenced by getWarmupEnabled(), startup(), and unserialize().
|
private |
Definition at line 153 of file RubySystem.hh.
Referenced by registerMachineID(), and registerRequestorIDs().
|
private |
Definition at line 155 of file RubySystem.hh.
Referenced by functionalRead(), functionalWrite(), and registerRequestorIDs().
|
private |
Definition at line 154 of file RubySystem.hh.
Referenced by functionalRead(), functionalWrite(), and registerRequestorIDs().