ChampSim
champsim::msl Namespace Reference

Namespaces

 detail
 

Classes

class  base_fwcounter
 
class  lru_table
 

Typedefs

template<std::size_t WIDTH>
using fwcounter = base_fwcounter< signed long long int,(1<< WIDTH) - 1, 0 >
 
template<std::size_t WIDTH>
using sfwcounter = base_fwcounter< signed long long int,(1<<(WIDTH - 1)) - 1, -(1<<(WIDTH - 1))>
 

Functions

constexpr unsigned lg2 (uint64_t n)
 
constexpr uint64_t bitmask (std::size_t begin, std::size_t end=0)
 
constexpr uint64_t splice_bits (uint64_t upper, uint64_t lower, std::size_t bits)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter< vt, mxvl, mnvl > operator+ (base_fwcounter< vt, mxvl, mnvl > lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter< vt, mxvl, mnvl > operator- (base_fwcounter< vt, mxvl, mnvl > lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter< vt, mxvl, mnvl > operator* (base_fwcounter< vt, mxvl, mnvl > lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter< vt, mxvl, mnvl > operator/ (base_fwcounter< vt, mxvl, mnvl > lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool operator< (const base_fwcounter< vt, mxvl, mnvl > &lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool operator== (const base_fwcounter< vt, mxvl, mnvl > &lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool operator> (const base_fwcounter< vt, mxvl, mnvl > &lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool operator>= (const base_fwcounter< vt, mxvl, mnvl > &lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool operator<= (const base_fwcounter< vt, mxvl, mnvl > &lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool operator!= (const base_fwcounter< vt, mxvl, mnvl > &lhs, Numeric rhs)
 
template<typename vt , vt mxvl, vt mnvl>
base_fwcounter< vt, mxvl, mnvl > operator+ (base_fwcounter< vt, mxvl, mnvl > lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
base_fwcounter< vt, mxvl, mnvl > operator- (base_fwcounter< vt, mxvl, mnvl > lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
bool operator< (const base_fwcounter< vt, mxvl, mnvl > &lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
bool operator> (const base_fwcounter< vt, mxvl, mnvl > &lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
bool operator<= (const base_fwcounter< vt, mxvl, mnvl > &lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
bool operator>= (const base_fwcounter< vt, mxvl, mnvl > &lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
bool operator== (const base_fwcounter< vt, mxvl, mnvl > &lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 
template<typename vt , vt mxvl, vt mnvl>
bool operator!= (const base_fwcounter< vt, mxvl, mnvl > &lhs, const base_fwcounter< vt, mxvl, mnvl > &rhs)
 

Typedef Documentation

◆ fwcounter

template<std::size_t WIDTH>
using champsim::msl::fwcounter = typedef base_fwcounter<signed long long int, (1 << WIDTH) - 1, 0>

◆ sfwcounter

template<std::size_t WIDTH>
using champsim::msl::sfwcounter = typedef base_fwcounter<signed long long int, (1 << (WIDTH - 1)) - 1, -(1 << (WIDTH - 1))>

Function Documentation

◆ bitmask()

constexpr uint64_t champsim::msl::bitmask ( std::size_t  begin,
std::size_t  end = 0 
)
constexpr

◆ lg2()

constexpr unsigned champsim::msl::lg2 ( uint64_t  n)
constexpr

◆ operator!=() [1/2]

template<typename vt , vt mxvl, vt mnvl>
bool champsim::msl::operator!= ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator!=() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool champsim::msl::operator!= ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
Numeric  rhs 
)

◆ operator*()

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter<vt, mxvl, mnvl> champsim::msl::operator* ( base_fwcounter< vt, mxvl, mnvl >  lhs,
Numeric  rhs 
)

◆ operator+() [1/2]

template<typename vt , vt mxvl, vt mnvl>
base_fwcounter<vt, mxvl, mnvl> champsim::msl::operator+ ( base_fwcounter< vt, mxvl, mnvl >  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator+() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter<vt, mxvl, mnvl> champsim::msl::operator+ ( base_fwcounter< vt, mxvl, mnvl >  lhs,
Numeric  rhs 
)

◆ operator-() [1/2]

template<typename vt , vt mxvl, vt mnvl>
base_fwcounter<vt, mxvl, mnvl> champsim::msl::operator- ( base_fwcounter< vt, mxvl, mnvl >  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator-() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter<vt, mxvl, mnvl> champsim::msl::operator- ( base_fwcounter< vt, mxvl, mnvl >  lhs,
Numeric  rhs 
)

◆ operator/()

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
base_fwcounter<vt, mxvl, mnvl> champsim::msl::operator/ ( base_fwcounter< vt, mxvl, mnvl >  lhs,
Numeric  rhs 
)

◆ operator<() [1/2]

template<typename vt , vt mxvl, vt mnvl>
bool champsim::msl::operator< ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator<() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool champsim::msl::operator< ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
Numeric  rhs 
)

◆ operator<=() [1/2]

template<typename vt , vt mxvl, vt mnvl>
bool champsim::msl::operator<= ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator<=() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool champsim::msl::operator<= ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
Numeric  rhs 
)

◆ operator==() [1/2]

template<typename vt , vt mxvl, vt mnvl>
bool champsim::msl::operator== ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator==() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool champsim::msl::operator== ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
Numeric  rhs 
)

◆ operator>() [1/2]

template<typename vt , vt mxvl, vt mnvl>
bool champsim::msl::operator> ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator>() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool champsim::msl::operator> ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
Numeric  rhs 
)

◆ operator>=() [1/2]

template<typename vt , vt mxvl, vt mnvl>
bool champsim::msl::operator>= ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
const base_fwcounter< vt, mxvl, mnvl > &  rhs 
)

◆ operator>=() [2/2]

template<typename vt , vt mxvl, vt mnvl, typename Numeric >
bool champsim::msl::operator>= ( const base_fwcounter< vt, mxvl, mnvl > &  lhs,
Numeric  rhs 
)

◆ splice_bits()

constexpr uint64_t champsim::msl::splice_bits ( uint64_t  upper,
uint64_t  lower,
std::size_t  bits 
)
constexpr