gem5
v20.1.0.0
|
#include <inttypes.h>
#include <cassert>
#include <memory>
#include <ostream>
#include <stdexcept>
#include "base/refcnt.hh"
#include "enums/ByteOrder.hh"
Go to the source code of this file.
Classes | |
class | Cycles |
Cycles is a wrapper class for representing cycle counts, i.e. More... | |
Macros | |
#define | ULL(N) ((uint64_t)N##ULL) |
uint64_t constant More... | |
#define | LL(N) ((int64_t)N##LL) |
int64_t constant More... | |
Typedefs | |
typedef int64_t | Counter |
Statistics counter type. More... | |
typedef uint64_t | Tick |
Tick count type. More... | |
typedef uint64_t | Addr |
Address type This will probably be moved somewhere else in the near future. More... | |
typedef uint16_t | MicroPC |
typedef uint64_t | RegVal |
typedef int16_t | ThreadID |
Thread index/ID type. More... | |
typedef int | ContextID |
Globally unique thread context ID. More... | |
typedef int16_t | PortID |
Port index/ID type, and a symbolic name for an invalid port id. More... | |
typedef std::shared_ptr< FaultBase > | Fault |
Functions | |
static MicroPC | romMicroPC (MicroPC upc) |
static MicroPC | normalMicroPC (MicroPC upc) |
static bool | isRomMicroPC (MicroPC upc) |
static uint32_t | floatToBits32 (float val) |
static uint64_t | floatToBits64 (double val) |
static uint64_t | floatToBits (double val) |
static uint32_t | floatToBits (float val) |
static float | bitsToFloat32 (uint32_t val) |
static double | bitsToFloat64 (uint64_t val) |
static double | bitsToFloat (uint64_t val) |
static float | bitsToFloat (uint32_t val) |
Variables | |
const Tick | MaxTick = ULL(0xffffffffffffffff) |
static const MicroPC | MicroPCRomBit = 1 << (sizeof(MicroPC) * 8 - 1) |
const Addr | MaxAddr = (Addr)-1 |
const ThreadID | InvalidThreadID = (ThreadID)-1 |
const ContextID | InvalidContextID = (ContextID)-1 |
const PortID | InvalidPortID = (PortID)-1 |
constexpr decltype(nullptr) | NoFault = nullptr |
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
Definition in file types.hh.
typedef uint64_t Addr |
typedef int64_t Counter |
typedef int16_t PortID |
|
inlinestatic |
Definition at line 222 of file types.hh.
References bitsToFloat32(), and X86ISA::val.
|
inlinestatic |
Definition at line 221 of file types.hh.
References bitsToFloat64(), and X86ISA::val.
|
inlinestatic |
Definition at line 198 of file types.hh.
References ArmISA::f, ArmISA::i, ArmISA::u, and X86ISA::val.
Referenced by bitsToFloat(), GuestABI::Argument< Aapcs32, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >::get(), and Trace::TarmacTracerRecord::TraceRegEntry::updateFloat().
|
inlinestatic |
Definition at line 210 of file types.hh.
References ArmISA::f, ArmISA::i, ArmISA::u, and X86ISA::val.
Referenced by bitsToFloat(), GuestABI::Argument< Aapcs32, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >::get(), and updateKvmStateFPUCommon().
|
inlinestatic |
Definition at line 194 of file types.hh.
References floatToBits64(), and X86ISA::val.
Referenced by GuestABI::Result< Aapcs32, Float, typename std::enable_if< std::is_floating_point< Float >::value >::type >::store(), and TEST().
|
inlinestatic |
Definition at line 195 of file types.hh.
References floatToBits32(), and X86ISA::val.
|
inlinestatic |
Definition at line 171 of file types.hh.
References ArmISA::f, ArmISA::i, ArmISA::u, and X86ISA::val.
Referenced by floatToBits(), and TEST().
|
inlinestatic |
Definition at line 183 of file types.hh.
References ArmISA::f, ArmISA::i, ArmISA::u, and X86ISA::val.
Referenced by floatToBits(), TEST(), and updateThreadContextFPUCommon().
|
inlinestatic |
Definition at line 161 of file types.hh.
References MicroPCRomBit.
Referenced by TimingSimpleCPU::fetch(), DefaultFetch< Impl >::fetch(), DefaultFetch< Impl >::pipelineIcacheAccesses(), BaseSimpleCPU::preExecute(), TEST(), AtomicSimpleCPU::tick(), and Checker< O3CPUImpl >::verify().
Definition at line 155 of file types.hh.
References MicroPCRomBit.
Referenced by X86ISAInst::MicrocodeRom::fetchMicroop(), and TEST().
Definition at line 149 of file types.hh.
References MicroPCRomBit.
Referenced by X86ISA::X86FaultBase::invoke(), X86ISA::InitInterrupt::invoke(), and TEST().
Definition at line 232 of file types.hh.
Referenced by AbstractMemory::checkLockedAddrList(), System::Threads::insert(), Sequencer::issueRequest(), and LockedAddr::matchesContext().
Definition at line 238 of file types.hh.
Referenced by BaseXBar::findPort(), CoherentXBar::forwardAtomic(), CoherentXBar::forwardFunctional(), CoherentXBar::forwardTiming(), SimpleMemobj::getPort(), SimpleCache::getPort(), SnoopFilter::portToMask(), CoherentXBar::recvAtomicBackdoor(), CoherentXBar::recvAtomicSnoop(), CoherentXBar::recvFunctionalSnoop(), CoherentXBar::recvTimingReq(), NoncoherentXBar::recvTimingResp(), CoherentXBar::recvTimingResp(), CoherentXBar::recvTimingSnoopReq(), CoherentXBar::recvTimingSnoopResp(), and SnoopFilter::setCPUSidePorts().
Definition at line 228 of file types.hh.
Referenced by DefaultFetch< Impl >::branchCount(), Minor::Execute::checkInterrupts(), DefaultFetch< Impl >::doSquash(), DefaultFetch< Impl >::drainSanityCheck(), Minor::Decode::evaluate(), Minor::Fetch2::evaluate(), Minor::Execute::evaluate(), Minor::Fetch1::evaluate(), DefaultCommit< Impl >::executingHtmTransaction(), DefaultFetch< Impl >::fetch(), DefaultFetch< Impl >::finishTranslation(), DefaultCommit< Impl >::getCommittingThread(), Minor::Execute::getCommittingThread(), DefaultFetch< Impl >::getFetchingThread(), FullO3CPU< O3CPUImpl >::getFreeTid(), Minor::Execute::getIssuingThread(), LSQ< Impl >::getLatestHtmUid(), Minor::Decode::getScheduledThread(), Minor::Fetch2::getScheduledThread(), Minor::Fetch1::getScheduledThread(), DefaultFetch< Impl >::iqCount(), DefaultFetch< Impl >::lsqCount(), LSQ< Impl >::numHtmStarts(), LSQ< Impl >::numHtmStops(), DefaultCommit< Impl >::oldestReady(), MipsISA::readRegOtherThread(), DefaultFetch< Impl >::recvReqRetry(), DefaultCommit< Impl >::resetHtmStartsStops(), LSQ< Impl >::resetHtmStartsStops(), DefaultCommit< Impl >::roundRobin(), DefaultFetch< Impl >::roundRobin(), LSQ< Impl >::setLastRetiredHtmUid(), and MipsISA::setRegOtherThread().
Definition at line 166 of file types.hh.
Referenced by Prefetcher::SignaturePath::addPrefetch(), Prefetcher::AccessMapPatternMatching::calculatePrefetch(), AddrRange::getOffset(), KernelWorkload::initState(), CacheBlk::invalidate(), TempCacheBlk::invalidate(), KernelWorkload::KernelWorkload(), Loader::MemoryImage::minAddr(), Prefetcher::STeMS::reconstructSequence(), and TEST().
Definition at line 65 of file types.hh.
Referenced by ElasticTrace::addCommittedInst(), ElasticTrace::addSquashedInst(), MemCtrl::addToReadQueue(), MemCtrl::chooseNextFRFCFS(), DRAMInterface::chooseNextFRFCFS(), NVMInterface::chooseNextFRFCFS(), NVMInterface::chooseRead(), PacketQueue::deferredPacketReadyTime(), BaseTrafficGen::drain(), CacheBlk::getWhenReady(), TraceCPU::FixedRetryGen::init(), CacheBlk::invalidate(), Trace::OstreamLogger::logMessage(), DRAMInterface::minBankPrep(), MemCtrl::minReadToWriteDataGap(), MemCtrl::minWriteToReadDataGap(), ExitGen::nextPacketTick(), IdleGen::nextPacketTick(), RandomGen::nextPacketTick(), LinearGen::nextPacketTick(), HybridGen::nextPacketTick(), TraceGen::nextPacketTick(), Prefetcher::Multi::nextPrefetchReadyTime(), Prefetcher::Queued::nextPrefetchReadyTime(), Queue< WriteQueueEntry >::nextReadyTime(), sc_gem5::Scheduler::oneCycle(), NVMInterface::processReadReadyEvent(), pybind_init_core(), pybind_init_event(), BaseCache::recvTimingReq(), BaseCache::recvTimingResp(), BaseTrafficGen::retryReq(), sc_core::sc_max_time(), sc_core::sc_start(), PacketQueue::schedSendEvent(), BaseTrafficGen::scheduleUpdate(), BaseCache::CacheReqPacketQueue::sendDeferredPacket(), simulate(), Sp805::stopCounter(), BaseKvmCPU::tick(), Sp805::timeoutExpired(), sc_gem5::Scheduler::timeToPending(), and BaseTrafficGen::transition().
Definition at line 146 of file types.hh.
Referenced by isRomMicroPC(), normalMicroPC(), romMicroPC(), and TEST().
|
constexpr |
Definition at line 245 of file types.hh.
Referenced by ArmISA::AArch64AArch32SystemAccessTrap(), RiscvISA::RemoteGDB::acc(), X86ISA::RemoteGDB::acc(), ElasticTrace::addCommittedInst(), ArmISA::addPACDA(), ArmISA::addPACDB(), ArmISA::addPACGA(), ArmISA::addPACIA(), ArmISA::addPACIB(), ArmISA::ISA::addressTranslation(), ArmISA::ISA::addressTranslation64(), ElasticTrace::addSquashedInst(), TimingSimpleCPU::advanceInst(), BaseSimpleCPU::advancePC(), Checker< O3CPUImpl >::advancePC(), AtomicSimpleCPU::amoMem(), amoMemAtomic(), ArmISA::authDA(), ArmISA::authDB(), ArmISA::authIA(), ArmISA::authIB(), LSQ< Impl >::SplitDataRequest::buildPackets(), ArmISA::ArmStaticInst::checkAdvSIMDOrFPEnabled32(), MipsISA::TLB::checkCacheability(), PowerISA::TLB::checkCacheability(), BaseSimpleCPU::checkForInterrupts(), ArmISA::ArmStaticInst::checkForWFxTrap32(), ArmISA::ArmStaticInst::checkForWFxTrap64(), ArmISA::ArmStaticInst::checkFPAdvSIMDTrap64(), RiscvISA::TLB::checkPermissions(), ArmISA::TLB::checkPermissions(), ArmISA::TLB::checkPermissions64(), ArmISA::ArmStaticInst::checkSETENDEnabled(), ArmISA::ArmStaticInst::checkSveEnabled(), LSQUnit< Impl >::checkViolations(), Minor::Execute::commit(), DefaultCommit< Impl >::commitHead(), Minor::Execute::commitInst(), DefaultCommit< Impl >::commitInsts(), ArmISAInst::MicroTfence64::completeAcc(), TimingSimpleCPU::completeDataAccess(), TimingSimpleCPU::completeIfetch(), DefaultCommit< Impl >::DefaultCommit(), ArmISA::TableWalker::doL1Descriptor(), ArmISA::TableWalker::doL1DescriptorWrapper(), ArmISA::TableWalker::doL2Descriptor(), ArmISA::TableWalker::doL2DescriptorWrapper(), ArmISA::TableWalker::doLongDescriptor(), ArmISA::TableWalker::doLongDescriptorWrapper(), BaseKvmCPU::doMMIOAccess(), InstructionQueue< Impl >::doSquash(), RiscvISA::TLB::doTranslate(), Minor::Decode::evaluate(), RiscvISA::MemFenceMicro::execute(), SparcISA::Nop::execute(), ArmISA::SveLdStructSS< Element, MicroopLdMemType, MicroopDeIntrlvType >::execute(), SparcISA::WarnUnimplemented::execute(), ArmISAInst::Tstart64::execute(), WarnUnimplemented::execute(), ArmISAInst::Tcancel64::execute(), ArmISAInst::MicroTfence64::execute(), ArmISAInst::MicroTcommit64::execute(), ArmISA::SveStStructSS< Element, MicroopStMemType, MicroopIntrlvType >::execute(), MiscRegImplDefined64::execute(), ArmISA::SveLdStructSI< Element, MicroopLdMemType, MicroopDeIntrlvType >::execute(), ArmISA::SveStStructSI< Element, MicroopStMemType, MicroopIntrlvType >::execute(), ArmISA::SveIndexedMemVI< RegElemType, MemElemType, MicroopType, FirstFaultWritebackMicroopType >::execute(), McrMrcMiscInst::execute(), ArmISA::SveIndexedMemSV< RegElemType, MemElemType, MicroopType, FirstFaultWritebackMicroopType >::execute(), DefaultIEW< Impl >::executeInsts(), LSQUnit< Impl >::executeLoad(), Minor::Execute::executeMemRefInst(), LSQUnit< Impl >::executeStore(), DefaultFetch< Impl >::fetchCacheLine(), ArmISA::TableWalker::fetchDescriptor(), Iris::TLB::finalizePhysical(), MipsISA::TLB::finalizePhysical(), RiscvISA::TLB::finalizePhysical(), X86ISA::TLB::finalizePhysical(), PowerISA::TLB::finalizePhysical(), SparcISA::TLB::finalizePhysical(), ArmISA::TLB::finalizePhysical(), ArmISA::Stage2MMU::Stage2Translation::finish(), ArmISA::Stage2LookUp::finish(), WholeTranslationState::finish(), Prefetcher::Queued::DeferredPacket::finish(), DataTranslation< ExecContextPtr >::finish(), Minor::LSQ::SingleDataRequest::finish(), Minor::LSQ::SplitDataRequest::finish(), LSQ< Impl >::SingleDataRequest::finish(), LSQ< Impl >::SplitDataRequest::finish(), DefaultFetch< Impl >::finishTranslation(), TimingSimpleCPU::finishTranslation(), WholeTranslationState::getFault(), Iris::Interrupts::getInterrupt(), RiscvISA::Interrupts::getInterrupt(), SparcISA::Interrupts::getInterrupt(), X86ISA::Interrupts::getInterrupt(), ArmISA::TLB::getResultTe(), ArmISA::Stage2LookUp::getTe(), ArmISA::TLB::getTE(), DefaultCommit< Impl >::handleInterrupt(), Minor::Execute::handleMemResponse(), Minor::Fetch1::handleTLBResponse(), LSQ< Impl >::HtmCmdRequest::HtmCmdRequest(), ArmISAInst::MicroTfence64::initiateAcc(), Minor::ExecContext::initiateHtmCmd(), TimingSimpleCPU::initiateHtmCmd(), CheckerCPU::initiateHtmCmd(), TimingSimpleCPU::initiateMemAMO(), TimingSimpleCPU::initiateMemRead(), BaseDynInst< Impl >::initVars(), DefaultCommit< Impl >::isDrained(), Minor::ForwardLineData::isFault(), Minor::MinorDynInst::isFault(), Minor::LSQ::LSQRequest::makePacket(), ArmISA::Stage2LookUp::mergeTe(), Minor::Fetch1::minorTraceResponseLine(), BaseCPU::mwaitAtomic(), Minor::operator<<(), FullO3CPU< O3CPUImpl >::processInterrupts(), Minor::Fetch1::processResponse(), ArmISA::TableWalker::processWalkWrapper(), DefaultCommit< Impl >::propagateInterrupt(), Minor::LSQ::pushRequest(), LSQ< Impl >::pushRequest(), LSQUnit< Impl >::read(), ArmISA::Stage2MMU::readDataUntimed(), AtomicSimpleCPU::readMem(), CheckerCPU::readMem(), readMemAtomic(), X86ISA::readMemAtomic(), Trace::TarmacParserRecord::readMemNoEffect(), X86ISA::readPackedMemAtomic(), RiscvISA::Walker::WalkerState::recvPacket(), X86ISA::Walker::WalkerState::recvPacket(), Minor::ForwardLineData::reportData(), Minor::MinorDynInst::reportData(), Minor::LSQ::SplitDataRequest::retireResponse(), TimingSimpleCPU::sendFetch(), WholeTranslationState::setNoFault(), RiscvISA::Walker::start(), X86ISA::Walker::start(), RiscvISA::Walker::WalkerState::startFunctional(), X86ISA::Walker::WalkerState::startFunctional(), RiscvISA::Walker::WalkerState::startWalk(), X86ISA::Walker::WalkerState::startWalk(), RiscvISA::Walker::WalkerState::stepWalk(), X86ISA::Walker::WalkerState::stepWalk(), ArmISA::stripPAC(), Minor::Execute::takeInterrupt(), ArmISA::SelfDebug::testBreakPoints(), ArmISA::SelfDebug::testDebug(), ArmISA::TLB::testTranslation(), ArmISA::SelfDebug::testVectorCatch(), ArmISA::TLB::testWalk(), ArmISA::SelfDebug::testWatchPoints(), AtomicSimpleCPU::tick(), X86ISA::TLB::translate(), RiscvISA::TLB::translate(), EmulationPageTable::translate(), X86ISA::GpuTLB::translate(), ArmISA::TLB::translateComplete(), SparcISA::TLB::translateData(), ArmISA::TLB::translateFs(), Iris::TLB::translateFunctional(), RiscvISA::TLB::translateFunctional(), X86ISA::TLB::translateFunctional(), SparcISA::TLB::translateFunctional(), SparcISA::TLB::translateInst(), X86ISA::TLB::translateInt(), X86ISA::GpuTLB::translateInt(), ArmISA::TLB::translateMmuOn(), TimingSimpleCPU::translationFault(), MiscRegOp64::trap(), ArmISA::trapPACUse(), ArmISA::ArmStaticInst::trapWFx(), TranslatingPortProxy::tryTLBsOnce(), Minor::Execute::tryToBranch(), Minor::Fetch1::tryToSendToTransfers(), Minor::LSQ::tryToSendToTransfers(), Minor::LSQ::LSQRequest::tryToSuppressFault(), tryTranslate(), ArmISA::ArmStaticInst::undefinedFault64(), Checker< O3CPUImpl >::validateState(), ArmISA::ArmFault::vectorCatch(), Checker< O3CPUImpl >::verify(), ArmISA::TableWalker::walk(), WholeTranslationState::WholeTranslationState(), LSQUnit< Impl >::write(), LSQUnit< Impl >::writeback(), DefaultIEW< Impl >::writebackInsts(), AtomicSimpleCPU::writeMem(), TimingSimpleCPU::writeMem(), CheckerCPU::writeMem(), writeMemAtomic(), X86ISA::writeMemAtomic(), and BaseDynInst< Impl >::~BaseDynInst().