Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_dt::scfx_rep Class Reference

#include <scfx_rep.h>

Collaboration diagram for sc_dt::scfx_rep:

Collaboration graph
[legend]
List of all members.

Public Methods

 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 (size_t)
void operator delete (void *, size_t)
void from_string (const char *, int)
double to_double () 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 (ostream &) const
void dump (ostream &) const
void get_type (int &, int &, sc_enc &) const
bool rounding_flag () const

Friends

void multiply (scfx_rep &, const scfx_rep &, const scfx_rep &, int=SC_DEFAULT_MAX_WL_)
scfx_rep * neg_scfx_rep (const scfx_rep &)
scfx_rep * mult_scfx_rep (const scfx_rep &, const scfx_rep &, int=SC_DEFAULT_MAX_WL_)
scfx_rep * div_scfx_rep (const scfx_rep &, const scfx_rep &, int=SC_DEFAULT_DIV_WL_)
scfx_rep * add_scfx_rep (const scfx_rep &, const scfx_rep &, int=SC_DEFAULT_MAX_WL_)
scfx_rep * sub_scfx_rep (const scfx_rep &, const scfx_rep &, int=SC_DEFAULT_MAX_WL_)
scfx_rep * lsh_scfx_rep (const scfx_rep &, int)
scfx_rep * rsh_scfx_rep (const scfx_rep &, int)
int cmp_scfx_rep (const scfx_rep &, const scfx_rep &)
scfx_rep * quantization_scfx_rep (const scfx_rep &, const scfx_params &, bool &)
scfx_rep * overflow_scfx_rep (const scfx_rep &, const scfx_params &, bool &)
void align (const scfx_rep &, const scfx_rep &, int &, int &, scfx_mant_ref &, scfx_mant_ref &)
int compare_msw (const scfx_rep &, const scfx_rep &)
int compare_msw_ff (const scfx_rep &lhs, const scfx_rep &rhs)
void print_dec (scfx_string &, const scfx_rep &, int, sc_fmt)
void print_other (scfx_string &, const scfx_rep &, sc_numrep, int, sc_fmt, const scfx_params *)
int compare_abs (const scfx_rep &, const scfx_rep &)

Constructor & Destructor Documentation

sc_dt::scfx_rep::scfx_rep  
 

Definition at line 73 of file scfx_rep.cpp.

References sc_dt::min_mant, and set_zero().

sc_dt::scfx_rep::scfx_rep int    [explicit]
 

Definition at line 79 of file scfx_rep.cpp.

References sc_dt::scfx_mant::clear(), sc_dt::min_mant, and set_zero().

sc_dt::scfx_rep::scfx_rep unsigned    int [explicit]
 

Definition at line 102 of file scfx_rep.cpp.

References sc_dt::scfx_mant::clear(), sc_dt::min_mant, and set_zero().

sc_dt::scfx_rep::scfx_rep long    [explicit]
 

Definition at line 117 of file scfx_rep.cpp.

References sc_dt::scfx_mant::clear(), sc_dt::min_mant, and set_zero().

sc_dt::scfx_rep::scfx_rep unsigned    long [explicit]
 

Definition at line 140 of file scfx_rep.cpp.

References sc_dt::scfx_mant::clear(), sc_dt::min_mant, and set_zero().

sc_dt::scfx_rep::scfx_rep double    [explicit]
 

Definition at line 155 of file scfx_rep.cpp.

References sc_dt::scfx_mant::clear(), sc_dt::scfx_ieee_double::exponent(), sc_dt::scfx_ieee_double::is_inf(), sc_dt::scfx_ieee_double::is_nan(), sc_dt::scfx_ieee_double::is_normal(), sc_dt::scfx_ieee_double::is_subnormal(), sc_dt::scfx_ieee_double::mantissa0(), sc_dt::scfx_ieee_double::mantissa1(), sc_dt::min_mant, sc_dt::scfx_ieee_double::negative(), and sc_dt::SCFX_IEEE_DOUBLE_M_SIZE.

sc_dt::scfx_rep::scfx_rep const char *    [inline, explicit]
 

Definition at line 300 of file scfx_rep.h.

References from_string(), sc_dt::min_mant, s, and sc_dt::SC_DEFAULT_CTE_WL_.

sc_dt::scfx_rep::scfx_rep int64    [explicit]
 

Definition at line 183 of file scfx_rep.cpp.

References sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), sc_dt::int64, sc_dt::min_mant, and set_zero().

sc_dt::scfx_rep::scfx_rep uint64    [explicit]
 

Definition at line 209 of file scfx_rep.cpp.

References sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), sc_dt::min_mant, set_zero(), and sc_dt::uint64.

