gem5
v21.0.0.0
|
These are a collection of utility functions and constants defined in src/base. More...
Classes | |
class | CircularQueue< T > |
Circular queue. More... | |
class | Trie< Key, Value > |
A trie is a tree-based data structure used for data retrieval. More... | |
Typedefs | |
typedef Node * | Trie< Key, Value >::Handle |
Functions | |
CircularQueue< T >::iterator::iterator (CircularQueue *cq, size_t idx) | |
CircularQueue< T >::iterator::iterator (const iterator &it) | |
Trait reference type iterator satisfies OutputIterator, therefore reference must be T&. More... | |
iterator & | CircularQueue< T >::iterator::operator= (const iterator &it) |
bool | CircularQueue< T >::iterator::dereferenceable () const |
Test dereferenceability. More... | |
bool | CircularQueue< T >::iterator::operator== (const iterator &that) const |
InputIterator. More... | |
bool | CircularQueue< T >::iterator::operator!= (const iterator &that) |
Inequality operator. More... | |
reference | CircularQueue< T >::iterator::operator* () |
Dereference operator. More... | |
const_reference | CircularQueue< T >::iterator::operator* () const |
pointer | CircularQueue< T >::iterator::operator-> () |
Dereference operator. More... | |
const_pointer | CircularQueue< T >::iterator::operator-> () const |
iterator & | CircularQueue< T >::iterator::operator++ () |
Pre-increment operator. More... | |
iterator | CircularQueue< T >::iterator::operator++ (int) |
Post-increment operator. More... | |
iterator & | CircularQueue< T >::iterator::operator-- () |
ForwardIterator The multipass guarantee is provided by the reliance on _idx. More... | |
iterator | CircularQueue< T >::iterator::operator-- (int) |
Post-decrement operator. More... | |
iterator & | CircularQueue< T >::iterator::operator+= (const difference_type &t) |
RandomAccessIterator requirements. More... | |
iterator & | CircularQueue< T >::iterator::operator-= (const difference_type &t) |
iterator | CircularQueue< T >::iterator::operator+ (const difference_type &t) |
Addition operator. More... | |
iterator | CircularQueue< T >::iterator::operator- (const difference_type &t) |
Substraction operator. More... | |
difference_type | CircularQueue< T >::iterator::operator- (const iterator &that) |
Difference operator. More... | |
template<typename Idx > | |
std::enable_if_t< std::is_integral< Idx >::value, reference > | CircularQueue< T >::iterator::operator[] (const Idx &index) |
Index operator. More... | |
bool | CircularQueue< T >::iterator::operator< (const iterator &that) const |
Comparisons. More... | |
bool | CircularQueue< T >::iterator::operator> (const iterator &that) const |
bool | CircularQueue< T >::iterator::operator>= (const iterator &that) const |
bool | CircularQueue< T >::iterator::operator<= (const iterator &that) const |
template<typename Idx > | |
std::enable_if_t< std::is_integral< Idx >::value, reference > | CircularQueue< T >::operator[] (const Idx &index) |
CircularQueue< T >::CircularQueue (size_t size=0) | |
void | CircularQueue< T >::flush () |
Remove all the elements in the queue. More... | |
reference | CircularQueue< T >::front () |
reference | CircularQueue< T >::back () |
size_t | CircularQueue< T >::head () const |
size_t | CircularQueue< T >::tail () const |
size_t | CircularQueue< T >::capacity () const |
size_t | CircularQueue< T >::size () const |
void | CircularQueue< T >::pop_front (size_t num_elem=1) |
Circularly increase the head pointer. More... | |
void | CircularQueue< T >::pop_back () |
Circularly decrease the tail pointer. More... | |
void | CircularQueue< T >::push_back (typename std::vector< T >::value_type val) |
Pushes an element at the end of the queue. More... | |
void | CircularQueue< T >::advance_tail () |
Increases the tail by one. More... | |
void | CircularQueue< T >::advance_tail (size_t len) |
Increases the tail by a specified number of steps. More... | |
bool | CircularQueue< T >::empty () const |
Is the queue empty? More... | |
bool | CircularQueue< T >::full () const |
Is the queue full? A queue is full if the head is the 0^{th} element and the tail is the (size-1)^{th} element, or if the head is the n^{th} element and the tail the (n-1)^{th} element. More... | |
iterator | CircularQueue< T >::begin () |
Iterators. More... | |
iterator | CircularQueue< T >::begin () const |
iterator | CircularQueue< T >::end () |
iterator | CircularQueue< T >::end () const |
static bool | findCarry (int width, uint64_t dest, uint64_t src1, uint64_t src2) |
Calculate the carry flag from an addition. More... | |
static bool | findOverflow (int width, uint64_t dest, uint64_t src1, uint64_t src2) |
Calculate the overflow flag from an addition. More... | |
static bool | findParity (int width, uint64_t dest) |
Calculate the parity of a value. More... | |
static bool | findNegative (int width, uint64_t dest) |
Calculate the negative flag. More... | |
static bool | findZero (int width, uint64_t dest) |
Calculate the zero flag. More... | |
template<uint32_t Poly> | |
uint32_t | crc32 (const uint8_t *data, uint32_t crc, std::size_t size) |
Evaluate the CRC32 of the first size bytes of a data buffer, using a specific polynomium and an initial value. More... | |
uint64_t | power (uint32_t n, uint32_t e) |
template<class T > | |
std::enable_if_t< std::is_integral< T >::value, int > | floorLog2 (T x) |
template<class T > | |
int | ceilLog2 (const T &n) |
template<class T > | |
bool | isPowerOf2 (const T &n) |
template<class T , class U > | |
T | divCeil (const T &a, const U &b) |
template<class T , class U > | |
T | roundUp (const T &val, const U &align) |
This function is used to align addresses in memory. More... | |
template<class T , class U > | |
T | roundDown (const T &val, const U &align) |
This function is used to align addresses in memory. More... | |
template<typename T > | |
std::enable_if_t< std::is_integral< T >::value, T > | Random::random () |
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating point. More... | |
template<typename T > | |
std::enable_if_t< std::is_integral< T >::value, T > | Random::random (T min, T max) |
m5::stl_helpers::ContainerPrint< T >::ContainerPrint (std::ostream &out) | |
void | m5::stl_helpers::ContainerPrint< T >::operator() (const T &elem) |
template<template< typename T, typename A > class C, typename T , typename A > | |
std::ostream & | m5::stl_helpers::operator<< (std::ostream &out, const C< T, A > &vec) |
Write out all elements in an stl container as a space separated list enclosed in square brackets. More... | |
Trie< Key, Value >::Trie () | |
Handle | Trie< Key, Value >::insert (Key key, unsigned width, Value *val) |
Method which inserts a key/value pair into the trie. More... | |
Value * | Trie< Key, Value >::lookup (Key key) |
Method which looks up the Value corresponding to a particular key. More... | |
Value * | Trie< Key, Value >::remove (Handle handle) |
Method to delete a value from the trie. More... | |
Value * | Trie< Key, Value >::remove (Key key) |
Method to lookup a value from the trie and then delete it. More... | |
void | Trie< Key, Value >::clear () |
A method which removes all key/value pairs from the trie. More... | |
Variables | |
const char * | compileDate = __DATE__ " " __TIME__ |
Random | random_mt |
static const unsigned | Trie< Key, Value >::MaxBits = sizeof(Key) * 8 |
const char * | gem5Version = "21.0.0.0" |
Friends | |
iterator | CircularQueue< T >::iterator::operator+ (const difference_type &t, iterator &it) |
iterator | CircularQueue< T >::iterator::operator- (const difference_type &t, iterator &it) |
using | CircularQueue< T >::iterator::value_type = T |
Iterator Traits. More... | |
using | CircularQueue< T >::iterator::difference_type = std::ptrdiff_t |
using | CircularQueue< T >::iterator::reference = value_type & |
using | CircularQueue< T >::iterator::const_reference = const value_type & |
using | CircularQueue< T >::iterator::pointer = value_type * |
using | CircularQueue< T >::iterator::const_pointer = const value_type * |
using | CircularQueue< T >::iterator::iterator_category = std::random_access_iterator_tag |
Random::Random () | |
Random::Random (uint32_t s) | |
These are a collection of utility functions and constants defined in src/base.
using CircularQueue< T >::iterator::const_pointer = const value_type* |
Definition at line 105 of file circular_queue.hh.
using CircularQueue< T >::iterator::const_reference = const value_type& |
Definition at line 103 of file circular_queue.hh.
using CircularQueue< T >::iterator::difference_type = std::ptrdiff_t |
Definition at line 101 of file circular_queue.hh.
using CircularQueue< T >::iterator::iterator_category = std::random_access_iterator_tag |
Definition at line 106 of file circular_queue.hh.
using CircularQueue< T >::iterator::pointer = value_type* |
Definition at line 104 of file circular_queue.hh.
using CircularQueue< T >::iterator::reference = value_type& |
Definition at line 102 of file circular_queue.hh.
using CircularQueue< T >::iterator::value_type = T |
Iterator Traits.
Definition at line 100 of file circular_queue.hh.
|
inline |
Increases the tail by one.
This may overwrite the head if the queue is full.
Definition at line 512 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::insertLoad(), and CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::push_back().
|
inline |
Increases the tail by a specified number of steps.
This may overwrite one or more entries starting at the head if the queue is full.
len | Number of steps |
Definition at line 529 of file circular_queue.hh.
|
inline |
Definition at line 443 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::insertLoad(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::push_back(), LSQUnit< Impl >::squash(), and TEST().
|
inline |
Iterators.
Definition at line 562 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::checkSnoop(), LSQUnit< Impl >::squash(), and TEST().
|
inline |
Definition at line 569 of file circular_queue.hh.
|
inline |
Definition at line 458 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::drainSanityCheck(), LSQUnit< Impl >::insertLoad(), LSQUnit< Impl >::numFreeLoadEntries(), and TEST().
|
inline |
Definition at line 88 of file intmath.hh.
References floorLog2(), and ArmISA::n.
Referenced by MemCtrl::addToReadQueue(), MemCtrl::addToWriteQueue(), DRAMInterface::DRAMInterface(), TimingExprUn::eval(), MemCtrl::CtrlStats::regStats(), and TEST().
|
inlineexplicit |
Definition at line 409 of file circular_queue.hh.
|
inline |
|
inline |
Definition at line 49 of file stl_helpers.hh.
uint32_t crc32 | ( | const uint8_t * | data, |
uint32_t | crc, | ||
std::size_t | size | ||
) |
Evaluate the CRC32 of the first size bytes of a data buffer, using a specific polynomium and an initial value.
The crc is accomplished by reversing the input, the initial value and the output (remainder).
data | Input data buffer pointer |
crc | Initial value of the checksum |
size | Number of bytes |
Definition at line 59 of file crc.hh.
References data, ArmISA::i, ArmISA::j, and reverseBits().
|
inline |
Test dereferenceability.
An iterator is dereferenceable if it is pointing to a non-null circular queue, and the index is within the current range of the queue.
Definition at line 140 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, and CircularQueue< T >::isValidIdx().
Referenced by LSQUnit< Impl >::willWB(), and LSQUnit< Impl >::writebackStores().
|
inline |
Definition at line 114 of file intmath.hh.
References ArmISA::a, and ArmISA::b.
Referenced by DRAMInterface::activateBank(), Process::allocateMem(), BaseXBar::calcPacketTiming(), flit::deserialize(), DRAMInterface::doBurstAccess(), QoS::MemCtrl::escalateQueues(), NetworkInterface::flitisizeMessage(), DRAMInterface::Rank::flushCmdList(), DRAMPower::getDataRate(), DRAMPower::getTimingParams(), Gicv3Distributor::Gicv3Distributor(), Plic::init(), Wavefront::initRegState(), TrafficGen::parseConfig(), DRAMInterface::Rank::powerDownSleep(), DRAMInterface::prechargeBank(), QoS::MemSinkCtrl::processNextReqEvent(), DRAMInterface::Rank::processRefreshEvent(), DRAMSim2::readComplete(), SerialLink::SerialLinkResponsePort::recvTimingReq(), QoS::MemSinkCtrl::recvTimingReq(), MemCtrl::recvTimingReq(), SerialLink::SerialLinkRequestPort::recvTimingResp(), Clocked::resetClock(), DRAMInterface::Rank::resetStats(), Consumer::scheduleEventAbsolute(), DRAMInterface::Rank::scheduleWakeUpEvent(), flit::serialize(), DRAMInterface::startup(), TEST(), AtomicSimpleCPU::tick(), Clocked::ticksToCycles(), SerialLink::SerialLinkResponsePort::trySendTiming(), SerialLink::SerialLinkRequestPort::trySendTiming(), Clocked::update(), DRAMInterface::Rank::updatePowerStats(), and DRAMSim2::writeComplete().
|
inline |
Is the queue empty?
Definition at line 545 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::checkSnoop(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::pop_back(), and TEST().
|
inline |
Definition at line 577 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::checkSnoop(), LSQUnit< Impl >::checkViolations(), LSQUnit< Impl >::insertStore(), LSQUnit< Impl >::squash(), and TEST().
|
inline |
Definition at line 583 of file circular_queue.hh.
|
inlinestatic |
Calculate the carry flag from an addition.
This should work even when a carry value is also added in.
Parameters: dest: The result value of the addition. src1: One of the addends that was added. src2: The other addend that was added in.
Rationale: This code analyzes the most sig. bits of the source addends and result, and deduces the carry out flag from them without needing the carry in bit.
Observe that we have four cases after an addition regarding the carry in and carry out bits:
If we have no carry in but a carry out: src1 and src2 must both be 1, with the result bit being 0. Hence, ~0 + 1 + 1 => 11, which has a high second bit. We return true.
If we have a carry in and a carry out: src1 and src2 can either be 1 and 0, or vice versa. In this case, the addition with the carry in gives a result bit of 0 but a carry out. Hence, ~0 + 1 + 0 => 10, or ~0 + 0 + 1 => 10. We return true.
Or, src1 and src2 can both be one. Along with the carry, this gives a result of 1 and a carry out of 1. Hence, ~1 + 1 + 1 => 10. We return true.
If we have no carry in and no carry out: src1 and src2 can either be 1 and 0, 0 and 1, or 0 and 0. In the first two cases the result bit is 1, which when negated does not contribute to the sum algorithm at all. In the last case the result bit is zero, but neither src1 nor src2 contribute to the sum either. Hence, ~1 + 1 + 0 => 1, ~1 + 0 + 1 => 1, ~0 + 0 + 0 => 1. So we return false for all of these cases.
If we have a carry in, but no carry out: src1 and src2 can neither be 1. So the overall result bit is 1. Hence: ~1 + 0 + 0 => 0. We return false.
Definition at line 81 of file condcodes.hh.
References ArmISA::shift, and ArmISA::width.
Referenced by X86ISA::RegOpBase::genFlags(), and TEST().
|
inlinestatic |
Calculate the negative flag.
Definition at line 138 of file condcodes.hh.
References bits(), and ArmISA::width.
Referenced by X86ISA::RegOpBase::genFlags(), and TEST().
|
inlinestatic |
Calculate the overflow flag from an addition.
Definition at line 95 of file condcodes.hh.
References ArmISA::shift, ULL, and ArmISA::width.
Referenced by X86ISA::RegOpBase::genFlags(), and TEST().
|
inlinestatic |
Calculate the parity of a value.
1 is for odd parity and 0 is for even.
Parameters: dest: a value to be tested.
Rationale: findParity simply performs bitwise XOR operations on each "pair" of bits in the dest parameter; the procedure being that a pair of ones will be XOR'ed out of the intermediate value.
This process is repeated until one last pair of bits are XOR'ed together. If the intermediate is still one, then there is exactly one high bit which does not have a corresponding high bit. Therefore, the value must have odd parity, and we return 1 accordingly. Otherwise we return 0.
Definition at line 120 of file condcodes.hh.
References ArmISA::mask, and ArmISA::width.
Referenced by X86ISA::RegOpBase::genFlags(), and TEST().
|
inlinestatic |
Calculate the zero flag.
Definition at line 149 of file condcodes.hh.
References ArmISA::mask, and ArmISA::width.
Referenced by X86ISA::RegOpBase::genFlags(), and TEST().
|
inline |
Definition at line 63 of file intmath.hh.
References ArmISA::ts, X86ISA::type, ULL, MipsISA::ux, and RiscvISA::x.
Referenced by Histogram::add(), CheckTable::addCheck(), AddressManager::AddressManager(), FetchUnit::FetchBufDesc::allocateBuf(), BankedArray::BankedArray(), ceilLog2(), DefaultBTB::DefaultBTB(), DirectoryMemory::DirectoryMemory(), SimpleIndirectPredictor::getSetIndex(), Gicv2m::Gicv2m(), StackDistProbe::handleRequest(), Prefetcher::BOP::hash(), CacheMemory::init(), RubySystem::RubySystem(), Prefetcher::Base::setCache(), and TEST().
|
inline |
Remove all the elements in the queue.
Note: This does not actually remove elements from the backing store.
Definition at line 420 of file circular_queue.hh.
Referenced by Prefetcher::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate().
|
inline |
Definition at line 438 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::commitLoad(), LSQUnit< Impl >::commitLoads(), LSQUnit< Impl >::getLoadHeadSeqNum(), Prefetcher::SBOOE::notifyFill(), and TEST().
|
inline |
Is the queue full? A queue is full if the head is the 0^{th} element and the tail is the (size-1)^{th} element, or if the head is the n^{th} element and the tail the (n-1)^{th} element.
Definition at line 555 of file circular_queue.hh.
Referenced by CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::advance_tail(), LSQUnit< Impl >::insertLoad(), Prefetcher::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate(), LSQUnit< Impl >::lqFull(), Prefetcher::SBOOE::notifyFill(), and TEST().
|
inline |
Definition at line 448 of file circular_queue.hh.
Referenced by CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::front(), LSQUnit< Impl >::getLoadHead(), CircularQueue< T >::iterator::operator--(), CircularQueue< T >::iterator::operator-=(), and TEST().
|
inline |
Method which inserts a key/value pair into the trie.
key | The key which can later be used to look up this value. |
width | How many bits of the key (from msb) should be used. |
val | A pointer to the value to store in the trie. |
Definition at line 210 of file trie.hh.
Referenced by RiscvISA::TLB::insert(), X86ISA::TLB::insert(), RiscvISA::TLB::unserialize(), and X86ISA::TLB::unserialize().
|
inline |
Definition at line 102 of file intmath.hh.
References ArmISA::n.
Referenced by FetchUnit::FetchBufDesc::allocateBuf(), AssociativeSet< Prefetcher::IrregularStreamBuffer::AddressMappingEntry >::AssociativeSet(), BaseIndexingPolicy::BaseIndexingPolicy(), BaseSetAssoc::BaseSetAssoc(), BiModeBP::BiModeBP(), ChunkGenerator::ChunkGenerator(), DefaultBTB::DefaultBTB(), DRAMInterface::DRAMInterface(), EmulationPageTable::EmulationPageTable(), PciIoBar::EndBitUnion(), FALRU::FALRU(), Gicv2m::Gicv2m(), StatisticalCorrector::SCThreadHistory::initLocalHistory(), Prefetcher::IrregularStreamBuffer::IrregularStreamBuffer(), LocalBP::LocalBP(), MemFootprintProbe::MemFootprintProbe(), PciMemBar::PciMemBar(), roundDown(), roundUp(), RubySystem::RubySystem(), SectorTags::SectorTags(), SimpleIndirectPredictor::SimpleIndirectPredictor(), Prefetcher::STeMS::STeMS(), StoreSet::StoreSet(), TEST(), TournamentBP::TournamentBP(), ReplacementPolicy::TreePLRU::TreePLRU(), and StackDistCalc::updateTree().
|
inline |
Definition at line 91 of file circular_queue.hh.
|
inline |
Trait reference type iterator satisfies OutputIterator, therefore reference must be T&.
Definition at line 118 of file circular_queue.hh.
|
inline |
Method which looks up the Value corresponding to a particular key.
key | The key to look up. |
Definition at line 298 of file trie.hh.
Referenced by X86ISA::TLB::demapPage(), X86ISA::TLB::insert(), X86ISA::TLB::lookup(), and RiscvISA::TLB::lookup().
|
inline |
Inequality operator.
Conversely, two iterators are different if they both point to different circular queues or they point to different elements.
Definition at line 167 of file circular_queue.hh.
|
inline |
Definition at line 57 of file stl_helpers.hh.
References m5::stl_helpers::ContainerPrint< T >::first, and m5::stl_helpers::ContainerPrint< T >::out.
|
inline |
Dereference operator.
Definition at line 175 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.
|
inline |
Definition at line 185 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.
|
inline |
|
inline |
Pre-increment operator.
Definition at line 210 of file circular_queue.hh.
References CircularQueue< T >::iterator::_idx.
|
inline |
|
inline |
RandomAccessIterator requirements.
Definition at line 268 of file circular_queue.hh.
References CircularQueue< T >::iterator::_idx, and ArmISA::t.
|
inline |
|
inline |
Difference operator.
that + ret == this
Definition at line 336 of file circular_queue.hh.
References CircularQueue< T >::iterator::_idx.
|
inline |
ForwardIterator The multipass guarantee is provided by the reliance on _idx.
BidirectionalIterator requirements. Pre-decrement operator.
Definition at line 241 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, and CircularQueue< T >::head().
|
inline |
|
inline |
Definition at line 278 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::head(), and ArmISA::t.
|
inline |
Dereference operator.
Rely on operator* to check for dereferenceability.
Definition at line 197 of file circular_queue.hh.
|
inline |
Definition at line 202 of file circular_queue.hh.
|
inline |
Comparisons.
Definition at line 360 of file circular_queue.hh.
References CircularQueue< T >::iterator::_idx.
std::ostream& m5::stl_helpers::operator<< | ( | std::ostream & | out, |
const C< T, A > & | vec | ||
) |
Write out all elements in an stl container as a space separated list enclosed in square brackets.
Definition at line 77 of file stl_helpers.hh.
|
inline |
Definition at line 378 of file circular_queue.hh.
|
inline |
Definition at line 124 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.
|
inline |
InputIterator.
Equality operator. Two iterators must point to the same, possibly null, circular queue and the same element on it to be equal.
Definition at line 155 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.
|
inline |
Definition at line 368 of file circular_queue.hh.
|
inline |
Definition at line 373 of file circular_queue.hh.
|
inline |
Index operator.
The use of * tests for dereferenceability.
Definition at line 349 of file circular_queue.hh.
References MipsISA::index.
|
inline |
Definition at line 392 of file circular_queue.hh.
|
inline |
Circularly decrease the tail pointer.
Definition at line 487 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::squash().
|
inline |
Circularly increase the head pointer.
By increasing the head pointer we are removing elements from the begin of the circular queue.
@params num_elem number of elements to remove
Definition at line 474 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::commitLoad(), and TEST().
|
inline |
Definition at line 43 of file intmath.hh.
References ArmISA::e, ArmISA::n, and warn_if.
Referenced by DRAMInterface::Rank::flushCmdList(), PowerModel::getDynamicPower(), ThermalDomain::getEquation(), PowerModel::getStaticPower(), Sp804::Timer::read(), CpuLocalTimer::Timer::read(), DRAMInterface::Rank::resetStats(), Sp804::Timer::restartCounter(), CpuLocalTimer::Timer::restartTimerCounter(), CpuLocalTimer::Timer::restartWatchdogCounter(), TEST(), and DRAMInterface::Rank::updatePowerStats().
|
inline |
Pushes an element at the end of the queue.
Definition at line 499 of file circular_queue.hh.
Referenced by Prefetcher::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate(), Prefetcher::SBOOE::notifyFill(), Prefetcher::PIF::notifyRetiredInst(), and TEST().
Random::Random | ( | ) |
Definition at line 48 of file random.cc.
References Random::init().
|
inline |
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating point.
Definition at line 86 of file random.hh.
References Stats::dist, and Random::gen.
Referenced by MPP_TAGE::adjustAlloc(), TAGE_SC_L_TAGE::adjustAlloc(), RiscvProcess::argsInit(), TAGE_SC_L_TAGE::calcDep(), Check::Check(), Linux::devRandom(), GarnetSyntheticTraffic::generatePkt(), DramGen::genStartAddr(), NvmGen::genStartAddr(), HybridGen::genStartAddr(), SimpleMemory::getLatency(), RandomGen::getNextPacket(), LinearGen::getNextPacket(), NvmGen::getNextPacket(), DramGen::getNextPacket(), StridedGen::getNextPacket(), HybridGen::getNextPacket(), CheckTable::getRandomCheck(), ReplacementPolicy::Random::getVictim(), TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), SeriesRequestGenerator::initiate(), Check::initiate(), Check::initiateAction(), Check::initiateCheck(), Check::initiateFlush(), Check::initiatePrefetch(), SimpleCache::insert(), LoopPredictor::loopUpdate(), RandomGen::nextPacketTick(), LinearGen::nextPacketTick(), StridedGen::nextPacketTick(), HybridGen::nextPacketTick(), TrafficGen::nextState(), PerfectSwitch::operateMessageBuffer(), MPP_LoopPredictor::optionalAgeInc(), TAGE_SC_L_LoopPredictor::optionalAgeInc(), SMMUTLB::pickEntryIdxToReplace(), ARMArchTLB::pickEntryIdxToReplace(), IPACache::pickEntryIdxToReplace(), ConfigCache::pickEntryIdxToReplace(), WalkCache::pickEntryIdxToReplace(), Check::pickInitiatingNode(), Check::pickValue(), random_time(), RandomStreamGen::randomPick(), ReplacementPolicy::BIP::reset(), ReplacementPolicy::BRRIP::reset(), EtherSwitch::Interface::switchingDelay(), GarnetSyntheticTraffic::tick(), MemTest::tick(), DefaultFetch< Impl >::tick(), MultiperspectivePerceptron::train(), EtherLink::Link::transmit(), DistEtherLink::TxLink::transmit(), LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), MultiperspectivePerceptronTAGE::update(), and MultiperspectivePerceptron::update().
|
inline |
Definition at line 109 of file random.hh.
References Stats::dist, and Random::gen.
Random::Random | ( | uint32_t | s | ) |
Definition at line 54 of file random.cc.
References Random::init(), and ArmISA::s.
Method to delete a value from the trie.
node | A Handle to remove. |
Definition at line 315 of file trie.hh.
Referenced by X86ISA::TLB::demapPage(), X86ISA::TLB::evictLRU(), X86ISA::TLB::flushAll(), X86ISA::TLB::flushNonGlobal(), RiscvISA::TLB::remove(), and Trie< Addr, TlbEntry >::remove().
|
inline |
|
inline |
This function is used to align addresses in memory.
val | is the address to be aligned. |
align | is the alignment. Can only be a power of 2. |
align | which is less than or equal to |
val. |
Definition at line 150 of file intmath.hh.
References sc_dt::align(), isPowerOf2(), ArmISA::mask, and X86ISA::val.
Referenced by AtomicSimpleCPU::amoMem(), MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), TLBCoalescer::canCoalesce(), FetchUnit::FetchBufDesc::checkWaveReleaseBuf(), Shader::doFunctionalAccess(), SETranslatingPortProxy::fixupAddr(), MemState::fixupFault(), X86ISA::GpuTLB::handleFuncTranslationReturn(), StackDistProbe::handleRequest(), TimingSimpleCPU::initiateMemAMO(), TimingSimpleCPU::initiateMemRead(), initMemReqHelper(), initMemReqScalarHelper(), X86ISA::GpuTLB::issueTLBLookup(), BaseCPU::mwaitAtomic(), Prefetcher::Base::pageAddress(), TLBCoalescer::processProbeTLBEvent(), TLBCoalescer::CpuSidePort::recvFunctional(), X86ISA::GpuTLB::CpuSidePort::recvFunctional(), X86ISA::GpuTLB::MemSidePort::recvTimingResp(), ComputeUnit::DTLBPort::recvTimingResp(), Prefetcher::Base::samePage(), TEST(), ComputeUnit::updatePageDivergenceDist(), TLBCoalescer::updatePhysAddresses(), and TimingSimpleCPU::writeMem().
|
inline |
This function is used to align addresses in memory.
val | is the address to be aligned. |
align | is the alignment. Can only be a power of 2. |
align | which is greater than or equal to |
val. |
Definition at line 131 of file intmath.hh.
References sc_dt::align(), isPowerOf2(), ArmISA::mask, and X86ISA::val.
Referenced by MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), ArmProcess32::ArmProcess32(), ArmProcess64::ArmProcess64(), ChunkGenerator::ChunkGenerator(), GuestABI::Argument< Aapcs32, Composite, typename std::enable_if_t< IsAapcs32Composite< Composite >::value > >::get(), X86ISA::I386Process::I386Process(), X86ISA::FsWorkload::initState(), GuestABI::Aapcs32ArgumentBase::loadFromStack(), MipsProcess::MipsProcess(), Shader::mmap(), mmapFunc(), mremapFunc(), munmapFunc(), PowerProcess::PowerProcess(), RiscvProcess32::RiscvProcess32(), RiscvProcess64::RiscvProcess64(), ChunkGenerator::setNext(), Sparc32Process::Sparc32Process(), Sparc64Process::Sparc64Process(), TEST(), Process::updateBias(), MemState::updateBrkRegion(), and X86ISA::X86_64Process::X86_64Process().
|
inline |
Definition at line 463 of file circular_queue.hh.
Referenced by Prefetcher::SBOOE::notifyFill(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::pop_front(), and TEST().
|
inline |
Definition at line 453 of file circular_queue.hh.
Referenced by CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::back(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::end(), LSQUnit< Impl >::insertLoad(), LSQUnit< Impl >::insertStore(), Prefetcher::PIF::notifyRetiredInst(), LSQUnit< Impl >::squash(), and TEST().
const char* compileDate = __DATE__ " " __TIME__ |
Definition at line 32 of file date.cc.
Referenced by pybind_init_core().
const char* gem5Version = "21.0.0.0" |
Definition at line 32 of file version.cc.
Referenced by pybind_init_core().
|
static |
Definition at line 133 of file trie.hh.
Referenced by Trie< Addr, TlbEntry >::extendMask(), and Trie< Addr, TlbEntry >::insert().
Random random_mt |
Definition at line 96 of file random.cc.
Referenced by MPP_TAGE::adjustAlloc(), TAGE_SC_L_TAGE::adjustAlloc(), RiscvProcess::argsInit(), TAGE_SC_L_TAGE::calcDep(), Check::Check(), GarnetSyntheticTraffic::generatePkt(), NvmGen::genStartAddr(), DramGen::genStartAddr(), HybridGen::genStartAddr(), SimpleMemory::getLatency(), RandomGen::getNextPacket(), LinearGen::getNextPacket(), NvmGen::getNextPacket(), DramGen::getNextPacket(), StridedGen::getNextPacket(), HybridGen::getNextPacket(), CheckTable::getRandomCheck(), ReplacementPolicy::Random::getVictim(), TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), DistIface::init(), SeriesRequestGenerator::initiate(), Check::initiate(), Check::initiateAction(), Check::initiateCheck(), Check::initiateFlush(), Check::initiatePrefetch(), SimpleCache::insert(), LoopPredictor::loopUpdate(), RandomGen::nextPacketTick(), LinearGen::nextPacketTick(), StridedGen::nextPacketTick(), HybridGen::nextPacketTick(), TrafficGen::nextState(), PerfectSwitch::operateMessageBuffer(), MPP_LoopPredictor::optionalAgeInc(), TAGE_SC_L_LoopPredictor::optionalAgeInc(), Check::pickInitiatingNode(), Check::pickValue(), pybind_init_core(), random_time(), RandomStreamGen::randomPick(), ReplacementPolicy::BIP::reset(), ReplacementPolicy::BRRIP::reset(), EtherSwitch::Interface::switchingDelay(), GarnetSyntheticTraffic::tick(), MemTest::tick(), DefaultFetch< Impl >::tick(), MultiperspectivePerceptron::train(), EtherLink::Link::transmit(), DistEtherLink::TxLink::transmit(), LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), MultiperspectivePerceptronTAGE::update(), and MultiperspectivePerceptron::update().
|
friend |
Definition at line 301 of file circular_queue.hh.
|
friend |
Definition at line 323 of file circular_queue.hh.