gem5
v20.1.0.0
|
#include <sc_fxnum.hh>
Public Member Functions | |
const sc_fxval | operator- () const |
const sc_fxval | operator+ () const |
const sc_fxval | operator++ (int) |
const sc_fxval | operator-- (int) |
sc_fxnum & | operator++ () |
sc_fxnum & | operator-- () |
const sc_fxnum_bitref | operator[] (int) const |
sc_fxnum_bitref | operator[] (int) |
const sc_fxnum_bitref | bit (int) const |
sc_fxnum_bitref | bit (int) |
const sc_fxnum_subref | operator() (int, int) const |
sc_fxnum_subref | operator() (int, int) |
const sc_fxnum_subref | range (int, int) const |
sc_fxnum_subref | range (int, int) |
const sc_fxnum_subref | operator() () const |
sc_fxnum_subref | operator() () |
const sc_fxnum_subref | range () const |
sc_fxnum_subref | range () |
operator double () const | |
short | to_short () const |
unsigned short | to_ushort () const |
int | to_int () const |
unsigned int | to_uint () const |
long | to_long () const |
unsigned long | to_ulong () const |
int64 | to_int64 () const |
uint64 | to_uint64 () const |
float | to_float () const |
double | to_double () const |
const std::string | to_string () const |
const std::string | to_string (sc_numrep) const |
const std::string | to_string (sc_numrep, bool) const |
const std::string | to_string (sc_fmt) const |
const std::string | to_string (sc_numrep, sc_fmt) const |
const std::string | to_string (sc_numrep, bool, sc_fmt) const |
const std::string | to_dec () const |
const std::string | to_bin () const |
const std::string | to_oct () const |
const std::string | to_hex () const |
bool | is_neg () const |
bool | is_zero () const |
bool | is_normal () const |
bool | quantization_flag () const |
bool | overflow_flag () const |
const sc_fxval | value () const |
int | wl () const |
int | iwl () const |
sc_q_mode | q_mode () const |
sc_o_mode | o_mode () const |
int | n_bits () const |
const sc_fxtype_params & | type_params () const |
const sc_fxcast_switch & | cast_switch () const |
void | print (::std::ostream &=::std::cout) const |
void | scan (::std::istream &=::std::cin) |
void | dump (::std::ostream &=::std::cout) const |
void | observer_read () const |
bool | get_bit (int) const |
Protected Member Functions | |
sc_fxnum_observer * | observer () const |
void | cast () |
sc_fxnum (const sc_fxtype_params &, sc_enc, const sc_fxcast_switch &, sc_fxnum_observer *) | |
~sc_fxnum () | |
const scfx_rep * | get_rep () const |
bool | set_bit (int, bool) |
bool | get_slice (int, int, sc_bv_base &) const |
bool | set_slice (int, int, const sc_bv_base &) |
sc_fxnum_observer * | lock_observer () const |
void | unlock_observer (sc_fxnum_observer *) const |
Private Member Functions | |
sc_fxnum () | |
sc_fxnum (const sc_fxnum &) | |
Private Attributes | |
scfx_rep * | m_rep |
scfx_params | m_params |
bool | m_q_flag |
bool | m_o_flag |
sc_fxnum_observer * | m_observer |
Friends | |
class | sc_fxval |
class | sc_fxnum_bitref |
class | sc_fxnum_subref |
class | sc_fxnum_fast_bitref |
class | sc_fxnum_fast_subref |
template<typename T , typename B > | |
class | sc_gem5::TraceValFxnumBase |
void | neg (sc_fxval &, const sc_fxnum &) |
void | neg (sc_fxnum &, const sc_fxnum &) |
const friend sc_fxval | operator/ (const sc_fxnum &, const sc_fxnum &) |
const friend sc_fxval | operator<< (const sc_fxnum &, int) |
const friend sc_fxval | operator>> (const sc_fxnum &, int) |
void | lshift (sc_fxval &, const sc_fxnum &, int) |
void | rshift (sc_fxval &, const sc_fxnum &, int) |
void | lshift (sc_fxnum &, const sc_fxnum &, int) |
void | rshift (sc_fxnum &, const sc_fxnum &, int) |
Definition at line 483 of file sc_fxnum.hh.
|
inlineprotected |
Definition at line 2185 of file sc_fxnum.hh.
References SC_FXNUM_OBSERVER_CONSTRUCT_, and SC_FXNUM_OBSERVER_DEFAULT_.
|
inlineprotected |
Definition at line 2239 of file sc_fxnum.hh.
References m_rep, and SC_FXNUM_OBSERVER_DESTRUCT_.
|
private |
|
private |
|
inline |
Definition at line 2843 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, m_params, SC_ERROR_IF_, sc_fxnum_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2835 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, m_params, SC_ERROR_IF_, sc_fxnum_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inlineprotected |
Definition at line 2176 of file sc_fxnum.hh.
References sc_dt::scfx_rep::cast(), sc_dt::scfx_params::cast_switch(), sc_dt::scfx_rep::is_normal(), m_o_flag, m_params, m_q_flag, m_rep, SC_ERROR_IF_, sc_core::SC_ID_INVALID_FX_VALUE_, and sc_dt::SC_ON.
|
inline |
Definition at line 3073 of file sc_fxnum.hh.
References sc_dt::scfx_params::cast_switch(), and m_params.
void sc_dt::sc_fxnum::dump | ( | ::std::ostream & | os = ::std::cout | ) | const |
Definition at line 338 of file sc_fxnum.cc.
References m_observer, and SC_ASSERT_.
|
inline |
Definition at line 3087 of file sc_fxnum.hh.
References sc_dt::scfx_rep::get_bit(), ArmISA::i, and m_rep.
|
inlineprotected |
Definition at line 2247 of file sc_fxnum.hh.
References m_rep, and SC_FXNUM_OBSERVER_READ_.
|
inlineprotected |
Definition at line 3103 of file sc_fxnum.hh.
References sc_dt::scfx_rep::get_slice(), ArmISA::i, ArmISA::j, m_params, and m_rep.
|
inline |
Definition at line 2994 of file sc_fxnum.hh.
References sc_dt::scfx_rep::is_neg(), m_rep, and SC_FXNUM_OBSERVER_READ_.
|
inline |
Definition at line 3009 of file sc_fxnum.hh.
References sc_dt::scfx_rep::is_normal(), m_rep, and SC_FXNUM_OBSERVER_READ_.
|
inline |
Definition at line 3001 of file sc_fxnum.hh.
References sc_dt::scfx_rep::is_zero(), m_rep, and SC_FXNUM_OBSERVER_READ_.
|
inline |
Definition at line 3043 of file sc_fxnum.hh.
References sc_dt::scfx_params::iwl(), and m_params.
|
protected |
Definition at line 359 of file sc_fxnum.cc.
References ArmISA::c, sc_dt::scfx_params::q_mode(), sc_dt::SC_TRN, and X86ISA::val.
|
inline |
Definition at line 3061 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::n_bits().
|
inline |
Definition at line 3055 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::o_mode().
|
inlineprotected |
Definition at line 2170 of file sc_fxnum.hh.
References m_observer.
|
inline |
Definition at line 3080 of file sc_fxnum.hh.
References SC_FXNUM_OBSERVER_READ_.
|
inline |
Definition at line 2915 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_double().
sc_fxnum_subref sc_dt::sc_fxnum::operator() | ( | ) |
|
inline |
Definition at line 2891 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2862 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, ArmISA::j, m_params, SC_ERROR_IF_, sc_fxnum_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2852 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, ArmISA::j, m_params, SC_ERROR_IF_, sc_fxnum_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2262 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_fxval.
|
inline |
Definition at line 2805 of file sc_fxnum.hh.
|
inline |
Definition at line 2789 of file sc_fxnum.hh.
References ArmISA::c.
|
inline |
Definition at line 2255 of file sc_fxnum.hh.
References m_rep, sc_dt::neg_scfx_rep(), SC_FXNUM_OBSERVER_READ_, and sc_fxval.
|
inline |
Definition at line 2812 of file sc_fxnum.hh.
|
inline |
Definition at line 2797 of file sc_fxnum.hh.
References ArmISA::c.
|
inline |
Definition at line 2828 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, m_params, SC_ERROR_IF_, sc_fxnum_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2820 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, m_params, SC_ERROR_IF_, sc_fxnum_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3022 of file sc_fxnum.hh.
References m_o_flag.
void sc_dt::sc_fxnum::print | ( | ::std::ostream & | os = ::std::cout | ) | const |
Definition at line 324 of file sc_fxnum.cc.
|
inline |
Definition at line 3049 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::q_mode().
|
inline |
Definition at line 3016 of file sc_fxnum.hh.
References m_q_flag.
sc_fxnum_subref sc_dt::sc_fxnum::range | ( | ) |
|
inline |
Definition at line 2903 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2881 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, ArmISA::j, m_params, SC_ERROR_IF_, sc_fxnum_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2871 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), ArmISA::i, ArmISA::j, m_params, SC_ERROR_IF_, sc_fxnum_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
void sc_dt::sc_fxnum::scan | ( | ::std::istream & | is = ::std::cin | ) |
Definition at line 330 of file sc_fxnum.cc.
|
inlineprotected |
Definition at line 3094 of file sc_fxnum.hh.
References sc_dt::scfx_rep::clear(), ArmISA::i, m_params, m_rep, and sc_dt::scfx_rep::set().
|
inlineprotected |
Definition at line 3109 of file sc_fxnum.hh.
References ArmISA::i, ArmISA::j, m_params, m_rep, and sc_dt::scfx_rep::set_slice().
Referenced by sc_dt::sc_fxnum_fast_bitref::scan().
const std::string sc_dt::sc_fxnum::to_bin | ( | ) | const |
Definition at line 304 of file sc_fxnum.cc.
const std::string sc_dt::sc_fxnum::to_dec | ( | ) | const |
Definition at line 298 of file sc_fxnum.cc.
References MipsISA::is, and ArmISA::s.
|
inline |
Definition at line 2986 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_double().
|
inline |
Definition at line 2979 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_double().
const std::string sc_dt::sc_fxnum::to_hex | ( | ) | const |
Definition at line 316 of file sc_fxnum.cc.
|
inline |
Definition at line 2937 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
|
inline |
Definition at line 2944 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
|
inline |
Definition at line 2965 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
const std::string sc_dt::sc_fxnum::to_oct | ( | ) | const |
Definition at line 310 of file sc_fxnum.cc.
|
inline |
Definition at line 2923 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
const std::string sc_dt::sc_fxnum::to_string | ( | ) | const |
Definition at line 259 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
const std::string sc_dt::sc_fxnum::to_string | ( | sc_fmt | fmt | ) | const |
Definition at line 278 of file sc_fxnum.cc.
References m_params, m_rep, sc_dt::SC_F, sc_dt::SC_OCT, and sc_dt::scfx_rep::to_string().
const std::string sc_dt::sc_fxnum::to_string | ( | sc_numrep | numrep | ) | const |
Definition at line 265 of file sc_fxnum.cc.
References m_params, m_rep, sc_dt::SC_DEC, sc_dt::SC_F, and sc_dt::scfx_rep::to_string().
const std::string sc_dt::sc_fxnum::to_string | ( | sc_numrep | numrep, |
bool | w_prefix | ||
) | const |
Definition at line 271 of file sc_fxnum.cc.
References m_params, m_rep, sc_dt::SC_BIN, sc_dt::SC_F, and sc_dt::scfx_rep::to_string().
Definition at line 290 of file sc_fxnum.cc.
References m_params, m_rep, X86ISA::os, sc_dt::SC_DEC, sc_dt::SC_F, and sc_dt::scfx_rep::to_string().
Definition at line 284 of file sc_fxnum.cc.
References m_params, m_rep, sc_dt::SC_F, sc_dt::SC_HEX, and sc_dt::scfx_rep::to_string().
|
inline |
Definition at line 2951 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
|
inline |
Definition at line 2958 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
|
inline |
Definition at line 2972 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
|
inline |
Definition at line 2930 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_dt::scfx_rep::to_uint64().
|
inline |
Definition at line 3067 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::type_params().
|
protected |
Definition at line 368 of file sc_fxnum.cc.
|
inline |
Definition at line 3029 of file sc_fxnum.hh.
References m_rep, SC_FXNUM_OBSERVER_READ_, and sc_fxval.
|
inline |
Definition at line 3037 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::wl().
Definition at line 2550 of file sc_fxnum.hh.
Definition at line 2536 of file sc_fxnum.hh.
Definition at line 2277 of file sc_fxnum.hh.
Definition at line 2270 of file sc_fxnum.hh.
Definition at line 2356 of file sc_fxnum.hh.
Definition at line 2400 of file sc_fxnum.hh.
Definition at line 2407 of file sc_fxnum.hh.
Definition at line 2560 of file sc_fxnum.hh.
Definition at line 2543 of file sc_fxnum.hh.
|
friend |
Definition at line 487 of file sc_fxnum.hh.
Referenced by bit(), and operator[]().
|
friend |
Definition at line 489 of file sc_fxnum.hh.
|
friend |
Definition at line 490 of file sc_fxnum.hh.
|
friend |
Definition at line 488 of file sc_fxnum.hh.
Referenced by operator()(), and range().
|
friend |
Definition at line 485 of file sc_fxnum.hh.
Referenced by operator+(), operator-(), sc_dt::sc_fix::operator=(), sc_dt::sc_ufix::operator=(), and value().
|
friend |
Definition at line 493 of file sc_fxnum.hh.
|
private |
Definition at line 827 of file sc_fxnum.hh.
Referenced by cast(), and overflow_flag().
|
mutableprivate |
Definition at line 829 of file sc_fxnum.hh.
Referenced by dump(), observer(), and sc_dt::sc_fxnum_fast::observer().
|
private |
Definition at line 825 of file sc_fxnum.hh.
Referenced by bit(), cast(), cast_switch(), sc_dt::sc_fxnum_fast_subref::dump(), get_slice(), iwl(), n_bits(), o_mode(), operator()(), operator[](), sc_dt::sc_fxnum_fast_subref::print(), q_mode(), range(), set_bit(), set_slice(), to_string(), type_params(), and wl().
|
private |
Definition at line 826 of file sc_fxnum.hh.
Referenced by cast(), and quantization_flag().
|
private |
Definition at line 823 of file sc_fxnum.hh.
Referenced by cast(), sc_dt::sc_fxnum_fast_subref::dump(), get_bit(), get_rep(), get_slice(), is_neg(), is_normal(), is_zero(), operator double(), operator+(), operator-(), sc_dt::sc_fxnum_fast_subref::print(), set_bit(), set_slice(), to_double(), to_float(), to_int(), to_int64(), to_long(), to_short(), to_string(), to_uint(), to_uint64(), to_ulong(), to_ushort(), value(), and ~sc_fxnum().