sc_dt::scfx_rep::scfx_rep const sc_signed   [explicit]
 

Definition at line 226 of file scfx_rep.cpp.

References sc_dt::scfx_index::bi(), sc_dt::scfx_mant::clear(), sc_dt::sc_signed::length(), sc_dt::min_mant, set_zero(), and sc_dt::scfx_index::wi().

sc_dt::scfx_rep::scfx_rep const sc_unsigned   [explicit]
 

Definition at line 268 of file scfx_rep.cpp.

References sc_dt::scfx_index::bi(), sc_dt::scfx_mant::clear(), sc_dt::min_mant, set_zero(), and sc_dt::scfx_index::wi().

sc_dt::scfx_rep::scfx_rep const scfx_rep &   
 

Definition at line 297 of file scfx_rep.cpp.

sc_dt::scfx_rep::~scfx_rep   [inline]
 

Definition at line 311 of file scfx_rep.h.


Member Function Documentation

void sc_dt::scfx_rep::cast const scfx_params  ,
bool &   ,
bool &   
 

Definition at line 2172 of file scfx_rep.cpp.

References is_neg(), and is_zero().

Referenced by sc_dt::sc_fxnum::cast().

bool sc_dt::scfx_rep::clear int   ,
const scfx_params  
 

Definition at line 2624 of file scfx_rep.cpp.

References sc_dt::scfx_index::bi(), sc_dt::scfx_params::enc(), is_neg(), is_normal(), sc_dt::scfx_params::iwl(), and sc_dt::scfx_index::wi().

Referenced by sc_dt::sc_fxnum::set_bit(), and set_slice().

void sc_dt::scfx_rep::dump ostream &    const
 

Definition at line 2726 of file scfx_rep.cpp.

References sprintf().

Referenced by sc_dt::sc_fxval::dump(), and sc_dt::sc_fxnum::dump().

void sc_dt::scfx_rep::from_string const char *   ,
int   
 

Definition at line 374 of file scfx_rep.cpp.

References atoi(), sc_dt::bits_in_word, sc_dt::scfx_mant::clear(), sc_dt::complement(), div_scfx_rep, sc_dt::inc(), sc_dt::min_mant, s, SC_BIN, SC_BIN_SM, SC_BIN_US, SC_CSD, SC_DEC, SC_HEX, SC_HEX_SM, SC_HEX_US, sc_max(), sc_numrep, SC_OCT, SC_OCT_SM, 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(), and sc_dt::scfx_mant::size().

Referenced by scfx_rep().

bool sc_dt::scfx_rep::get_bit int    const
 

Definition at line 2552 of file scfx_rep.cpp.

References sc_dt::scfx_index::bi(), is_neg(), is_normal(), and sc_dt::scfx_index::wi().

Referenced by sc_dt::sc_fxnum::get_bit(), get_slice(), get_type(), and sc_dt::print_other().

bool sc_dt::scfx_rep::get_slice int   ,
int   ,
const scfx_params  ,
sc_bv_base  
const
 

Definition at line 2661 of file scfx_rep.cpp.

References get_bit(), is_inf(), is_nan(), and sc_dt::sc_bv_base::length().

Referenced by sc_dt::sc_fxnum::get_slice().

void sc_dt::scfx_rep::get_type int &   ,
int &   ,
sc_enc  
const
 

Definition at line 2771 of file scfx_rep.cpp.

References sc_dt::bits_in_word, get_bit(), is_inf(), is_nan(), is_neg(), is_zero(), sc_dt::sc_enc, sc_dt::SC_TC_, sc_dt::SC_US_, sc_dt::scfx_find_lsb(), and sc_dt::scfx_find_msb().

bool sc_dt::scfx_rep::is_inf   [inline]
 

Definition at line 408 of file scfx_rep.h.

Referenced by sc_dt::add_scfx_rep(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), get_slice(), get_type(), sc_dt::multiply(), set_slice(), sc_dt::sub_scfx_rep(), to_double(), and to_string().

bool sc_dt::scfx_rep::is_nan   [inline]
 

Definition at line 401 of file scfx_rep.h.

Referenced by sc_dt::add_scfx_rep(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), get_slice(), get_type(), sc_dt::multiply(), set_slice(), sc_dt::sub_scfx_rep(), to_double(), and to_string().

bool sc_dt::scfx_rep::is_neg   [inline]
 

Definition at line 378 of file scfx_rep.h.

Referenced by cast(), clear(), sc_dt::cmp_scfx_rep(), get_bit(), get_type(), sc_dt::sc_fxnum::is_neg(), sc_dt::print_dec(), sc_dt::print_other(), set(), and to_string().

bool sc_dt::scfx_rep::is_normal   [inline]
 

