gem5 v24.0.0.0
|
#include <sc_fxnum.hh>
Public Member Functions | |
const sc_fxval_fast | operator- () const |
const sc_fxval_fast | operator+ () const |
DECL_BIN_OP_T (/, int64) DECL_BIN_OP_T(/ | |
uint64 | DECL_BIN_OP_T (/, const sc_int_base &) DECL_BIN_OP_T(/ |
uint64 const sc_uint_base & | DECL_BIN_OP_T (/, const sc_signed &) friend const sc_fxval_fast operator<<(const sc_fxnum_fast & |
const sc_fxval_fast | operator++ (int) |
const sc_fxval_fast | operator-- (int) |
sc_fxnum_fast & | operator++ () |
sc_fxnum_fast & | operator-- () |
const sc_fxnum_fast_bitref | operator[] (int) const |
sc_fxnum_fast_bitref | operator[] (int) |
const sc_fxnum_fast_bitref | bit (int) const |
sc_fxnum_fast_bitref | bit (int) |
const sc_fxnum_fast_subref | operator() (int, int) const |
sc_fxnum_fast_subref | operator() (int, int) |
const sc_fxnum_fast_subref | range (int, int) const |
sc_fxnum_fast_subref | range (int, int) |
const sc_fxnum_fast_subref | operator() () const |
sc_fxnum_fast_subref | operator() () |
const sc_fxnum_fast_subref | range () const |
sc_fxnum_fast_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_fast | 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 |
Public Attributes | |
uint64 const sc_uint_base | int |
Protected Member Functions | |
sc_fxnum_fast_observer * | observer () const |
void | cast () |
sc_fxnum_fast (const sc_fxtype_params &, sc_enc, const sc_fxcast_switch &, sc_fxnum_fast_observer *) | |
~sc_fxnum_fast () | |
double | get_val () 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_fast_observer * | lock_observer () const |
void | unlock_observer (sc_fxnum_fast_observer *) const |
Private Member Functions | |
sc_fxnum_fast () | |
sc_fxnum_fast (const sc_fxnum_fast &) | |
Private Attributes | |
double | m_val |
scfx_params | m_params |
bool | m_q_flag |
bool | m_o_flag |
sc_fxnum_fast_observer * | m_observer |
Friends | |
class | sc_fxval_fast |
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_fast &c, const sc_fxnum_fast &a) |
void | neg (sc_fxnum_fast &c, const sc_fxnum_fast &a) |
const sc_fxval_fast | operator/ (const sc_fxnum_fast &a, const sc_fxnum_fast &b) |
const sc_fxval_fast | operator>> (const sc_fxnum_fast &a, int b) |
void | lshift (sc_fxval_fast &c, const sc_fxnum_fast &a, int b) |
void | rshift (sc_fxval_fast &c, const sc_fxnum_fast &a, int b) |
void | lshift (sc_fxnum_fast &c, const sc_fxnum_fast &a, int b) |
void | rshift (sc_fxnum_fast &c, const sc_fxnum_fast &a, int b) |
Definition at line 844 of file sc_fxnum.hh.
|
inlineprotected |
Definition at line 3143 of file sc_fxnum.hh.
References SC_FXNUM_FAST_OBSERVER_CONSTRUCT_, and SC_FXNUM_FAST_OBSERVER_DEFAULT_.
|
inlineprotected |
Definition at line 3212 of file sc_fxnum.hh.
References SC_FXNUM_FAST_OBSERVER_DESTRUCT_.
|
private |
|
private |
|
inline |
Definition at line 3798 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3790 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
protected |
Definition at line 565 of file sc_fxnum.cc.
References sc_dt::scfx_params::cast_switch(), sc_dt::is_inf(), sc_dt::is_nan(), is_zero(), m_o_flag, m_params, m_q_flag, m_val, sc_dt::overflow(), sc_dt::quantization(), SC_ERROR_IF_, and sc_core::SC_ID_INVALID_FX_VALUE_.
Referenced by operator++(), operator++(), operator--(), and operator--().
|
inline |
Definition at line 4044 of file sc_fxnum.hh.
References sc_dt::scfx_params::cast_switch(), and m_params.
uint64 sc_dt::sc_fxnum_fast::DECL_BIN_OP_T | ( | / | , |
const sc_int_base & | ) |
uint64 const sc_uint_base & sc_dt::sc_fxnum_fast::DECL_BIN_OP_T | ( | / | , |
const sc_signed & | ) const & |
sc_dt::sc_fxnum_fast::DECL_BIN_OP_T | ( | / | , |
int64 | ) |
void sc_dt::sc_fxnum_fast::dump | ( | ::std::ostream & | os = ::std::cout | ) | const |
Definition at line 686 of file sc_fxnum.cc.
References sc_dt::scfx_params::dump(), m_o_flag, m_params, m_q_flag, and m_val.
Referenced by sc_dt::sc_fxnum_fast_bitref::dump(), and sc_dt::sc_fxnum_fast_subref::dump().
bool sc_dt::sc_fxnum_fast::get_bit | ( | int | i | ) | const |
Definition at line 706 of file sc_fxnum.cc.
References sc_dt::is_inf(), sc_dt::is_nan(), is_normal(), is_zero(), and m_val.
Referenced by sc_dt::sc_fxnum_fast_bitref::get(), sc_dt::sc_fix_fast::operator~(), sc_dt::sc_ufix_fast::operator~(), set_bit(), and set_slice().
|
protected |
Definition at line 771 of file sc_fxnum.cc.
References b, sc_dt::is_inf(), sc_dt::is_nan(), is_normal(), sc_dt::sc_bv_base::length(), and m_val.
Referenced by sc_dt::sc_fxnum_fast_subref::get().
|
inlineprotected |
Definition at line 3219 of file sc_fxnum.hh.
References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
|
inline |
Definition at line 3963 of file sc_fxnum.hh.
References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
|
inline |
Definition at line 3980 of file sc_fxnum.hh.
References is_normal(), is_zero(), m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
Referenced by get_bit(), get_slice(), is_normal(), and to_uint64().
|
inline |
Definition at line 3971 of file sc_fxnum.hh.
References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
Referenced by cast(), get_bit(), and is_normal().
|
inline |
Definition at line 4014 of file sc_fxnum.hh.
References sc_dt::scfx_params::iwl(), and m_params.
Referenced by sc_dt::sc_fix_fast::operator~(), and sc_dt::sc_ufix_fast::operator~().
|
protected |
Definition at line 853 of file sc_fxnum.cc.
References m_observer, and SC_ASSERT_.
|
inline |
Definition at line 4032 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::n_bits().
|
inline |
Definition at line 4026 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::o_mode().
|
inlineprotected |
Definition at line 3136 of file sc_fxnum.hh.
References sc_dt::sc_fxnum::m_observer.
|
inline |
Definition at line 4051 of file sc_fxnum.hh.
References SC_FXNUM_FAST_OBSERVER_READ_.
|
inline |
Definition at line 3868 of file sc_fxnum.hh.
References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
|
inline |
Definition at line 3850 of file sc_fxnum.hh.
References m_params, operator()(), and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3844 of file sc_fxnum.hh.
References m_params, operator()(), and sc_dt::scfx_params::wl().
Referenced by operator()(), and operator()().
|
inline |
Definition at line 3816 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3806 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3234 of file sc_fxnum.hh.
References m_val, SC_FXNUM_FAST_OBSERVER_READ_, and sc_fxval_fast.
|
inline |
Definition at line 3754 of file sc_fxnum.hh.
References cast(), m_val, SC_FXNUM_FAST_OBSERVER_READ_, and SC_FXNUM_FAST_OBSERVER_WRITE_.
Referenced by sc_dt::sc_fix_fast::operator++(), and sc_dt::sc_ufix_fast::operator++().
|
inline |
Definition at line 3730 of file sc_fxnum.hh.
References c, cast(), m_val, SC_FXNUM_FAST_OBSERVER_READ_, SC_FXNUM_FAST_OBSERVER_WRITE_, and sc_fxval_fast.
|
inline |
Definition at line 3227 of file sc_fxnum.hh.
References m_val, SC_FXNUM_FAST_OBSERVER_READ_, and sc_fxval_fast.
|
inline |
Definition at line 3764 of file sc_fxnum.hh.
References cast(), m_val, SC_FXNUM_FAST_OBSERVER_READ_, and SC_FXNUM_FAST_OBSERVER_WRITE_.
Referenced by sc_dt::sc_fix_fast::operator--(), and sc_dt::sc_ufix_fast::operator--().
|
inline |
Definition at line 3742 of file sc_fxnum.hh.
References c, cast(), m_val, SC_FXNUM_FAST_OBSERVER_READ_, SC_FXNUM_FAST_OBSERVER_WRITE_, and sc_fxval_fast.
|
inline |
Definition at line 3783 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3775 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_bitref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3994 of file sc_fxnum.hh.
References m_o_flag.
void sc_dt::sc_fxnum_fast::print | ( | ::std::ostream & | os = ::std::cout | ) | const |
Definition at line 672 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
|
inline |
Definition at line 4020 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::q_mode().
|
inline |
Definition at line 3988 of file sc_fxnum.hh.
References m_q_flag.
|
inline |
Definition at line 3862 of file sc_fxnum.hh.
References m_params, range(), and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3856 of file sc_fxnum.hh.
References m_params, range(), and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3835 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
|
inline |
Definition at line 3825 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), m_params, SC_ERROR_IF_, sc_fxnum_fast_subref, sc_core::SC_ID_OUT_OF_RANGE_, and sc_dt::scfx_params::wl().
void sc_dt::sc_fxnum_fast::scan | ( | ::std::istream & | is = ::std::cin | ) |
Definition at line 678 of file sc_fxnum.cc.
|
protected |
Definition at line 742 of file sc_fxnum.cc.
References sc_dt::scfx_params::enc(), get_bit(), sc_dt::is_inf(), sc_dt::is_nan(), sc_dt::scfx_params::iwl(), m_params, m_val, sc_dt::SC_TC_, and sc_dt::scfx_pow2().
Referenced by sc_dt::sc_fxnum_fast_bitref::set().
|
protected |
Definition at line 818 of file sc_fxnum.cc.
References sc_dt::scfx_params::enc(), get_bit(), sc_dt::is_inf(), sc_dt::is_nan(), sc_dt::scfx_params::iwl(), sc_dt::sc_bv_base::length(), m_params, m_val, sc_dt::SC_TC_, and sc_dt::scfx_pow2().
Referenced by sc_dt::sc_fxnum_fast_subref::set().
const std::string sc_dt::sc_fxnum_fast::to_bin | ( | ) | const |
Definition at line 653 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
const std::string sc_dt::sc_fxnum_fast::to_dec | ( | ) | const |
Definition at line 647 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
|
inline |
Definition at line 3955 of file sc_fxnum.hh.
References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
|
inline |
Definition at line 3948 of file sc_fxnum.hh.
References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.
const std::string sc_dt::sc_fxnum_fast::to_hex | ( | ) | const |
Definition at line 665 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
|
inline |
Definition at line 3890 of file sc_fxnum.hh.
References to_uint64().
|
inline |
Definition at line 3897 of file sc_fxnum.hh.
References to_uint64().
|
inline |
Definition at line 3934 of file sc_fxnum.hh.
References to_uint64().
const std::string sc_dt::sc_fxnum_fast::to_oct | ( | ) | const |
Definition at line 659 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
|
inline |
Definition at line 3876 of file sc_fxnum.hh.
References to_uint64().
const std::string sc_dt::sc_fxnum_fast::to_string | ( | ) | const |
Definition at line 608 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
const std::string sc_dt::sc_fxnum_fast::to_string | ( | sc_fmt | fmt | ) | const |
Definition at line 627 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
const std::string sc_dt::sc_fxnum_fast::to_string | ( | sc_numrep | numrep | ) | const |
Definition at line 614 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
const std::string sc_dt::sc_fxnum_fast::to_string | ( | sc_numrep | numrep, |
bool | w_prefix ) const |
Definition at line 620 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
const std::string sc_dt::sc_fxnum_fast::to_string | ( | sc_numrep | numrep, |
bool | w_prefix, | ||
sc_fmt | fmt ) const |
Definition at line 639 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
Definition at line 633 of file sc_fxnum.cc.
References m_params, m_val, and sc_dt::to_string().
|
inline |
Definition at line 3904 of file sc_fxnum.hh.
References to_uint64().
|
inline |
Definition at line 3911 of file sc_fxnum.hh.
References is_normal(), m_val, and sc_dt::UINT64_ONE.
Referenced by to_int(), to_int64(), to_long(), to_short(), to_uint(), to_ulong(), and to_ushort().
|
inline |
Definition at line 3941 of file sc_fxnum.hh.
References to_uint64().
|
inline |
Definition at line 3883 of file sc_fxnum.hh.
References to_uint64().
|
inline |
Definition at line 4038 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::type_params().
|
protected |
Definition at line 862 of file sc_fxnum.cc.
References m_observer, and SC_ASSERT_.
|
inline |
Definition at line 4000 of file sc_fxnum.hh.
References m_val, SC_FXNUM_FAST_OBSERVER_READ_, and sc_fxval_fast.
|
inline |
Definition at line 4008 of file sc_fxnum.hh.
References m_params, and sc_dt::scfx_params::wl().
Referenced by sc_dt::sc_fix_fast::operator~(), and sc_dt::sc_ufix_fast::operator~().
|
friend |
Definition at line 3507 of file sc_fxnum.hh.
|
friend |
Definition at line 3493 of file sc_fxnum.hh.
|
friend |
Definition at line 3249 of file sc_fxnum.hh.
|
friend |
Definition at line 3242 of file sc_fxnum.hh.
|
friend |
Definition at line 3320 of file sc_fxnum.hh.
|
friend |
Definition at line 3369 of file sc_fxnum.hh.
|
friend |
Definition at line 3516 of file sc_fxnum.hh.
|
friend |
Definition at line 3500 of file sc_fxnum.hh.
|
friend |
Definition at line 848 of file sc_fxnum.hh.
|
friend |
Definition at line 850 of file sc_fxnum.hh.
Referenced by bit(), bit(), operator[](), and operator[]().
|
friend |
Definition at line 851 of file sc_fxnum.hh.
Referenced by operator()(), operator()(), range(), and range().
|
friend |
Definition at line 849 of file sc_fxnum.hh.
|
friend |
Definition at line 846 of file sc_fxnum.hh.
Referenced by operator+(), sc_dt::sc_fix_fast::operator++(), operator++(), sc_dt::sc_ufix_fast::operator++(), operator-(), sc_dt::sc_fix_fast::operator--(), operator--(), sc_dt::sc_ufix_fast::operator--(), sc_dt::operator/(), sc_dt::operator/(), sc_dt::operator<<(), and value().
|
friend |
Definition at line 854 of file sc_fxnum.hh.
uint64 const sc_uint_base sc_dt::sc_fxnum_fast::int |
Definition at line 957 of file sc_fxnum.hh.
|
private |
Definition at line 1185 of file sc_fxnum.hh.
Referenced by cast(), dump(), and overflow_flag().
|
mutableprivate |
Definition at line 1187 of file sc_fxnum.hh.
Referenced by lock_observer(), and unlock_observer().
|
private |
Definition at line 1183 of file sc_fxnum.hh.
Referenced by bit(), bit(), cast(), cast_switch(), dump(), iwl(), n_bits(), o_mode(), operator()(), operator()(), operator()(), operator()(), operator[](), operator[](), print(), q_mode(), range(), range(), range(), range(), set_bit(), set_slice(), to_bin(), to_dec(), to_hex(), to_oct(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), type_params(), and wl().
|
private |
Definition at line 1184 of file sc_fxnum.hh.
Referenced by cast(), dump(), and quantization_flag().
|
private |
Definition at line 1181 of file sc_fxnum.hh.
Referenced by cast(), dump(), get_bit(), get_slice(), get_val(), is_neg(), is_normal(), is_zero(), operator double(), operator+(), operator++(), operator++(), operator-(), operator--(), operator--(), print(), set_bit(), set_slice(), to_bin(), to_dec(), to_double(), to_float(), to_hex(), to_oct(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_uint64(), and value().