gem5
v20.0.0.2
|
#include <scfx_rep.hh>
Public Member Functions | |
scfx_rep () | |
scfx_rep (int) | |
scfx_rep (unsigned int) | |
scfx_rep (long) | |
scfx_rep (unsigned long) | |
scfx_rep (double) | |
scfx_rep (const char *) | |
scfx_rep (int64) | |
scfx_rep (uint64) | |
scfx_rep (const sc_signed &) | |
scfx_rep (const sc_unsigned &) | |
scfx_rep (const scfx_rep &) | |
~scfx_rep () | |
void * | operator new (std::size_t) |
void | operator delete (void *, std::size_t) |
void | from_string (const char *, int) |
double | to_double () const |
uint64 | to_uint64 () const |
const char * | to_string (sc_numrep, int, sc_fmt, const scfx_params *=0) const |
void | operator= (const scfx_rep &) |
void | lshift (int) |
void | rshift (int) |
void | cast (const scfx_params &, bool &, bool &) |
bool | is_neg () const |
bool | is_zero () const |
bool | is_nan () const |
bool | is_inf () const |
bool | is_normal () const |
void | set_zero (int=1) |
void | set_nan () |
void | set_inf (int) |
bool | get_bit (int) const |
bool | set (int, const scfx_params &) |
bool | clear (int, const scfx_params &) |
bool | get_slice (int, int, const scfx_params &, sc_bv_base &) const |
bool | set_slice (int, int, const scfx_params &, const sc_bv_base &) |
void | print (::std::ostream &) const |
void | dump (::std::ostream &) const |
void | get_type (int &, int &, sc_enc &) const |
bool | rounding_flag () const |
Private Types | |
enum | state { normal, infinity, not_a_number } |
Private Member Functions | |
unsigned int | divide_by_ten () |
int | find_lsw () const |
int | find_msw () const |
void | find_sw () |
void | multiply_by_ten () |
void | normalize (int) |
scfx_mant * | resize (int, int) const |
void | set_bin (int) |
void | set_oct (int, int) |
void | set_hex (int, int) |
void | shift_left (int) |
void | shift_right (int) |
const scfx_index | calc_indices (int) const |
void | o_extend (const scfx_index &, sc_enc) |
bool | o_bit_at (const scfx_index &) const |
bool | o_zero_left (const scfx_index &) const |
bool | o_zero_right (const scfx_index &) const |
void | o_set_low (const scfx_index &, sc_enc) |
void | o_set_high (const scfx_index &, const scfx_index &, sc_enc, int=1) |
void | o_set (const scfx_index &, const scfx_index &, sc_enc, bool) |
void | o_invert (const scfx_index &) |
bool | q_bit (const scfx_index &) const |
void | q_clear (const scfx_index &) |
void | q_incr (const scfx_index &) |
bool | q_odd (const scfx_index &) const |
bool | q_zero (const scfx_index &) const |
void | resize_to (int, int=0) |
int | size () const |
void | toggle_tc () |
void | quantization (const scfx_params &, bool &) |
void | overflow (const scfx_params &, bool &) |
void | round (int) |
Private Attributes | |
scfx_mant | m_mant |
int | m_wp |
int | m_sign |
state | m_state |
int | m_msw |
int | m_lsw |
bool | m_r_flag |
Definition at line 137 of file scfx_rep.hh.
|
private |
Enumerator | |
---|---|
normal | |
infinity | |
not_a_number |
Definition at line 139 of file scfx_rep.hh.
sc_dt::scfx_rep::scfx_rep | ( | ) |
Definition at line 99 of file scfx_rep.cc.
References set_zero().
Referenced by sc_dt::add_scfx_rep(), sc_dt::div_scfx_rep(), sc_dt::lsh_scfx_rep(), sc_dt::mult_scfx_rep(), sc_dt::neg_scfx_rep(), sc_dt::overflow_scfx_rep(), sc_dt::quantization_scfx_rep(), sc_dt::rsh_scfx_rep(), and sc_dt::sub_scfx_rep().
|
explicit |
Definition at line 106 of file scfx_rep.cc.
References ArmISA::a, sc_dt::scfx_mant::clear(), m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, normal, and set_zero().
|
explicit |
Definition at line 125 of file scfx_rep.cc.
References ArmISA::a, sc_dt::scfx_mant::clear(), m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, normal, and set_zero().
|
explicit |
Definition at line 139 of file scfx_rep.cc.
References ArmISA::a, sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), find_sw(), m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, normal, and set_zero().
|
explicit |
Definition at line 168 of file scfx_rep.cc.
References ArmISA::a, sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), find_sw(), m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, normal, and set_zero().
|
explicit |
Definition at line 193 of file scfx_rep.cc.
References sc_dt::scfx_mant::clear(), ArmISA::id, infinity, is_inf(), is_nan(), is_normal(), m_mant, m_sign, m_state, sc_dt::mantissa0_size, normalize(), not_a_number, and sc_dt::SCFX_IEEE_DOUBLE_M_SIZE.
|
inlineexplicit |
Definition at line 313 of file scfx_rep.hh.
References from_string(), and sc_dt::SC_DEFAULT_CTE_WL_.
|
explicit |
Definition at line 218 of file scfx_rep.cc.
References ArmISA::a, sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), find_sw(), m_mant, m_sign, m_state, m_wp, normal, and set_zero().
|
explicit |
Definition at line 241 of file scfx_rep.cc.
References ArmISA::a, sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), find_sw(), m_mant, m_sign, m_state, m_wp, normal, and set_zero().
|
explicit |
Definition at line 258 of file scfx_rep.cc.
References ArmISA::a, sc_dt::scfx_index::bi(), calc_indices(), sc_dt::scfx_mant::clear(), find_sw(), ArmISA::i, sc_dt::sc_signed::iszero(), sc_dt::sc_signed::length(), m_mant, m_sign, m_state, m_wp, sc_dt::n_word(), normal, resize_to(), set_zero(), sc_dt::sc_signed::sign(), size(), sc_dt::scfx_index::wi(), and RiscvISA::x.
|
explicit |
Definition at line 293 of file scfx_rep.cc.
References sc_dt::scfx_index::bi(), calc_indices(), sc_dt::scfx_mant::clear(), find_sw(), ArmISA::i, sc_dt::sc_unsigned::iszero(), sc_dt::sc_unsigned::length(), m_mant, m_sign, m_state, m_wp, sc_dt::n_word(), normal, resize_to(), set_zero(), size(), sc_dt::scfx_index::wi(), and RiscvISA::x.
sc_dt::scfx_rep::scfx_rep | ( | const scfx_rep & | a | ) |
Definition at line 318 of file scfx_rep.cc.
|
inline |
Definition at line 321 of file scfx_rep.hh.
|
inlineprivate |
Definition at line 426 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::bits_in_word, and m_wp.
Referenced by clear(), sc_dt::div_scfx_rep(), get_bit(), overflow(), quantization(), scfx_rep(), and set().
void sc_dt::scfx_rep::cast | ( | const scfx_params & | params, |
bool & | q_flag, | ||
bool & | o_flag | ||
) |
Definition at line 2024 of file scfx_rep.cc.
References is_neg(), is_zero(), m_sign, overflow(), and quantization().
bool scfx_rep::clear | ( | int | i, |
const scfx_params & | params | ||
) |
Definition at line 2429 of file scfx_rep.cc.
References sc_dt::scfx_index::bi(), calc_indices(), sc_dt::scfx_params::enc(), find_sw(), is_neg(), is_normal(), sc_dt::scfx_params::iwl(), m_mant, o_extend(), resize_to(), size(), toggle_tc(), sc_dt::scfx_index::wi(), and RiscvISA::x.
Referenced by sc_dt::sc_fxnum::set_bit(), and set_slice().
|
private |
Definition at line 2144 of file scfx_rep.cc.
References ArmISA::i, sc_dt::word_short::l, m_mant, m_msw, m_wp, sc_dt::remainder, and sc_dt::word_short::s.
Referenced by sc_dt::print_dec().
void scfx_rep::dump | ( | ::std::ostream & | os | ) | const |
Definition at line 2526 of file scfx_rep.cc.
References ArmISA::i, infinity, m_lsw, m_mant, m_sign, m_state, m_wp, normal, not_a_number, and size().
Referenced by sc_dt::sc_fxval::dump().
|
inlineprivate |
Definition at line 687 of file scfx_rep.hh.
References ArmISA::i, m_mant, and size().
Referenced by sc_dt::div_scfx_rep(), and find_sw().
|
inlineprivate |
|
inlineprivate |
Definition at line 707 of file scfx_rep.hh.
References find_lsw(), find_msw(), m_lsw, and m_msw.
Referenced by sc_dt::add_scfx_rep(), clear(), sc_dt::div_scfx_rep(), from_string(), lshift(), sc_dt::multiply(), normalize(), overflow(), sc_dt::print_dec(), quantization(), round(), rshift(), scfx_rep(), set(), and sc_dt::sub_scfx_rep().
void sc_dt::scfx_rep::from_string | ( | const char * | s, |
int | cte_wl | ||
) |
Definition at line 389 of file scfx_rep.cc.
References X86ISA::base, sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), sc_dt::complement(), div_scfx_rep, ArmISA::e, find_sw(), ArmISA::i, sc_dt::inc(), infinity, ArmISA::j, length, M5_FALLTHROUGH, m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, sc_dt::min_mant, multiply_by_ten(), sc_dt::n_word(), normal, not_a_number, MipsISA::p, sc_dt::pow10_fx, resize_to(), ArmISA::s, sc_dt::SC_BIN, sc_dt::SC_BIN_SM, sc_dt::SC_BIN_US, sc_dt::SC_CSD, sc_dt::SC_DEC, sc_dt::SC_HEX, sc_dt::SC_HEX_SM, sc_dt::SC_HEX_US, sc_dt::sc_max(), sc_dt::SC_OCT, sc_dt::SC_OCT_SM, sc_dt::SC_OCT_US, sc_dt::scfx_csd2tc(), sc_dt::scfx_exp_start(), SCFX_FAIL_IF_, sc_dt::scfx_find_msb(), sc_dt::scfx_is_digit(), sc_dt::scfx_is_inf(), sc_dt::scfx_is_nan(), sc_dt::scfx_parse_prefix(), sc_dt::scfx_parse_sign(), sc_dt::scfx_to_digit(), set_bin(), set_hex(), set_oct(), sc_dt::scfx_mant::size(), and size().
Referenced by scfx_rep().
bool scfx_rep::get_bit | ( | int | i | ) | const |
Definition at line 2360 of file scfx_rep.cc.
References sc_dt::scfx_index::bi(), calc_indices(), is_neg(), is_normal(), m_mant, size(), toggle_tc(), sc_dt::scfx_index::wi(), and RiscvISA::x.
Referenced by sc_dt::sc_fxval::get_bit(), sc_dt::sc_fxnum::get_bit(), get_slice(), get_type(), and sc_dt::print_other().
bool scfx_rep::get_slice | ( | int | i, |
int | j, | ||
const scfx_params & | , | ||
sc_bv_base & | bv | ||
) | const |
Definition at line 2465 of file scfx_rep.cc.
References get_bit(), is_inf(), is_nan(), ArmISA::j, MipsISA::k, MipsISA::l, and sc_dt::sc_bv_base::length().
Referenced by sc_dt::sc_fxnum::get_slice().
void scfx_rep::get_type | ( | int & | wl, |
int & | iwl, | ||
sc_enc & | enc | ||
) | const |
Definition at line 2570 of file scfx_rep.cc.
References sc_dt::bits_in_word, get_bit(), is_inf(), is_nan(), is_neg(), is_zero(), m_lsw, m_mant, m_wp, sc_dt::SC_TC_, sc_dt::SC_US_, sc_dt::scfx_find_lsb(), and sc_dt::scfx_find_msb().
Referenced by sc_dt::sc_fxval::get_type().
|
inline |
Definition at line 390 of file scfx_rep.hh.
References infinity, and m_state.
Referenced by sc_dt::add_scfx_rep(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), get_slice(), get_type(), sc_dt::sc_fxval::is_inf(), sc_dt::multiply(), round(), scfx_rep(), set_slice(), sc_dt::sub_scfx_rep(), to_double(), and to_string().
|
inline |
Definition at line 388 of file scfx_rep.hh.
References m_state, and not_a_number.
Referenced by sc_dt::add_scfx_rep(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), get_slice(), get_type(), sc_dt::sc_fxval::is_nan(), sc_dt::multiply(), round(), scfx_rep(), set_slice(), sc_dt::sub_scfx_rep(), to_double(), and to_string().
|
inline |
Definition at line 372 of file scfx_rep.hh.
References m_sign.
Referenced by cast(), clear(), sc_dt::cmp_scfx_rep(), get_bit(), get_type(), sc_dt::sc_fxval::is_neg(), sc_dt::sc_fxnum::is_neg(), overflow(), sc_dt::print_dec(), sc_dt::print_other(), quantization(), set(), to_string(), and toggle_tc().
|
inline |
Definition at line 392 of file scfx_rep.hh.
References m_state, and normal.
Referenced by clear(), get_bit(), sc_dt::sc_fxval::is_normal(), sc_dt::sc_fxnum::is_normal(), lshift(), rshift(), scfx_rep(), set(), and to_uint64().
|
inline |
Definition at line 375 of file scfx_rep.hh.
References ArmISA::i, m_mant, m_state, normal, and size().
Referenced by cast(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), get_type(), sc_dt::sc_fxval::is_zero(), sc_dt::sc_fxnum::is_zero(), sc_dt::multiply(), overflow(), sc_dt::print_dec(), sc_dt::print_other(), round(), to_double(), to_string(), and to_uint64().
void sc_dt::scfx_rep::lshift | ( | int | n | ) |
Definition at line 1593 of file scfx_rep.cc.
References sc_dt::bits_in_word, find_sw(), is_normal(), m_mant, m_msw, m_wp, resize_to(), rshift(), sc_dt::scfx_find_msb(), shift_left(), and size().
Referenced by sc_dt::div_scfx_rep(), sc_dt::lsh_scfx_rep(), rshift(), and sc_dt::rshift().
|
private |
Definition at line 2178 of file scfx_rep.cc.
References sc_dt::add_mants(), sc_dt::bits_in_word, m_mant, sc_dt::scfx_mant::size(), and size().
Referenced by from_string(), and sc_dt::print_dec().
|
private |
Definition at line 2209 of file scfx_rep.cc.
References sc_dt::bits_in_word, find_sw(), m_wp, ArmISA::shift, and shift_left().
Referenced by scfx_rep().
|
inlineprivate |
Definition at line 463 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by sc_dt::div_scfx_rep(), and overflow().
|
inlineprivate |
Definition at line 440 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, m_sign, SC_ASSERT_, sc_dt::SC_US_, size(), and sc_dt::scfx_index::wi().
Referenced by clear(), overflow(), and set().
|
inlineprivate |
Definition at line 590 of file scfx_rep.hh.
References sc_dt::scfx_index::bi(), ArmISA::i, m_mant, size(), and sc_dt::scfx_index::wi().
Referenced by overflow().
|
inlineprivate |
Definition at line 557 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, SC_ASSERT_, sc_dt::SC_TC_, size(), and sc_dt::scfx_index::wi().
Referenced by overflow().
|
inlineprivate |
Definition at line 524 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, m_sign, SC_ASSERT_, sc_dt::SC_TC_, size(), and sc_dt::scfx_index::wi().
Referenced by overflow().
|
inlineprivate |
Definition at line 506 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), sc_dt::scfx_mant::clear(), m_mant, m_sign, SC_ASSERT_, sc_dt::SC_TC_, size(), and sc_dt::scfx_index::wi().
Referenced by overflow().
|
inlineprivate |
Definition at line 474 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by overflow().
|
inlineprivate |
Definition at line 491 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by overflow().
void sc_dt::scfx_rep::operator delete | ( | void * | ptr, |
std::size_t | size | ||
) |
Definition at line 360 of file scfx_rep.cc.
References sc_dt::list, sc_dt::scfx_rep_node::next, and size().
void * sc_dt::scfx_rep::operator new | ( | std::size_t | size | ) |
Definition at line 339 of file scfx_rep.cc.
References sc_dt::scfx_rep_node::data, ArmISA::i, sc_dt::scfx_rep_node::next, and size().
|
inline |
Definition at line 325 of file scfx_rep.hh.
References m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, round(), and sc_dt::SC_DEFAULT_MAX_WL_.
|
private |
Definition at line 1863 of file scfx_rep.cc.
References calc_indices(), sc_dt::scfx_params::enc(), find_sw(), is_neg(), is_zero(), sc_dt::scfx_params::iwl(), sc_dt::scfx_params::n_bits(), o_bit_at(), o_extend(), o_invert(), sc_dt::scfx_params::o_mode(), o_set(), o_set_high(), o_set_low(), o_zero_left(), o_zero_right(), X86ISA::over, resize_to(), SC_ERROR_IF_, sc_core::SC_ID_WRAP_SM_NOT_DEFINED_, sc_dt::SC_SAT, sc_dt::SC_SAT_SYM, sc_dt::SC_SAT_ZERO, sc_dt::SC_TC_, sc_dt::SC_US_, sc_dt::SC_WRAP, sc_dt::SC_WRAP_SM, set_zero(), size(), toggle_tc(), sc_dt::scfx_index::wi(), sc_dt::scfx_params::wl(), and RiscvISA::x.
Referenced by cast(), and sc_dt::overflow_scfx_rep().
void scfx_rep::print | ( | ::std::ostream & | os | ) | const |
Definition at line 2515 of file scfx_rep.cc.
References sc_dt::SC_DEC, sc_dt::SC_E, and to_string().
Referenced by sc_dt::sc_fxval::print().
|
inlineprivate |
Definition at line 601 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by quantization(), and round().
|
inlineprivate |
Definition at line 617 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by quantization(), and round().
|
inlineprivate |
Definition at line 630 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, resize_to(), SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by sc_dt::div_scfx_rep(), quantization(), and round().
|
inlineprivate |
Definition at line 651 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by quantization(), and round().
|
inlineprivate |
Definition at line 662 of file scfx_rep.hh.
References PowerISA::bi, sc_dt::scfx_index::bi(), ArmISA::i, m_mant, SC_ASSERT_, size(), and sc_dt::scfx_index::wi().
Referenced by quantization(), and round().
|
private |
Definition at line 1779 of file scfx_rep.cc.
References calc_indices(), find_sw(), is_neg(), sc_dt::scfx_params::iwl(), q_bit(), q_clear(), q_incr(), sc_dt::scfx_params::q_mode(), q_odd(), q_zero(), resize_to(), sc_dt::SC_RND, sc_dt::SC_RND_CONV, sc_dt::SC_RND_INF, sc_dt::SC_RND_MIN_INF, sc_dt::SC_RND_ZERO, sc_dt::SC_TRN, sc_dt::SC_TRN_ZERO, size(), sc_dt::scfx_index::wi(), sc_dt::scfx_params::wl(), and RiscvISA::x.
Referenced by cast(), and sc_dt::quantization_scfx_rep().
|
private |
Definition at line 2231 of file scfx_rep.cc.
References sc_dt::scfx_mant::clear(), ArmISA::j, m_lsw, m_mant, m_msw, m_wp, and ArmISA::shift.
Referenced by sc_dt::align().
|
inlineprivate |
Definition at line 414 of file scfx_rep.hh.
References m_lsw, m_mant, m_msw, m_wp, sc_dt::scfx_mant::resize_to(), and size().
Referenced by sc_dt::add_scfx_rep(), clear(), sc_dt::div_scfx_rep(), from_string(), lshift(), sc_dt::multiply(), overflow(), sc_dt::print_dec(), q_incr(), quantization(), rshift(), scfx_rep(), set(), and sc_dt::sub_scfx_rep().
|
private |
Definition at line 2614 of file scfx_rep.cc.
References PowerISA::bi, sc_dt::bits_in_word, find_sw(), is_inf(), is_nan(), is_zero(), m_lsw, m_mant, m_r_flag, q_bit(), q_clear(), q_incr(), q_odd(), q_zero(), sc_dt::scfx_find_lsb(), sc_dt::scfx_find_msb(), and RiscvISA::x.
Referenced by sc_dt::add_scfx_rep(), sc_dt::multiply(), operator=(), and sc_dt::sub_scfx_rep().
|
inline |
Definition at line 411 of file scfx_rep.hh.
References m_r_flag.
Referenced by sc_dt::sc_fxval::rounding_flag().
void sc_dt::scfx_rep::rshift | ( | int | n | ) |
Definition at line 1624 of file scfx_rep.cc.
References sc_dt::bits_in_word, find_sw(), is_normal(), lshift(), m_lsw, m_mant, m_wp, resize_to(), sc_dt::scfx_find_lsb(), shift_right(), and size().
Referenced by lshift(), sc_dt::rsh_scfx_rep(), and sc_dt::rshift().
bool scfx_rep::set | ( | int | i, |
const scfx_params & | params | ||
) |
Definition at line 2390 of file scfx_rep.cc.
References sc_dt::scfx_index::bi(), calc_indices(), sc_dt::scfx_params::enc(), find_sw(), is_neg(), is_normal(), sc_dt::scfx_params::iwl(), m_mant, o_extend(), resize_to(), size(), toggle_tc(), sc_dt::scfx_index::wi(), and RiscvISA::x.
Referenced by sc_dt::sc_fxnum::set_bit().
|
private |
Definition at line 2252 of file scfx_rep.cc.
References m_mant.
Referenced by sc_dt::div_scfx_rep(), and from_string().
|
private |
|
inline |
Definition at line 305 of file scfx_rep.hh.
Referenced by sc_dt::add_scfx_rep(), sc_dt::div_scfx_rep(), sc_dt::multiply(), and sc_dt::sub_scfx_rep().
|
inline |
Definition at line 298 of file scfx_rep.hh.
Referenced by sc_dt::add_scfx_rep(), sc_dt::div_scfx_rep(), sc_dt::multiply(), sc_dt::scfx_pow10::scfx_pow10(), and sc_dt::sub_scfx_rep().
|
private |
bool scfx_rep::set_slice | ( | int | i, |
int | j, | ||
const scfx_params & | params, | ||
const sc_bv_base & | bv | ||
) |
Definition at line 2486 of file scfx_rep.cc.
References clear(), is_inf(), is_nan(), ArmISA::j, MipsISA::k, MipsISA::l, sc_dt::sc_bv_base::length(), and to_bool().
Referenced by sc_dt::sc_fxnum::set_slice().
|
inline |
Definition at line 289 of file scfx_rep.hh.
Referenced by sc_dt::div_scfx_rep(), sc_dt::multiply(), overflow(), and scfx_rep().
|
private |
Definition at line 2311 of file scfx_rep.cc.
References sc_dt::bits_in_word, ArmISA::i, m_mant, ArmISA::n, SC_ASSERT_, shift_right(), and size().
Referenced by sc_dt::div_scfx_rep(), lshift(), normalize(), and shift_right().
|
private |
Definition at line 2336 of file scfx_rep.cc.
References sc_dt::bits_in_word, ArmISA::i, m_mant, ArmISA::n, SC_ASSERT_, shift_left(), and size().
Referenced by rshift(), and shift_left().
|
inlineprivate |
Definition at line 370 of file scfx_rep.hh.
References m_mant, and sc_dt::scfx_mant::size().
Referenced by sc_dt::add_scfx_rep(), sc_dt::align(), clear(), sc_dt::compare_msw_ff(), sc_dt::div_scfx_rep(), dump(), find_lsw(), find_msw(), from_string(), get_bit(), is_zero(), lshift(), multiply_by_ten(), o_bit_at(), o_extend(), o_invert(), o_set(), o_set_high(), o_set_low(), o_zero_left(), o_zero_right(), operator delete(), operator new(), overflow(), sc_dt::print_dec(), q_bit(), q_clear(), q_incr(), q_odd(), q_zero(), quantization(), resize_to(), rshift(), scfx_rep(), set(), shift_left(), shift_right(), sc_dt::sub_scfx_rep(), and sc_dt::sub_with_index().
double sc_dt::scfx_rep::to_double | ( | ) | const |
Definition at line 722 of file scfx_rep.cc.
References sc_dt::bits_in_word, ArmISA::id, is_inf(), is_nan(), is_zero(), m_lsw, m_mant, m_msw, m_sign, m_wp, sc_dt::mantissa0_size, sc_dt::scfx_find_msb(), sc_dt::SCFX_IEEE_DOUBLE_E_MAX, sc_dt::SCFX_IEEE_DOUBLE_E_MIN, sc_dt::SCFX_IEEE_DOUBLE_M_SIZE, sc_dt::scfx_pow2(), and ArmISA::shift.
Referenced by sc_dt::sc_fxval::operator double(), sc_dt::sc_fxnum::operator double(), sc_dt::sc_fxval::to_double(), sc_dt::sc_fxnum::to_double(), sc_dt::sc_fxval::to_float(), and sc_dt::sc_fxnum::to_float().
const char * sc_dt::scfx_rep::to_string | ( | sc_numrep | numrep, |
int | w_prefix, | ||
sc_fmt | fmt, | ||
const scfx_params * | params = 0 |
||
) | const |
Definition at line 1140 of file scfx_rep.cc.
References sc_dt::scfx_string::clear(), is_inf(), is_nan(), is_neg(), is_zero(), sc_dt::print_dec(), sc_dt::print_other(), ArmISA::s, sc_dt::SC_BIN_US, sc_dt::SC_DEC, sc_dt::SC_HEX_US, sc_dt::SC_NOBASE, sc_dt::SC_OCT_US, sc_dt::scfx_print_inf(), and sc_dt::scfx_print_nan().
Referenced by print(), sc_dt::sc_fxval::to_bin(), sc_dt::sc_fxval::to_dec(), sc_dt::sc_fxval::to_hex(), sc_dt::sc_fxval::to_oct(), and sc_dt::sc_fxval::to_string().
uint64 sc_dt::scfx_rep::to_uint64 | ( | ) | const |
Definition at line 834 of file scfx_rep.cc.
References sc_dt::bits_in_word, is_normal(), is_zero(), m_lsw, m_mant, m_sign, m_wp, and ArmISA::shift.
Referenced by sc_dt::sc_fxval::to_int(), sc_dt::sc_fxnum::to_int(), sc_dt::sc_fxval::to_int64(), sc_dt::sc_fxnum::to_int64(), sc_dt::sc_fxval::to_long(), sc_dt::sc_fxnum::to_long(), sc_dt::sc_fxval::to_short(), sc_dt::sc_fxnum::to_short(), sc_dt::sc_fxval::to_uint(), sc_dt::sc_fxnum::to_uint(), sc_dt::sc_fxval::to_uint64(), sc_dt::sc_fxnum::to_uint64(), sc_dt::sc_fxval::to_ulong(), sc_dt::sc_fxnum::to_ulong(), sc_dt::sc_fxval::to_ushort(), and sc_dt::sc_fxnum::to_ushort().
|
inlineprivate |
Definition at line 714 of file scfx_rep.hh.
References sc_dt::complement(), sc_dt::inc(), is_neg(), m_mant, and sc_dt::scfx_mant::size().
Referenced by clear(), get_bit(), overflow(), and set().
Definition at line 1217 of file scfx_rep.cc.
|
friend |
Definition at line 2051 of file scfx_rep.cc.
Referenced by sc_dt::add_scfx_rep(), and sc_dt::sub_scfx_rep().
Definition at line 1726 of file scfx_rep.cc.
Definition at line 1657 of file scfx_rep.cc.
Referenced by sc_dt::add_scfx_rep(), sc_dt::cmp_scfx_rep(), and sc_dt::sub_scfx_rep().
Definition at line 2095 of file scfx_rep.cc.
Referenced by sc_dt::div_scfx_rep().
Definition at line 1495 of file scfx_rep.cc.
Referenced by from_string().
Definition at line 355 of file scfx_rep.hh.
|
friend |
Definition at line 347 of file scfx_rep.hh.
Definition at line 1420 of file scfx_rep.cc.
Definition at line 339 of file scfx_rep.hh.
Referenced by sc_dt::print_other().
|
friend |
Definition at line 404 of file scfx_rep.hh.
|
friend |
Definition at line 863 of file scfx_rep.cc.
|
friend |
Definition at line 987 of file scfx_rep.cc.
|
friend |
Definition at line 395 of file scfx_rep.hh.
Definition at line 363 of file scfx_rep.hh.
Definition at line 1326 of file scfx_rep.cc.
|
private |
Definition at line 281 of file scfx_rep.hh.
Referenced by sc_dt::align(), sc_dt::compare_abs(), sc_dt::compare_msw_ff(), sc_dt::div_scfx_rep(), dump(), find_sw(), from_string(), get_type(), sc_dt::multiply(), operator=(), sc_dt::print_dec(), sc_dt::print_other(), resize(), resize_to(), round(), rshift(), scfx_rep(), to_double(), and to_uint64().
|
private |
Definition at line 276 of file scfx_rep.hh.
Referenced by sc_dt::add_scfx_rep(), sc_dt::align(), clear(), sc_dt::compare_abs(), sc_dt::compare_msw_ff(), sc_dt::div_scfx_rep(), divide_by_ten(), dump(), find_lsw(), find_msw(), from_string(), get_bit(), get_type(), is_zero(), lshift(), sc_dt::multiply(), multiply_by_ten(), o_bit_at(), o_extend(), o_invert(), o_set(), o_set_high(), o_set_low(), o_zero_left(), o_zero_right(), operator=(), sc_dt::print_dec(), sc_dt::print_other(), q_bit(), q_clear(), q_incr(), q_odd(), q_zero(), resize(), resize_to(), round(), rshift(), scfx_rep(), set(), set_bin(), set_hex(), set_oct(), shift_left(), shift_right(), size(), sc_dt::sub_scfx_rep(), to_double(), to_uint64(), and toggle_tc().
|
private |
Definition at line 280 of file scfx_rep.hh.
Referenced by sc_dt::align(), sc_dt::compare_abs(), sc_dt::compare_msw_ff(), sc_dt::div_scfx_rep(), divide_by_ten(), find_sw(), from_string(), lshift(), sc_dt::multiply(), operator=(), sc_dt::print_dec(), sc_dt::print_other(), resize(), resize_to(), scfx_rep(), and to_double().
|
private |
Definition at line 282 of file scfx_rep.hh.
Referenced by sc_dt::div_scfx_rep(), round(), and rounding_flag().
|
private |
Definition at line 278 of file scfx_rep.hh.
Referenced by sc_dt::add_scfx_rep(), cast(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), dump(), from_string(), is_neg(), sc_dt::multiply(), sc_dt::neg_scfx_rep(), o_extend(), o_set_high(), o_set_low(), operator=(), scfx_rep(), sc_dt::sub_scfx_rep(), to_double(), and to_uint64().
|
private |
Definition at line 279 of file scfx_rep.hh.
Referenced by dump(), from_string(), is_inf(), is_nan(), is_normal(), is_zero(), sc_dt::multiply(), operator=(), and scfx_rep().
|
private |
Definition at line 277 of file scfx_rep.hh.
Referenced by sc_dt::add_scfx_rep(), sc_dt::align(), calc_indices(), sc_dt::compare_abs(), sc_dt::div_scfx_rep(), divide_by_ten(), dump(), from_string(), get_type(), lshift(), sc_dt::multiply(), normalize(), operator=(), sc_dt::print_dec(), sc_dt::print_other(), resize(), resize_to(), rshift(), scfx_rep(), sc_dt::sub_scfx_rep(), to_double(), and to_uint64().