gem5
v20.1.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, uint32_t idx, uint32_t round) | |
CircularQueue< T >::iterator::iterator () | |
Trait reference type iterator satisfies OutputIterator, therefore reference must be T&. More... | |
CircularQueue< T >::iterator::iterator (const iterator &it) | |
iterator & | CircularQueue< T >::iterator::operator= (const iterator &it) |
CircularQueue< T >::iterator::~iterator () | |
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-- () |
Pre-decrement operator. 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< std::is_integral< Idx >::value, reference >::type | 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 |
CircularQueue< T >::CircularQueue (uint32_t size=0) | |
void | CircularQueue< T >::flush () |
Remove all the elements in the queue. More... | |
reference | CircularQueue< T >::front () |
reference | CircularQueue< T >::back () |
uint32_t | CircularQueue< T >::head () const |
uint32_t | CircularQueue< T >::tail () const |
size_t | CircularQueue< T >::capacity () const |
uint32_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 Base::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 (uint32_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< std::is_integral< T >::value, int >::type | 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< std::is_integral< T >::value, T >::type | 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< std::is_integral< T >::value, T >::type | 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 = "20.1.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 178 of file circular_queue.hh.
using CircularQueue< T >::iterator::const_reference = const value_type& |
Definition at line 176 of file circular_queue.hh.
using CircularQueue< T >::iterator::difference_type = std::ptrdiff_t |
Definition at line 174 of file circular_queue.hh.
using CircularQueue< T >::iterator::iterator_category = std::random_access_iterator_tag |
Definition at line 179 of file circular_queue.hh.
using CircularQueue< T >::iterator::pointer = value_type* |
Definition at line 177 of file circular_queue.hh.
using CircularQueue< T >::iterator::reference = value_type& |
Definition at line 175 of file circular_queue.hh.
using CircularQueue< T >::iterator::value_type = T |
Iterator Traits.
Definition at line 173 of file circular_queue.hh.
|
inline |
Increases the tail by one.
Check for wrap-arounds to update the round counter.
Definition at line 704 of file circular_queue.hh.
Referenced by CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::advance_tail(), LSQUnit< Impl >::insertLoad(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::push_back(), and CircleBuf< char >::write().
|
inline |
Increases the tail by a specified number of steps.
len | Number of steps |
Definition at line 723 of file circular_queue.hh.
|
inline |
Definition at line 613 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::insertLoad(), LSQUnit< Impl >::squash(), and TEST().
|
inline |
Iterators.
Definition at line 755 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::checkSnoop(), CircleBuf< char >::peek(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::pop_front(), LSQUnit< Impl >::squash(), and TEST().
|
inline |
Definition at line 769 of file circular_queue.hh.
|
inline |
Definition at line 628 of file circular_queue.hh.
Referenced by Fifo< uint8_t >::capacity(), LSQUnit< Impl >::drainSanityCheck(), LSQUnit< Impl >::insertLoad(), LSQUnit< Impl >::numFreeLoadEntries(), CircularQueue< T >::iterator::operator+=(), CircularQueue< T >::iterator::operator-(), CircularQueue< T >::iterator::operator-=(), TEST(), and CircleBuf< char >::write().
|
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 522 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, it is not the past-the-end iterator and the index is a valid index to that queue. PTE test is required to distinguish between:
Definition at line 233 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::iterator::_round, 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(), 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(), 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 734 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::checkSnoop(), Terminal::console_in(), Terminal::dataAvailable(), CircularQueue< T >::iterator::decrementable(), Fifo< uint8_t >::empty(), Terminal::readData(), and TEST().
|
inline |
Definition at line 784 of file circular_queue.hh.
Referenced by CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::begin(), LSQUnit< Impl >::checkSnoop(), LSQUnit< Impl >::checkViolations(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::getIterator(), LSQUnit< Impl >::insertStore(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::pop_front(), LSQUnit< Impl >::squash(), TEST(), and CircleBuf< char >::write().
|
inline |
Definition at line 796 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, type, ULL, MipsISA::ux, and RiscvISA::x.
Referenced by Histogram::add(), CheckTable::addCheck(), 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 536 of file circular_queue.hh.
Referenced by arrayParamIn(), Fifo< uint8_t >::flush(), and Prefetcher::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate().
|
inline |
Definition at line 608 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 744 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::insertLoad(), Prefetcher::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate(), LSQUnit< Impl >::lqFull(), Prefetcher::SBOOE::notifyFill(), and TEST().
|
inline |
Definition at line 618 of file circular_queue.hh.
Referenced by CircularQueue< T >::iterator::decrementable(), LSQUnit< Impl >::getLoadHead(), 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(), FALRU::FALRU(), Gicv2m::Gicv2m(), StatisticalCorrector::SCThreadHistory::initLocalHistory(), Prefetcher::IrregularStreamBuffer::IrregularStreamBuffer(), LocalBP::LocalBP(), MemFootprintProbe::MemFootprintProbe(), PciDevice::PciDevice(), roundDown(), roundUp(), RubySystem::RubySystem(), SectorTags::SectorTags(), SimpleIndirectPredictor::SimpleIndirectPredictor(), Prefetcher::STeMS::STeMS(), StoreSet::StoreSet(), TEST(), TournamentBP::TournamentBP(), TreePLRURP::TreePLRURP(), and StackDistCalc::updateTree().
|
inline |
Trait reference type iterator satisfies OutputIterator, therefore reference must be T&.
Definition at line 191 of file circular_queue.hh.
|
inline |
Definition at line 164 of file circular_queue.hh.
|
inline |
Definition at line 196 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 262 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 272 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.
|
inline |
Definition at line 281 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.
|
inline |
|
inline |
Pre-increment operator.
Definition at line 311 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::iterator::_round, and CircularQueue< T >::increase().
|
inline |
|
inline |
RandomAccessIterator requirements.
Definition at line 383 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::iterator::_round, CircularQueue< T >::capacity(), CircularQueue< T >::moduloAdd(), and ArmISA::t.
|
inline |
|
inline |
Difference operator.
that + ret == this
Definition at line 454 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::iterator::_round, CircularQueue< T >::capacity(), and CircularQueue< T >::sub().
|
inline |
Pre-decrement operator.
Definition at line 361 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::iterator::_round, CircularQueue< T >::decrease(), and CircularQueue< T >::iterator::decrementable().
|
inline |
|
inline |
Definition at line 394 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, CircularQueue< T >::iterator::_round, CircularQueue< T >::capacity(), CircularQueue< T >::moduloSub(), and ArmISA::t.
|
inline |
Dereference operator.
Rely on operator* to check for dereferenceability.
Definition at line 293 of file circular_queue.hh.
References CircularQueue< T >::iterator::_idx.
|
inline |
Definition at line 301 of file circular_queue.hh.
References CircularQueue< T >::iterator::_idx.
|
inline |
Comparisons.
Definition at line 481 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, and CircularQueue< T >::iterator::_round.
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 504 of file circular_queue.hh.
|
inline |
Definition at line 203 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, and CircularQueue< T >::iterator::_round.
|
inline |
InputIterator.
Equality operator. Two iterators must point to the same, possibly null, circular queue and the same element on it, including PTE, to be equal. In case the clients the the PTE iterator and then grow on the back and expect it to work, we have to check if the PTE is still PTE
Definition at line 249 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, and CircularQueue< T >::iterator::_round.
|
inline |
Definition at line 492 of file circular_queue.hh.
|
inline |
Definition at line 498 of file circular_queue.hh.
|
inline |
Index operator.
The use of * tests for dereferenceability.
Definition at line 473 of file circular_queue.hh.
References MipsISA::index.
|
inline |
Circularly decrease the tail pointer.
Definition at line 678 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. Check that the queue is not empty. And set it to empty if it had only one value prior to insertion.
@params num_elem number of elements to remove
Definition at line 663 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::commitLoad(), CircleBuf< char >::read(), 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 692 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(), DramGen::getNextPacket(), NvmGen::getNextPacket(), HybridGen::getNextPacket(), CheckTable::getRandomCheck(), RandomRP::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(), 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(), BIPRP::reset(), BRRIPRP::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(), RiscvProcess::argsInit(), MipsProcess::argsInit(), PowerProcess::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(), RiscvProcess::argsInit(), PowerProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), ArmProcess32::ArmProcess32(), ArmProcess64::ArmProcess64(), ChunkGenerator::ChunkGenerator(), GuestABI::Argument< Aapcs32, Composite, typename std::enable_if< IsAapcs32Composite< Composite >::value >::type >::get(), X86ISA::I386Process::I386Process(), X86ISA::FsWorkload::initState(), GuestABI::Aapcs32ArgumentBase::loadFromStack(), MipsProcess::MipsProcess(), Shader::mmap(), mmapFunc(), mremapFunc(), munmapFunc(), PowerProcess::PowerProcess(), RiscvProcess32::RiscvProcess32(), RiscvProcess64::RiscvProcess64(), Sparc32Process::Sparc32Process(), Sparc64Process::Sparc64Process(), TEST(), Process::updateBias(), MemState::updateBrkRegion(), and X86ISA::X86_64Process::X86_64Process().
|
inline |
Definition at line 633 of file circular_queue.hh.
Referenced by Terminal::accept(), arrayParamOut(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::CircularQueue(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::moduloAdd(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::moduloSub(), Prefetcher::SBOOE::notifyFill(), CircleBuf< char >::peek(), Fifo< uint8_t >::size(), CircularQueue< Prefetcher::STeMS::RegionMissOrderBufferEntry >::sub(), and TEST().
|
inline |
Definition at line 623 of file circular_queue.hh.
Referenced by LSQUnit< Impl >::insertLoad(), LSQUnit< Impl >::insertStore(), Prefetcher::PIF::notifyRetiredInst(), LSQUnit< Impl >::squash(), and TEST().
|
inline |
Definition at line 214 of file circular_queue.hh.
References CircularQueue< T >::iterator::_cq, CircularQueue< T >::iterator::_idx, and CircularQueue< T >::iterator::_round.
const char* compileDate = __DATE__ " " __TIME__ |
Definition at line 32 of file date.cc.
Referenced by pybind_init_core().
const char* gem5Version = "20.1.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(), DramGen::genStartAddr(), NvmGen::genStartAddr(), HybridGen::genStartAddr(), SimpleMemory::getLatency(), RandomGen::getNextPacket(), LinearGen::getNextPacket(), DramGen::getNextPacket(), NvmGen::getNextPacket(), HybridGen::getNextPacket(), CheckTable::getRandomCheck(), RandomRP::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(), 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(), BIPRP::reset(), BRRIPRP::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 422 of file circular_queue.hh.
|
friend |
Definition at line 442 of file circular_queue.hh.