Definition at line 415 of file scfx_rep.h.

Referenced by sc_dt::sc_fxnum::cast(), clear(), get_bit(), sc_dt::sc_fxnum::is_normal(), lshift(), rshift(), and set().

bool sc_dt::scfx_rep::is_zero   [inline]
 

Definition at line 385 of file scfx_rep.h.

Referenced by cast(), sc_dt::cmp_scfx_rep(), sc_dt::div_scfx_rep(), get_type(), sc_dt::sc_fxnum::is_zero(), sc_dt::multiply(), sc_dt::print_dec(), sc_dt::print_other(), to_double(), and to_string().

void sc_dt::scfx_rep::lshift int   
 

Definition at line 1674 of file scfx_rep.cpp.

References sc_dt::bits_in_word, is_normal(), rshift(), and sc_dt::scfx_find_msb().

Referenced by sc_dt::div_scfx_rep(), sc_dt::lsh_scfx_rep(), and rshift().

void sc_dt::scfx_rep::operator delete void *   ,
size_t   
 

Definition at line 342 of file scfx_rep.cpp.

References sc_dt::scfx_rep_node::next.

void * sc_dt::scfx_rep::operator new size_t   
 

Definition at line 320 of file scfx_rep.cpp.

References sc_dt::scfx_rep_node::data, and sc_dt::scfx_rep_node::next.

void sc_dt::scfx_rep::operator= const scfx_rep &    [inline]
 

Definition at line 319 of file scfx_rep.h.

References m_lsw, m_mant, m_msw, m_sign, m_state, m_wp, and sc_dt::SC_DEFAULT_MAX_WL_.

void sc_dt::scfx_rep::print ostream &    const
 

Definition at line 2715 of file scfx_rep.cpp.

References SC_DEC, sc_dt::SC_E, and to_string().

Referenced by sc_dt::sc_fxval::print().

bool sc_dt::scfx_rep::rounding_flag   [inline]
 

Definition at line 444 of file scfx_rep.h.

void sc_dt::scfx_rep::rshift int   
 

Definition at line 1708 of file scfx_rep.cpp.

References sc_dt::bits_in_word, is_normal(), lshift(), and sc_dt::scfx_find_lsb().

Referenced by lshift(), and sc_dt::rsh_scfx_rep().

bool sc_dt::scfx_rep::set int   ,
const scfx_params  
 

Definition at line 2582 of file scfx_rep.cpp.

References sc_dt::scfx_index::bi(), sc_dt::scfx_params::enc(), is_neg(), is_normal(), sc_dt::scfx_params::iwl(), and sc_dt::scfx_index::wi().

Referenced by sc_dt::sc_fxnum::set_bit(), and set_slice().

void sc_dt::scfx_rep::set_inf int    [inline]
 

Definition at line 289 of file scfx_rep.h.

References sc_dt::min_mant, and sc_dt::scfx_mant::resize_to().

Referenced by sc_dt::add_scfx_rep(), sc_dt::div_scfx_rep(), sc_dt::multiply(), and sc_dt::sub_scfx_rep().

void sc_dt::scfx_rep::set_nan   [inline]
 

Definition at line 281 of file scfx_rep.h.

References sc_dt::min_mant, and sc_dt::scfx_mant::resize_to().

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().

bool sc_dt::scfx_rep::set_slice int   ,
int   ,
const scfx_params  ,
const sc_bv_base  
 

Definition at line 2684 of file scfx_rep.cpp.

References clear(), is_inf(), is_nan(), sc_dt::sc_bv_base::length(), and set().

Referenced by sc_dt::sc_fxnum::set_slice().

void sc_dt::scfx_rep::set_zero int    = 1 [inline]
 

Definition at line 271 of file scfx_rep.h.

References sc_dt::scfx_mant::clear().

Referenced by sc_dt::div_scfx_rep(), sc_dt::multiply(), and scfx_rep().

double sc_dt::scfx_rep::to_double  
 

Definition at line 728 of file scfx_rep.cpp.

References sc_dt::bits_in_word, sc_dt::scfx_ieee_double::exponent(), is_inf(), is_nan(), is_zero(), sc_dt::scfx_ieee_double::mantissa0(), sc_dt::scfx_ieee_double::mantissa1(), sc_dt::scfx_ieee_double::negative(), 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(), sc_dt::scfx_ieee_double::set_inf(), and sc_dt::scfx_ieee_double::set_nan().

Referenced by sc_dt::sc_fxnum::operator double(), sc_dt::sc_fxnum::to_double(), sc_dt::sc_fxnum::to_float(), sc_dt::sc_fxnum::to_int(), sc_dt::sc_fxnum::to_long(), sc_dt::sc_fxnum::to_short(), sc_dt::sc_fxnum::to_uint(), sc_dt::sc_fxnum::to_ulong(), and sc_dt::sc_fxnum::to_ushort().

