gem5  v20.1.0.0
Classes | Typedefs | Functions | Variables | Friends
The utility functions and constants API.

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 NodeTrie< 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)
 
iteratorCircularQueue< 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
 
iteratorCircularQueue< T >::iterator::operator++ ()
 Pre-increment operator. More...
 
iterator CircularQueue< T >::iterator::operator++ (int)
 Post-increment operator. More...
 
iteratorCircularQueue< T >::iterator::operator-- ()
 Pre-decrement operator. More...
 
iterator CircularQueue< T >::iterator::operator-- (int)
 Post-decrement operator. More...
 
iteratorCircularQueue< T >::iterator::operator+= (const difference_type &t)
 RandomAccessIterator requirements. More...
 
iteratorCircularQueue< 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 >
divCeil (const T &a, const U &b)
 
template<class T , class U >
roundUp (const T &val, const U &align)
 This function is used to align addresses in memory. More...
 
template<class T , class U >
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)
 

Detailed Description

These are a collection of utility functions and constants defined in src/base.

Typedef Documentation

◆ const_pointer

template<typename T >
using CircularQueue< T >::iterator::const_pointer = const value_type*

Definition at line 178 of file circular_queue.hh.

◆ const_reference

template<typename T >
using CircularQueue< T >::iterator::const_reference = const value_type&

Definition at line 176 of file circular_queue.hh.

◆ difference_type

template<typename T >
using CircularQueue< T >::iterator::difference_type = std::ptrdiff_t

Definition at line 174 of file circular_queue.hh.

◆ Handle

template<class Key , class Value >
typedef Node* Trie< Key, Value >::Handle

Definition at line 122 of file trie.hh.

◆ iterator_category

template<typename T >
using CircularQueue< T >::iterator::iterator_category = std::random_access_iterator_tag

Definition at line 179 of file circular_queue.hh.

◆ pointer

template<typename T >
using CircularQueue< T >::iterator::pointer = value_type*

Definition at line 177 of file circular_queue.hh.

◆ reference

template<typename T >
using CircularQueue< T >::iterator::reference = value_type&

Definition at line 175 of file circular_queue.hh.

◆ value_type

template<typename T >
using CircularQueue< T >::iterator::value_type = T

Iterator Traits.

Definition at line 173 of file circular_queue.hh.

Function Documentation

◆ advance_tail() [1/2]

template<typename T >
void CircularQueue< T >::advance_tail ( )
inline

◆ advance_tail() [2/2]

template<typename T >
void CircularQueue< T >::advance_tail ( uint32_t  len)
inline

Increases the tail by a specified number of steps.

Parameters
lenNumber of steps

Definition at line 723 of file circular_queue.hh.

◆ back()

template<typename T >
reference CircularQueue< T >::back ( )
inline

Definition at line 613 of file circular_queue.hh.

Referenced by LSQUnit< Impl >::insertLoad(), LSQUnit< Impl >::squash(), and TEST().

◆ begin() [1/2]

template<typename T >
iterator CircularQueue< T >::begin ( )
inline

◆ begin() [2/2]

template<typename T >
iterator CircularQueue< T >::begin ( ) const
inline

Definition at line 769 of file circular_queue.hh.

◆ capacity()

template<typename T >
size_t CircularQueue< T >::capacity ( ) const
inline

◆ ceilLog2()

template<class T >
int ceilLog2 ( const T &  n)
inline

◆ CircularQueue()

template<typename T >
CircularQueue< T >::CircularQueue ( uint32_t  size = 0)
inlineexplicit

Definition at line 522 of file circular_queue.hh.

◆ clear()

template<class Key , class Value >
void Trie< Key, Value >::clear ( )
inline

A method which removes all key/value pairs from the trie.

This is more efficient than trying to remove elements individually.

Definition at line 376 of file trie.hh.

◆ ContainerPrint()

template<class T >
m5::stl_helpers::ContainerPrint< T >::ContainerPrint ( std::ostream &  out)
inline

