gem5
v20.1.0.0
|
These methods relate to the SimObject interface. More...
Functions | |
const Params * | SimObject::params () const |
SimObject::SimObject (const Params *_params) | |
virtual const std::string | SimObject::name () const |
virtual void | SimObject::init () |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
virtual void | SimObject::regProbePoints () |
Register probe points for this object. More... | |
virtual void | SimObject::regProbeListeners () |
Register probe listeners for this object. More... | |
ProbeManager * | SimObject::getProbeManager () |
Get the probe manager for this object. More... | |
virtual Port & | SimObject::getPort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a port with a given name and index. More... | |
virtual void | SimObject::startup () |
startup() is the final initialization call before simulation. More... | |
virtual void | SimObject::memWriteback () |
Write back dirty buffers to memory using functional writes. More... | |
virtual void | SimObject::memInvalidate () |
Invalidate the contents of memory buffers. More... | |
static SimObject * | SimObject::find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
Variables | |
const SimObjectParams * | SimObject::_params |
Cached copy of the object parameters. More... | |
These methods relate to the SimObject interface.
|
static |
Find the SimObject with the given name and return a pointer to it.
Primarily used for interactive debugging. Argument is char* rather than std::string to make it callable from gdb.
Definition at line 171 of file sim_object.cc.
References ArmISA::i, SimObject::name(), and SimObject::simObjectList.
Referenced by LdsState::getLdsChunk(), LdsState::releaseSpace(), and LdsState::reserveSpace().
|
virtual |
Get a port with a given name and index.
This is used at binding time and returns a reference to a protocol-agnostic port.
gem5 has a request and response port interface. All memory objects are connected together via ports. These ports provide a rigid interface between these memory objects. These ports implement three different memory system modes: timing, atomic, and functional. The most important mode is the timing mode and here timing mode is used for conducting cycle-level timing experiments. The other modes are only used in special circumstances and should not be used to conduct cycle-level timing experiments. The other modes are only used in special circumstances. These ports allow SimObjects to communicate with each other.
if_name | Port name |
idx | Index in the case of a VectorPort |
Reimplemented in SMMUv3, SMMUv3DeviceInterface, QoS::MemSinkCtrl, BaseCache, ArmISA::TableWalker, MemCtrl, IGbE, BaseXBar, NSGigE, SimpleCache, Bridge, X86ISA::GpuTLB, SimpleMemobj, BaseTrafficGen, System, Sinic::Device, X86ISA::Interrupts, GPUCoalescer, DistEtherLink, DmaDevice, DRAMsim3, TLBCoalescer, DRAMSim2, SimpleMemory, X86ISA::Walker, CopyEngine, RiscvISA::Walker, EtherLink, RubyPort, PioDevice, X86ISA::I8042, ExternalSlave, FastModel::GIC, ExternalMaster, FastModel::CortexA76Cluster, X86ISA::I82094AA, EtherTapBase, RubyTester, X86ISA::I8259, X86ISA::Cmos, CommMonitor, MemTest, EtherBus, X86ISA::I8254, RubyDirectedTester, MemDelay, MemCheckerMonitor, GarnetSyntheticTraffic, AddrMapper, EtherSwitch, SerialLink, AbstractController, ComputeUnit, Gicv3Its, LdsState, MessageBuffer, and Network.
Definition at line 123 of file sim_object.cc.
References fatal, and SimObject::name().
Referenced by CxxConfigManager::bindPort(), EtherSwitch::getPort(), AddrMapper::getPort(), GarnetSyntheticTraffic::getPort(), MemCheckerMonitor::getPort(), MemDelay::getPort(), RubyDirectedTester::getPort(), MemTest::getPort(), CommMonitor::getPort(), RubyTester::getPort(), EtherTapBase::getPort(), FastModel::CortexA76Cluster::getPort(), SMMUv3DeviceInterface::getPort(), ExternalMaster::getPort(), ExternalSlave::getPort(), PioDevice::getPort(), QoS::MemSinkCtrl::getPort(), EtherLink::getPort(), RubyPort::getPort(), RiscvISA::Walker::getPort(), X86ISA::Walker::getPort(), SimpleMemory::getPort(), SMMUv3::getPort(), DRAMSim2::getPort(), BaseCPU::getPort(), DRAMsim3::getPort(), DistEtherLink::getPort(), X86ISA::Interrupts::getPort(), BaseTrafficGen::getPort(), SimpleMemobj::getPort(), SerialLink::getPort(), Bridge::getPort(), SimpleCache::getPort(), BaseXBar::getPort(), MemCtrl::getPort(), ArmISA::TableWalker::getPort(), ComputeUnit::getPort(), and BaseCache::getPort().
ProbeManager * SimObject::getProbeManager | ( | ) |
Get the probe manager for this object.
Probes generate traces. A trace is a file that keeps a log of events. For example, we can have a probe listener for an address and the trace will be a file that has time stamps for all the reads and writes to that address.
Definition at line 117 of file sim_object.cc.
References SimObject::probeManager.
Referenced by Prefetcher::Base::addEventProbe(), Prefetcher::PIF::addEventProbeRetiredInsts(), BPredUnit::pmuProbePoint(), Prefetcher::Base::regProbeListeners(), CommMonitor::regProbePoints(), PowerModel::regProbePoints(), ArmISA::TLB::regProbePoints(), BaseCache::regProbePoints(), and ThermalDomain::setSubSystem().
|
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 in NVMInterface, BaseCache, MultiperspectivePerceptron, ArmISA::TableWalker, DRAMInterface, MemCtrl, IGbE, ComputeUnit, Bridge, StatisticalCorrector, LoopPredictor, BaseTrafficGen, System, DistEtherLink, MultiperspectivePerceptronTAGE, ArmISA::TLB, X86ISA::Interrupts, DRAMsim3, DmaDevice, DRAMSim2, SimpleMemory, CpuLocalTimer, SMMUv3, RubyPort, QoS::MemSinkCtrl, PioDevice, ExternalSlave, EnergyCtrl, ExternalMaster, TrafficGen, Gicv3, RubyTester, X86ISA::I82094AA, RubySystem, FVPBasePwrCtrl, Network, CommMonitor, RubyDirectedTester, Process, MemCheckerMonitor, LTAGE, BaseGic, MemDelay, QoS::Policy, AddrMapper, TAGEBase, QoS::FixedPriorityPolicy, DMASequencer, GarnetSyntheticTraffic, Pc, NoMaliGpu, sc_gem5::Kernel, X86ISA::I8259, CoherentXBar, SerialLink, Wavefront, Shader, GarnetExtLink, AbstractController, SimPoint, RubyPortProxy, CacheMemory, Router, Switch, DirectoryMemory, WireBuffer, GarnetNetwork, BasicLink, EtherDump, GarnetIntLink, SimpleNetwork, and BasicRouter.
Definition at line 73 of file sim_object.cc.
Referenced by LTAGE::init(), QoS::MemSinkCtrl::init(), SimpleMemory::init(), DRAMSim2::init(), DRAMsim3::init(), BaseTrafficGen::init(), CoherentXBar::init(), DRAMInterface::init(), NVMInterface::init(), and CxxConfigManager::instantiate().
|
inlinevirtual |
Invalidate the contents of memory buffers.
When the switching to hardware virtualized CPU models, we need to make sure that we don't have any cached state in the system that might become stale when we return. This method is used to flush all such state back to main memory.
@warn This does not cause any dirty state to be written back to memory.
Reimplemented in BaseCache, and BaseTLB.
Definition at line 262 of file sim_object.hh.
|
inlinevirtual |
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 in BaseCache, and RubySystem.
Definition at line 247 of file sim_object.hh.
|
inlinevirtual |
Reimplemented in ElasticTrace, and SimpleTrace.
Definition at line 133 of file sim_object.hh.
References SimObject::params().
Referenced by System::_getRequestorId(), Terminal::accept(), VncServer::accept(), Cache::access(), BaseCache::access(), ArmISA::PMU::addEventProbe(), Prefetcher::Base::addEventProbe(), Prefetcher::PIF::addEventProbeRetiredInsts(), PowerDomain::addFollower(), NetworkInterface::addInPort(), Router::addInPort(), ProbeManager::addListener(), ArmISA::PMU::RegularEvent::addMicroarchitectureProbe(), NetworkInterface::addOutPort(), ProbeManager::addPoint(), HSADriver::allocateQueue(), SMMUv3DeviceInterface::atsRecvAtomic(), SMMUv3DeviceInterface::atsRecvTimingReq(), CxxConfigManager::bindPort(), CxxConfigManager::bindRequestPort(), NetworkInterface::calculateVC(), Trace::X86NativeTrace::checkR11Reg(), Trace::X86NativeTrace::checkRcxReg(), DVFSHandler::clkPeriodAtPerfLevel(), SrcClockDomain::clockPeriod(), RealViewOsc::clockPeriod(), CoherentXBar::CoherentXBar(), MemTest::completeRequest(), GenericTimer::CoreTimers::CoreTimers(), Sinic::Base::cpuIntrPost(), NSGigE::cpuIntrPost(), OutputUnit::decrement_credit(), DistEtherLink::DistEtherLink(), Pl111::dmaDone(), FUPool::dump(), IdeController::EndBitUnion(), MessageBuffer::enqueue(), EtherLink::EtherLink(), EtherSwitch::EtherSwitch(), X86ISA::GpuTLB::exitCallback(), ComputeUnit::exitCallback(), SimObject::find(), BaseXBar::findPort(), BaseCache::functionalAccess(), GicV2::getCpuTarget(), SMMUv3DeviceInterface::getPort(), FastModel::GIC::getPort(), SMMUv3::getPort(), SimObject::getPort(), MathExprPowerModel::getStatValue(), ArmSemihosting::getSTDIO(), BaseCache::handleFill(), SimpleCache::handleRequest(), Cache::handleSnoop(), X86ISA::I8042::I8042(), X86ISA::I82094AA::I82094AA(), X86ISA::I8254::I8254(), X86ISA::I8259::I8259(), OutputUnit::increment_credit(), InputUnit::increment_credit(), ExternalMaster::init(), ExternalSlave::init(), PioDevice::init(), CpuLocalTimer::init(), DRAMSim2::init(), DmaDevice::init(), DRAMsim3::init(), System::init(), BaseTrafficGen::init(), CoherentXBar::init(), MemCtrl::init(), DRAMInterface::init(), BaseCache::init(), Process::initState(), AbstractMemory::initState(), System::leafRequestorName(), Terminal::listen(), VncServer::listen(), SimObject::loadState(), System::lookupRequestorId(), GarnetNetwork::makeExtInLink(), GarnetNetwork::makeExtOutLink(), GarnetNetwork::makeInternalLink(), MemTraceProbe::MemTraceProbe(), SMMUDeviceRetryEvent::name(), SimpleTrace::name(), CopyEngine::CopyEngineChannel::name(), ElasticTrace::name(), VirtIOConsole::TermRecvQueue::name(), RiscvISA::Walker::WalkerState::name(), X86ISA::Walker::WalkerState::name(), VirtIOConsole::TermTransQueue::name(), BaseRemoteGDB::name(), VirtIO9PBase::FSQueue::name(), VirtIOBlock::RequestQueue::name(), ItsProcess::name(), ArmISA::TableWalker::WalkerState::name(), NoncoherentXBar::NoncoherentXBar(), BaseTrafficGen::noProgress(), MemTest::noRequest(), MemTest::noResponse(), TrafficGen::parseConfig(), VoltageDomain::perfLevel(), SrcClockDomain::perfLevel(), BPredUnit::pmuProbePoint(), PowerDomain::PowerDomain(), BasicRouter::print(), SimpleExtLink::print(), GarnetIntLink::print(), BasicLink::print(), SimpleIntLink::print(), GarnetExtLink::print(), RubyPrefetcher::print(), CacheMemory::print(), MessageBuffer::print(), System::printSystems(), TLBCoalescer::processProbeTLBEvent(), PowerDomain::pwrStateChangeCallback(), HDLcd::pxlFrameDone(), AmbaFake::read(), IsaFake::read(), UFSHostDevice::readCallback(), PciDevice::readConfig(), UFSHostDevice::readDevice(), IdeDisk::readDisk(), CacheMemory::recordCacheContents(), SMMUv3DeviceInterface::recvAtomic(), NoncoherentXBar::recvAtomicBackdoor(), CoherentXBar::recvAtomicBackdoor(), CoherentXBar::recvAtomicSnoop(), NoncoherentXBar::recvFunctional(), SimpleMemory::recvFunctional(), SerialLink::SerialLinkResponsePort::recvFunctional(), DRAMSim2::recvFunctional(), Bridge::BridgeResponsePort::recvFunctional(), DRAMsim3::recvFunctional(), QoS::MemSinkCtrl::recvFunctional(), CoherentXBar::recvFunctional(), CoherentXBar::recvFunctionalSnoop(), EtherSwitch::Interface::recvPacket(), BaseXBar::recvRangeChange(), SMMUv3DeviceInterface::recvTimingReq(), CoherentXBar::recvTimingReq(), MemCheckerMonitor::recvTimingResp(), AddrMapper::recvTimingResp(), BaseCache::recvTimingResp(), CoherentXBar::recvTimingSnoopReq(), HWScheduler::registerNewQueue(), StackDistProbe::regStats(), SimpleNetwork::regStats(), MemFootprintProbe::regStats(), EtherDevice::regStats(), RegisterFile::regStats(), HTMSequencer::regStats(), GPUDispatcher::regStats(), Switch::regStats(), Compressor::BaseDictionaryCompressor::DictionaryStats::regStats(), RubySystem::regStats(), PowerModelState::regStats(), ThermalDomain::regStats(), HDLcd::regStats(), AbstractController::regStats(), GarnetNetwork::regStats(), Process::regStats(), Router::regStats(), RubyPrefetcher::regStats(), QoS::MemCtrl::MemCtrlStats::regStats(), TLBCoalescer::regStats(), PowerModel::regStats(), CacheMemory::regStats(), FlashDevice::regStats(), MessageBuffer::regStats(), CopyEngine::regStats(), FALRU::regStats(), SMMUv3::regStats(), SnoopFilter::regStats(), X86ISA::GpuTLB::regStats(), QoS::MemSinkCtrl::regStats(), Shader::regStats(), IdeDisk::regStats(), Sinic::Device::regStats(), Wavefront::regStats(), FALRU::CacheTracking::regStats(), BaseXBar::regStats(), System::regStats(), ComputeUnit::regStats(), UFSHostDevice::regStats(), ProbeManager::removeListener(), UFSHostDevice::requestHandler(), TrafficGen::resolveFile(), RubyPort::RubyPort(), VoltageDomain::sanitiseVoltages(), NetworkInterface::scheduleFlit(), RubySystem::serialize(), CowDiskImage::serialize(), BaseTrafficGen::serialize(), SimObject::serializeAll(), Cache::serviceMSHRTargets(), PowerState::set(), PowerState::setControlledDomain(), WireBuffer::setDescription(), PowerDomain::setFollowerPowerStates(), LdsState::setParent(), ArmISA::TLB::setTestInterface(), SimpleCache::SimpleCache(), SrcClockDomain::SrcClockDomain(), MemTraceProbe::startup(), PowerDomain::startup(), VoltageDomain::startup(), ArmISA::FsLinux::startup(), System::stripSystemName(), HSADevice::submitDispatchPkt(), HSADevice::submitVendorPkt(), GarnetSyntheticTraffic::tick(), MemTest::tick(), Prefetcher::Queued::translationComplete(), DrainManager::tryDrain(), RubyPort::trySendRetries(), Sinic::Base::unserialize(), BaseTrafficGen::unserialize(), NSGigE::unserialize(), BaseTrafficGen::update(), DerivedClockDomain::updateClockPeriod(), VncInput::VncInput(), VoltageDomain::voltage(), DVFSHandler::voltageAtPerfLevel(), VoltageDomain::VoltageDomain(), InputUnit::wakeup(), NetworkLink::wakeup(), AmbaFake::write(), IsaFake::write(), PciDevice::writeConfig(), UFSHostDevice::writeDevice(), and IdeDisk::writeDisk().
|
inline |
Definition at line 119 of file sim_object.hh.
References SimObject::_params.
Referenced by ArmProcess::ArmProcess(), BPredUnit::BPredUnit(), VirtIO9PSocket::connectSocket(), MultiperspectivePerceptron::init(), KvmVM::KvmVM(), MipsProcess::MipsProcess(), SimObject::name(), RawDiskImage::notifyFork(), CowDiskImage::notifyFork(), PowerProcess::PowerProcess(), Process::Process(), BaseMemProbe::regProbeListeners(), StackDistProbe::regStats(), PowerModelState::regStats(), ThermalDomain::regStats(), PowerModel::regStats(), RiscvProcess::RiscvProcess(), ArmISA::PMU::setThreadContext(), SimpleIndirectPredictor::SimpleIndirectPredictor(), SparcProcess::SparcProcess(), VirtIO9PDiod::startDiod(), and VirtIO9PBase::VirtIO9PBase().
|
virtual |
Register probe listeners for this object.
No probe listeners by default, so do nothing in base.
Reimplemented in Prefetcher::Base, ArmISA::PMU, BaseMemProbe, ElasticTrace, SimPoint, and SimpleTrace.
Definition at line 112 of file sim_object.cc.
Referenced by CxxConfigManager::instantiate().
|
virtual |
Register probe points for this object.
No probe points by default, so do nothing in base.
Reimplemented in BaseCache, ArmISA::TLB, CommMonitor, BPredUnit, and PowerModel.
Definition at line 104 of file sim_object.cc.
Referenced by CxxConfigManager::instantiate().
SimObject::SimObject | ( | const Params * | _params | ) |
Definition at line 55 of file sim_object.cc.
References SimObject::probeManager, and SimObject::simObjectList.
|
virtual |
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 in DRAMInterface, ArmISA::ISA, MemCtrl, SrcClockDomain, System, DistEtherLink, RealViewOsc, DRAMsim3, DRAMSim2, Prefetcher::AccessMapPatternMatching, MuxingKvmGic, ThermalModel, MaltaIO, EnergyCtrl, X86ISA::I8254, ArmISA::FsLinux, VoltageDomain, Root, X86ISA::Cmos, RubySystem, MathExprPowerModel, CommMonitor, PowerDomain, MemTraceProbe, sc_gem5::Kernel, VirtIO9PSocket, VirtIO9PDiod, and HelloObject.
Definition at line 96 of file sim_object.cc.
Referenced by ArmISA::FsLinux::startup(), MuxingKvmGic::startup(), System::startup(), CxxConfigManager::startup(), and ArmISA::ISA::startup().
|
protected |
Cached copy of the object parameters.
Definition at line 110 of file sim_object.hh.
Referenced by GenericTimer::createTimers(), ArmPPIGen::get(), Iris::Interrupts::params(), BasicRouter::params(), SimpleExtLink::params(), PowerISA::Interrupts::params(), X86ISA::I8237::params(), BasicLink::params(), BaseInterrupts::params(), MipsISA::Interrupts::params(), EtherDevice::params(), MmDisk::params(), MemCheckerMonitor::params(), BadDevice::params(), EtherSwitch::params(), DumbTOD::params(), FaultModel::params(), RubySystem::params(), Uart::params(), X86ISA::Speaker::params(), IsaFake::params(), AmbaFake::params(), SouthBridge::params(), QoS::PropFairPolicy::params(), EtherBus::params(), RiscvISA::Interrupts::params(), X86ISA::ISA::params(), EtherTapBase::params(), SimpleIntLink::params(), CommMonitor::params(), SparcISA::Interrupts::params(), PowerState::params(), RealView::params(), BaseGic::params(), BasicExtLink::params(), ArmISA::Interrupts::params(), AbstractController::params(), Sinic::Base::params(), Network::params(), X86ISA::I8254::params(), MaltaCChip::params(), Uart8250::params(), BasicIntLink::params(), X86ISA::I8259::params(), X86ISA::I82094AA::params(), Root::params(), RiscvISA::ISA::params(), Trace::ArmNativeTrace::params(), PL031::params(), MaltaIO::params(), Gicv3::params(), SimObject::params(), X86ISA::I8042::params(), Iob::params(), SMMUv3DeviceInterface::params(), PowerISA::ISA::params(), MipsISA::ISA::params(), EtherDevBase::params(), Sp804::params(), PioDevice::params(), EtherTapStub::params(), IdeController::params(), A9GlobalTimer::params(), EtherLink::params(), CopyEngine::params(), RealViewCtrl::params(), CpuLocalTimer::params(), BasicPioDevice::params(), VGic::params(), RiscvISA::Walker::params(), X86ISA::Interrupts::params(), X86ISA::Walker::params(), DistEtherLink::params(), SparcISA::ISA::params(), ClockedObject::params(), AbstractMemory::params(), LdsState::params(), GenericTimer::params(), NSGigE::params(), Pl111::params(), ArmISA::TLB::params(), IGbE::params(), GicV2::params(), ArmISA::ISA::params(), and ArmISA::TableWalker::params().