const char * sc_dt::scfx_rep::to_string sc_numrep   ,
int   ,
sc_fmt   ,
const scfx_params   = 0
const
 

Definition at line 1163 of file scfx_rep.cpp.

References sc_dt::scfx_string::clear(), is_inf(), is_nan(), is_neg(), is_zero(), sc_dt::print_dec(), sc_dt::print_other(), s, SC_BIN_US, SC_DEC, sc_dt::sc_fmt, SC_HEX_US, sc_numrep, SC_OCT_US, sc_dt::scfx_print_inf(), and sc_dt::scfx_print_nan().

Referenced by print(), sc_dt::sc_fxnum::print(), sc_dt::sc_fxval::to_bin(), sc_dt::sc_fxnum::to_bin(), sc_dt::sc_fxval::to_dec(), sc_dt::sc_fxnum::to_dec(), sc_dt::sc_fxval::to_hex(), sc_dt::sc_fxnum::to_hex(), sc_dt::sc_fxval::to_oct(), sc_dt::sc_fxnum::to_oct(), sc_dt::sc_fxval::to_string(), and sc_dt::sc_fxnum::to_string().


Friends And Related Function Documentation

scfx_rep* add_scfx_rep const scfx_rep &    lhs,
const scfx_rep &    rhs,
int    max_wl = SC_DEFAULT_MAX_WL_
[friend]
 

Definition at line 1249 of file scfx_rep.cpp.

void align const scfx_rep &    lhs,
const scfx_rep &    rhs,
int &    new_wp,
int &    len_mant,
scfx_mant_ref   lhs_mant,
scfx_mant_ref   rhs_mant
[friend]
 

Definition at line 2203 of file scfx_rep.cpp.

int cmp_scfx_rep const scfx_rep &    a,
const scfx_rep &    b
[friend]
 

Definition at line 1820 of file scfx_rep.cpp.

int compare_abs const scfx_rep &    a,
const scfx_rep &    b
[friend]
 

Definition at line 1743 of file scfx_rep.cpp.

int compare_msw const scfx_rep &   ,
const scfx_rep &   
[friend]
 

int compare_msw_ff const scfx_rep &    lhs,
const scfx_rep &    rhs
[friend]
 

Definition at line 2252 of file scfx_rep.cpp.

scfx_rep* div_scfx_rep const scfx_rep &    lhs,
const scfx_rep &    rhs,
int    div_wl = SC_DEFAULT_DIV_WL_
[friend]
 

Definition at line 1568 of file scfx_rep.cpp.

Referenced by from_string().

scfx_rep* lsh_scfx_rep const scfx_rep &    a,
int    b
[friend]
 

Definition at line 353 of file scfx_rep.h.

scfx_rep* mult_scfx_rep const scfx_rep &    a,
const scfx_rep &    b,
int    max_wl = SC_DEFAULT_MAX_WL_
[friend]
 

Definition at line 344 of file scfx_rep.h.

void multiply scfx_rep &    result,
const scfx_rep &    lhs,
const scfx_rep &    rhs,
int    max_wl = SC_DEFAULT_MAX_WL_
[friend]
 

Definition at line 1487 of file scfx_rep.cpp.

scfx_rep* neg_scfx_rep const scfx_rep &    a [friend]
 

Definition at line 335 of file scfx_rep.h.

scfx_rep* overflow_scfx_rep const scfx_rep &    a,
const scfx_params   params,
bool &    o_flag
[friend]
 

Definition at line 433 of file scfx_rep.h.

void print_dec scfx_string   s,
const scfx_rep &    num,
int    w_prefix,
sc_fmt    fmt
[friend]
 

Definition at line 858 of file scfx_rep.cpp.

void print_other scfx_string   s,
const scfx_rep &    a,
sc_numrep    numrep,
int    w_prefix,
sc_fmt    fmt,
const scfx_params   params
[friend]
 

Definition at line 998 of file scfx_rep.cpp.

scfx_rep* quantization_scfx_rep const scfx_rep &    a,
const scfx_params   params,
bool &    q_flag
[friend]
 

Definition at line 422 of file scfx_rep.h.

scfx_rep* rsh_scfx_rep const scfx_rep &    a,
int    b
[friend]
 

Definition at line 362 of file scfx_rep.h.

scfx_rep* sub_scfx_rep const scfx_rep &    lhs,
const scfx_rep &    rhs,
int    max_wl = SC_DEFAULT_MAX_WL_
[friend]
 

Definition at line 1378 of file scfx_rep.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Jan 14 08:32:43 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18