Definition at line 49 of file stl_helpers.hh.

◆ crc32()

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.

The crc is accomplished by reversing the input, the initial value and the output (remainder).

Parameters
dataInput data buffer pointer
crcInitial value of the checksum
sizeNumber of bytes
Returns
32-bit remainder of the checksum

Definition at line 59 of file crc.hh.

References data, ArmISA::i, ArmISA::j, and reverseBits().

◆ dereferenceable()

template<typename T >
bool CircularQueue< T >::iterator::dereferenceable ( ) const
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:

  • An iterator to the first element of a full queue (4,F,1,0): |o]|[*|o|o|
  • The end() iterator of a full queue (4,F,1,0): |o]|x[o|o|o| Sometimes, though, users will get the PTE iterator and expect it to work after growing the buffer on the tail, so we have to check if the iterator is still PTE.

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().

◆ divCeil()

template<class T , class U >
T divCeil ( const T &  a,
const U &  b 
)
inline

◆ empty()

template<typename T >
bool CircularQueue< T >::empty ( ) const
inline

◆ end() [1/2]

template<typename T >
iterator CircularQueue< T >::end ( )
inline

◆ end() [2/2]

template<typename T >
iterator CircularQueue< T >::end ( ) const
inline

Definition at line 796 of file circular_queue.hh.

◆ findCarry()

static bool findCarry ( int  width,
uint64_t  dest,
uint64_t  src1,
uint64_t  src2 
)
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().

◆ findNegative()

static bool findNegative ( int  width,
uint64_t  dest 
)
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().

◆ findOverflow()

static bool findOverflow ( int  width,
uint64_t  dest,
uint64_t  src1,
uint64_t  src2 
)
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().

◆ findParity()

static bool findParity ( int  width,
uint64_t  dest 
)
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().

◆ findZero()

static bool findZero ( int  width,
uint64_t  dest 
)
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().

◆ floorLog2()

template<class T >
std::enable_if<std::is_integral<T>::value, int>::type floorLog2 ( x)
inline

◆ flush()

template<typename T >
void CircularQueue< T >::flush ( )
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().

◆ front()

template<typename T >
reference CircularQueue< T >::front ( )
inline

◆ full()

template<typename T >
bool CircularQueue< T >::full ( ) const
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().

◆ head()

template<typename T >
uint32_t CircularQueue< T >::head ( ) const
inline

◆ insert()

template<class Key , class Value >
Handle Trie< Key, Value >::insert ( Key  key,
unsigned  width,
Value *  val 
)
inline

Method which inserts a key/value pair into the trie.

Parameters
keyThe key which can later be used to look up this value.
widthHow many bits of the key (from msb) should be used.
valA pointer to the value to store in the trie.
Returns
A Handle corresponding to this value.

Definition at line 210 of file trie.hh.

Referenced by RiscvISA::TLB::insert(), X86ISA::TLB::insert(), RiscvISA::TLB::unserialize(), and X86ISA::TLB::unserialize().

◆ isPowerOf2()

template<class T >
bool isPowerOf2 ( const T &  n)
inline

◆ iterator() [1/3]

template<typename T >
CircularQueue< T >::iterator::iterator ( )
inline

Trait reference type iterator satisfies OutputIterator, therefore reference must be T&.

Definition at line 191 of file circular_queue.hh.

◆ iterator() [2/3]

template<typename T >
CircularQueue< T >::iterator::iterator ( CircularQueue cq,
uint32_t  idx,
uint32_t  round 
)
inline

Definition at line 164 of file circular_queue.hh.

◆ iterator() [3/3]

template<typename T >
CircularQueue< T >::iterator::iterator ( const iterator it)
inline

Definition at line 196 of file circular_queue.hh.

◆ lookup()

template<class Key , class Value >
Value* Trie< Key, Value >::lookup ( Key  key)
inline

Method which looks up the Value corresponding to a particular key.

Parameters
keyThe key to look up.
Returns
The first Value matching this key, or NULL if none was found.

Definition at line 298 of file trie.hh.

Referenced by X86ISA::TLB::demapPage(), X86ISA::TLB::insert(), X86ISA::TLB::lookup(), and RiscvISA::TLB::lookup().

◆ operator!=()

template<typename T >
bool CircularQueue< T >::iterator::operator!= ( const iterator that)
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.

◆ operator()()

template<class T >
void m5::stl_helpers::ContainerPrint< T >::operator() ( const T &  elem)
inline

◆ operator*() [1/2]

template<typename T >
reference CircularQueue< T >::iterator::operator* ( )
inline

Dereference operator.

Definition at line 272 of file circular_queue.hh.

References CircularQueue< T >::iterator::_cq, and CircularQueue< T >::iterator::_idx.

◆ operator*() [2/2]

template<typename T >
const_reference CircularQueue< T >::iterator::operator* ( ) const
inline

◆ operator+()

template<typename T >
iterator CircularQueue< T >::iterator::operator+ ( const difference_type t)
inline

Addition operator.

Definition at line 413 of file circular_queue.hh.

References ArmISA::t.

◆ operator++() [1/2]

template<typename T >
iterator& CircularQueue< T >::iterator::operator++ ( )
inline

◆ operator++() [2/2]

template<typename T >
iterator CircularQueue< T >::iterator::operator++ ( int  )
inline

Post-increment operator.

Definition at line 326 of file circular_queue.hh.

References ArmISA::t.

◆ operator+=()

template<typename T >
iterator& CircularQueue< T >::iterator::operator+= ( const difference_type t)
inline

◆ operator-() [1/2]

template<typename T >
iterator CircularQueue< T >::iterator::operator- ( const difference_type t)
inline

Substraction operator.

Definition at line 433 of file circular_queue.hh.

References ArmISA::t.

◆ operator-() [2/2]

template<typename T >
difference_type CircularQueue< T >::iterator::operator- ( const iterator that)
inline

◆ operator--() [1/2]

template<typename T >
iterator& CircularQueue< T >::iterator::operator-- ( )
inline

◆ operator--() [2/2]

template<typename T >
iterator CircularQueue< T >::iterator::operator-- ( int  )
inline

Post-decrement operator.

Definition at line 376 of file circular_queue.hh.

References ArmISA::t.

◆ operator-=()

template<typename T >
iterator& CircularQueue< T >::iterator::operator-= ( const difference_type t)
inline

◆ operator->() [1/2]

template<typename T >
pointer CircularQueue< T >::iterator::operator-> ( )
inline

Dereference operator.

Rely on operator* to check for dereferenceability.

Definition at line 293 of file circular_queue.hh.

References CircularQueue< T >::iterator::_idx.

◆ operator->() [2/2]

template<typename T >
const_pointer CircularQueue< T >::iterator::operator-> ( ) const
inline

Definition at line 301 of file circular_queue.hh.

References CircularQueue< T >::iterator::_idx.

◆ operator<()

template<typename T >
bool CircularQueue< T >::iterator::operator< ( const iterator that) const
inline

◆ operator<<()

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.

Definition at line 77 of file stl_helpers.hh.

◆ operator<=()

template<typename T >
bool CircularQueue< T >::iterator::operator<= ( const iterator that) const
inline

Definition at line 504 of file circular_queue.hh.

◆ operator=()

template<typename T >
iterator& CircularQueue< T >::iterator::operator= ( const iterator it)
inline

◆ operator==()

template<typename T >
bool CircularQueue< T >::iterator::operator== ( const iterator that) const
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.

◆ operator>()

template<typename T >
bool CircularQueue< T >::iterator::operator> ( const iterator that) const
inline

Definition at line 492 of file circular_queue.hh.

◆ operator>=()

template<typename T >
bool CircularQueue< T >::iterator::operator>= ( const iterator that) const
inline

Definition at line 498 of file circular_queue.hh.

◆ operator[]()

template<typename T >
template<typename Idx >
std::enable_if<std::is_integral<Idx>::value,reference>::type CircularQueue< T >::iterator::operator[] ( const Idx &  index)
inline

Index operator.

The use of * tests for dereferenceability.

Definition at line 473 of file circular_queue.hh.

References MipsISA::index.

◆ pop_back()

template<typename T >
void CircularQueue< T >::pop_back ( )
inline

Circularly decrease the tail pointer.

Definition at line 678 of file circular_queue.hh.

Referenced by LSQUnit< Impl >::squash().

◆ pop_front()

template<typename T >
void CircularQueue< T >::pop_front ( size_t  num_elem = 1)
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().

◆ power()

uint64_t power ( uint32_t  n,
uint32_t  e 
)
inline

◆ push_back()

template<typename T >
void CircularQueue< T >::push_back ( typename Base::value_type  val)
inline

◆ Random() [1/2]

Random::Random ( )

Definition at line 48 of file random.cc.

References Random::init().

◆ random() [1/2]

template<typename T >
std::enable_if<std::is_integral<T>::value, T>::type Random::random ( )
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().

◆ random() [2/2]

template<typename T >
std::enable_if<std::is_integral<T>::value, T>::type Random::random ( min,
max 
)
inline

Definition at line 109 of file random.hh.

References Stats::dist, and Random::gen.

◆ Random() [2/2]

Random::Random ( uint32_t  s)

Definition at line 54 of file random.cc.

References Random::init(), and ArmISA::s.

◆ remove() [1/2]

template<class Key , class Value >
Value* Trie< Key, Value >::remove ( Handle  handle)
inline

Method to delete a value from the trie.

Parameters
nodeA Handle to remove.
Returns
The Value pointer from the removed entry.

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().

◆ remove() [2/2]

template<class Key , class Value >
Value* Trie< Key, Value >::remove ( Key  key)
inline

Method to lookup a value from the trie and then delete it.

Parameters
keyThe key to look up and then remove.
Returns
The Value pointer from the removed entry, if any.

Definition at line 361 of file trie.hh.

◆ roundDown()

template<class T , class U >
T roundDown ( const T &  val,
const U &  align 
)
inline

◆ roundUp()

template<class T , class U >
T roundUp ( const T &  val,
const U &  align 
)
inline

◆ size()

template<typename T >
uint32_t CircularQueue< T >::size ( ) const
inline

◆ tail()

template<typename T >
uint32_t CircularQueue< T >::tail ( ) const
inline

◆ Trie()

template<class Key , class Value >
Trie< Key, Value >::Trie ( )
inline

Definition at line 127 of file trie.hh.

◆ ~iterator()

template<typename T >
CircularQueue< T >::iterator::~iterator ( )
inline

Variable Documentation

◆ compileDate

const char* compileDate = __DATE__ " " __TIME__

Definition at line 32 of file date.cc.

Referenced by pybind_init_core().

◆ gem5Version

const char* gem5Version = "20.1.0.0"

Definition at line 32 of file version.cc.

Referenced by pybind_init_core().

◆ MaxBits

template<class Key , class Value >
const unsigned Trie< Key, Value >::MaxBits = sizeof(Key) * 8
static

Definition at line 133 of file trie.hh.

Referenced by Trie< Addr, TlbEntry >::extendMask(), and Trie< Addr, TlbEntry >::insert().

◆ random_mt

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().

Friends

◆ operator+

template<typename T >
iterator operator+ ( const difference_type t,
iterator it 
)
friend

Definition at line 422 of file circular_queue.hh.

◆ operator-

template<typename T >
iterator operator- ( const difference_type t,
iterator it 
)
friend

Definition at line 442 of file circular_queue.hh.


Generated on Wed Sep 30 2020 14:02:20 for gem5 by doxygen 1.8.17