gem5 v24.0.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 &c, const sc_fxnum &a) |
void | neg (sc_fxnum &c, const sc_fxnum &a) |
const sc_fxval | operator/ (const sc_fxnum &a, const sc_fxnum &b) |
const sc_fxval | operator<< (const sc_fxnum &a, int b) |
const sc_fxval | operator>> (const sc_fxnum &a, int b) |
void | lshift (sc_fxval &c, const sc_fxnum &a, int b) |
void | rshift (sc_fxval &c, const sc_fxnum &a, int b) |
void | lshift (sc_fxnum &c, const sc_fxnum &a, int b) |
void | rshift (sc_fxnum &c, const sc_fxnum &a, int b) |
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(), 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(), 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_, and sc_core::SC_ID_INVALID_FX_VALUE_.
|
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 307 of file sc_fxnum.cc.
References sc_dt::scfx_params::dump(), sc_dt::scfx_rep::dump(), m_o_flag, m_params, m_q_flag, and m_rep.
Referenced by sc_dt::sc_fxnum_bitref::dump(), and sc_dt::sc_fxnum_subref::dump().
|
inline |
Definition at line 3087 of file sc_fxnum.hh.
References sc_dt::scfx_rep::get_bit(), and m_rep.
Referenced by sc_dt::sc_fxnum_bitref::get(), sc_dt::sc_fix::operator~(), and sc_dt::sc_ufix::operator~().
|
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(), m_params, and m_rep.
Referenced by sc_dt::sc_fxnum_subref::get().
|
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.
Referenced by sc_dt::sc_fix::operator~(), and sc_dt::sc_ufix::operator~().
|
protected |
Definition at line 328 of file sc_fxnum.cc.
References m_observer, and SC_ASSERT_.
|
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().
|
inline |
Definition at line 2897 of file sc_fxnum.hh.
References m_params, operator()(), and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2891 of file sc_fxnum.hh.
References m_params, operator()(), and sc_dt::scfx_params::wl().
Referenced by operator()(), and operator()().
|
inline |
Definition at line 2862 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), 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(), 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.
Referenced by sc_dt::sc_fix::operator++(), and sc_dt::sc_ufix::operator++().
|
inline |
Definition at line 2789 of file sc_fxnum.hh.
References 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.
Referenced by sc_dt::sc_fix::operator--(), and sc_dt::sc_ufix::operator--().
|
inline |
Definition at line 2797 of file sc_fxnum.hh.
References c.
|
inline |
Definition at line 2828 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), 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(), 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 293 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
|
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.
|
inline |
Definition at line 2909 of file sc_fxnum.hh.
References m_params, range(), and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2903 of file sc_fxnum.hh.
References m_params, range(), and sc_dt::scfx_params::wl().
|
inline |
Definition at line 2881 of file sc_fxnum.hh.
References sc_dt::scfx_params::fwl(), 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(), 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 299 of file sc_fxnum.cc.
|
inlineprotected |
Definition at line 3094 of file sc_fxnum.hh.
References sc_dt::scfx_rep::clear(), m_params, m_rep, and sc_dt::scfx_rep::set().
Referenced by sc_dt::sc_fxnum_bitref::set().
|
inlineprotected |
Definition at line 3109 of file sc_fxnum.hh.
References m_params, m_rep, and sc_dt::scfx_rep::set_slice().
Referenced by sc_dt::sc_fxnum_subref::set().
const std::string sc_dt::sc_fxnum::to_bin | ( | ) | const |
Definition at line 273 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_dec | ( | ) | const |
Definition at line 267 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
|
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 285 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
|
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 279 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
|
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 228 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 247 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_numrep | numrep | ) | const |
Definition at line 234 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_numrep | numrep, |
bool | w_prefix ) const |
Definition at line 240 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
Definition at line 259 of file sc_fxnum.cc.
References m_params, m_rep, and sc_dt::scfx_rep::to_string().
Definition at line 253 of file sc_fxnum.cc.
References m_params, m_rep, 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 337 of file sc_fxnum.cc.
References m_observer, and SC_ASSERT_.
|
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().
Referenced by sc_dt::sc_fix::operator~(), and sc_dt::sc_ufix::operator~().
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 2399 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(), bit(), operator[](), 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()(), operator()(), range(), and range().
|
friend |
Definition at line 485 of file sc_fxnum.hh.
Referenced by operator+(), sc_dt::sc_fix::operator++(), sc_dt::sc_ufix::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(), dump(), and overflow_flag().
|
mutableprivate |
Definition at line 829 of file sc_fxnum.hh.
Referenced by lock_observer(), observer(), sc_dt::sc_fxnum_fast::observer(), and unlock_observer().
|
private |
Definition at line 825 of file sc_fxnum.hh.
Referenced by bit(), bit(), cast(), cast_switch(), dump(), get_slice(), 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 826 of file sc_fxnum.hh.
Referenced by cast(), dump(), and quantization_flag().
|
private |
Definition at line 823 of file sc_fxnum.hh.
Referenced by cast(), dump(), get_bit(), get_rep(), get_slice(), is_neg(), is_normal(), is_zero(), operator double(), operator+(), operator-(), print(), set_bit(), set_slice(), to_bin(), to_dec(), to_double(), to_float(), to_hex(), to_int(), to_int64(), to_long(), to_oct(), to_short(), to_string(), to_string(), to_string(), to_string(), to_string(), to_string(), to_uint(), to_uint64(), to_ulong(), to_ushort(), value(), and ~sc_fxnum().