gem5  v20.1.0.0
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
sc_dt::sc_fxnum_fast Class Reference

#include <sc_fxnum.hh>

Inheritance diagram for sc_dt::sc_fxnum_fast:
sc_dt::sc_fix_fast sc_dt::sc_ufix_fast

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_baseDECL_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_fastoperator++ ()
 
sc_fxnum_fastoperator-- ()
 
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_paramstype_params () const
 
const sc_fxcast_switchcast_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_observerobserver () 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_observerlock_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_observerm_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 &, const sc_fxnum_fast &)
 
void neg (sc_fxnum_fast &, const sc_fxnum_fast &)
 
const friend sc_fxval_fast operator/ (const sc_fxnum_fast &, const sc_fxnum_fast &)
 
const friend sc_fxval_fast operator>> (const sc_fxnum_fast &, int)
 
void lshift (sc_fxval_fast &, const sc_fxnum_fast &, int)
 
void rshift (sc_fxval_fast &, const sc_fxnum_fast &, int)
 
void lshift (sc_fxnum_fast &, const sc_fxnum_fast &, int)
 
void rshift (sc_fxnum_fast &, const sc_fxnum_fast &, int)
 

Detailed Description

Definition at line 844 of file sc_fxnum.hh.

Constructor & Destructor Documentation

◆ sc_fxnum_fast() [1/3]

sc_dt::sc_fxnum_fast::sc_fxnum_fast ( const sc_fxtype_params type_params_,
sc_enc  enc_,
const sc_fxcast_switch cast_sw,
sc_fxnum_fast_observer observer_ 
)
inlineprotected

◆ ~sc_fxnum_fast()

sc_dt::sc_fxnum_fast::~sc_fxnum_fast ( )
inlineprotected

Definition at line 3212 of file sc_fxnum.hh.

References SC_FXNUM_FAST_OBSERVER_DESTRUCT_.

◆ sc_fxnum_fast() [2/3]

sc_dt::sc_fxnum_fast::sc_fxnum_fast ( )
private

◆ sc_fxnum_fast() [3/3]

sc_dt::sc_fxnum_fast::sc_fxnum_fast ( const sc_fxnum_fast )
private

Member Function Documentation

◆ bit() [1/2]

sc_fxnum_fast_bitref sc_dt::sc_fxnum_fast::bit ( int  i)
inline

◆ bit() [2/2]

const sc_fxnum_fast_bitref sc_dt::sc_fxnum_fast::bit ( int  i) const
inline

◆ cast()

void sc_dt::sc_fxnum_fast::cast ( )
protected

Definition at line 596 of file sc_fxnum.cc.

Referenced by operator++(), and operator--().

◆ cast_switch()

const sc_fxcast_switch & sc_dt::sc_fxnum_fast::cast_switch ( ) const
inline

Definition at line 4044 of file sc_fxnum.hh.

References sc_dt::scfx_params::cast_switch(), and m_params.

◆ DECL_BIN_OP_T() [1/3]

uint64 sc_dt::sc_fxnum_fast::DECL_BIN_OP_T ( ,
const sc_int_base  
)

◆ DECL_BIN_OP_T() [2/3]

uint64 const sc_uint_base& sc_dt::sc_fxnum_fast::DECL_BIN_OP_T ( ,
const sc_signed  
) const &

◆ DECL_BIN_OP_T() [3/3]

sc_dt::sc_fxnum_fast::DECL_BIN_OP_T ( ,
int64   
)

◆ dump()

void sc_dt::sc_fxnum_fast::dump ( ::std::ostream &  os = ::std::cout) const

Definition at line 717 of file sc_fxnum.cc.

Referenced by sc_dt::sc_fxnum_bitref::dump().

◆ get_bit()

bool sc_dt::sc_fxnum_fast::get_bit ( int  i) const

Definition at line 737 of file sc_fxnum.cc.

Referenced by sc_dt::sc_fxnum_bitref::set().

◆ get_slice()

bool sc_dt::sc_fxnum_fast::get_slice ( int  i,
int  j,
sc_bv_base bv 
) const
protected

Definition at line 802 of file sc_fxnum.cc.

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

◆ get_val()

double sc_dt::sc_fxnum_fast::get_val ( ) const
inlineprotected

Definition at line 3219 of file sc_fxnum.hh.

References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

◆ is_neg()

bool sc_dt::sc_fxnum_fast::is_neg ( ) const
inline

Definition at line 3963 of file sc_fxnum.hh.

References ArmISA::id, m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

◆ is_normal()

bool sc_dt::sc_fxnum_fast::is_normal ( ) const
inline

Definition at line 3980 of file sc_fxnum.hh.

References ArmISA::id, is_zero(), m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

Referenced by to_uint64().

◆ is_zero()

bool sc_dt::sc_fxnum_fast::is_zero ( ) const
inline

Definition at line 3971 of file sc_fxnum.hh.

References ArmISA::id, m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

Referenced by is_normal().

◆ iwl()

int sc_dt::sc_fxnum_fast::iwl ( ) const
inline

Definition at line 4014 of file sc_fxnum.hh.

References sc_dt::scfx_params::iwl(), and m_params.

◆ lock_observer()

sc_fxnum_fast_observer * sc_dt::sc_fxnum_fast::lock_observer ( ) const
protected

Definition at line 884 of file sc_fxnum.cc.

◆ n_bits()

int sc_dt::sc_fxnum_fast::n_bits ( ) const
inline

Definition at line 4032 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::n_bits().

◆ o_mode()

sc_o_mode sc_dt::sc_fxnum_fast::o_mode ( ) const
inline

Definition at line 4026 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::o_mode().

◆ observer()

sc_fxnum_fast_observer * sc_dt::sc_fxnum_fast::observer ( ) const
inlineprotected

Definition at line 3136 of file sc_fxnum.hh.

References sc_dt::sc_fxnum::m_observer.

◆ observer_read()

void sc_dt::sc_fxnum_fast::observer_read ( ) const
inline

Definition at line 4051 of file sc_fxnum.hh.

References SC_FXNUM_FAST_OBSERVER_READ_.

◆ operator double()

sc_dt::sc_fxnum_fast::operator double ( ) const
inline

Definition at line 3868 of file sc_fxnum.hh.

References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

◆ operator()() [1/4]

sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::operator() ( )

◆ operator()() [2/4]

sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::operator() ( ) const
inline

Definition at line 3844 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::wl().

◆ operator()() [3/4]

sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::operator() ( int  i,
int  j 
)
inline

◆ operator()() [4/4]

const sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::operator() ( int  i,
int  j 
) const
inline

◆ operator+()

const sc_fxval_fast sc_dt::sc_fxnum_fast::operator+ ( ) const
inline

Definition at line 3234 of file sc_fxnum.hh.

References m_val, SC_FXNUM_FAST_OBSERVER_READ_, and sc_fxval_fast.

◆ operator++() [1/2]

sc_fxnum_fast & sc_dt::sc_fxnum_fast::operator++ ( )
inline

◆ operator++() [2/2]

const sc_fxval_fast sc_dt::sc_fxnum_fast::operator++ ( int  )
inline

◆ operator-()

const sc_fxval_fast sc_dt::sc_fxnum_fast::operator- ( ) const
inline

Definition at line 3227 of file sc_fxnum.hh.

References m_val, SC_FXNUM_FAST_OBSERVER_READ_, and sc_fxval_fast.

◆ operator--() [1/2]

sc_fxnum_fast & sc_dt::sc_fxnum_fast::operator-- ( )
inline

◆ operator--() [2/2]

const sc_fxval_fast sc_dt::sc_fxnum_fast::operator-- ( int  )
inline

◆ operator[]() [1/2]

sc_fxnum_fast_bitref sc_dt::sc_fxnum_fast::operator[] ( int  i)
inline

◆ operator[]() [2/2]

const sc_fxnum_fast_bitref sc_dt::sc_fxnum_fast::operator[] ( int  i) const
inline

◆ overflow_flag()

bool sc_dt::sc_fxnum_fast::overflow_flag ( ) const
inline

Definition at line 3994 of file sc_fxnum.hh.

References m_o_flag.

◆ print()

void sc_dt::sc_fxnum_fast::print ( ::std::ostream &  os = ::std::cout) const

Definition at line 703 of file sc_fxnum.cc.

References ArmISA::id, and m_val.

◆ q_mode()

sc_q_mode sc_dt::sc_fxnum_fast::q_mode ( ) const
inline

Definition at line 4020 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::q_mode().

◆ quantization_flag()

bool sc_dt::sc_fxnum_fast::quantization_flag ( ) const
inline

Definition at line 3988 of file sc_fxnum.hh.

References m_q_flag.

◆ range() [1/4]

sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::range ( )

◆ range() [2/4]

sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::range ( ) const
inline

Definition at line 3856 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::wl().

◆ range() [3/4]

sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::range ( int  i,
int  j 
)
inline

◆ range() [4/4]

const sc_fxnum_fast_subref sc_dt::sc_fxnum_fast::range ( int  i,
int  j 
) const
inline

◆ scan()

void sc_dt::sc_fxnum_fast::scan ( ::std::istream &  is = ::std::cin)

Definition at line 709 of file sc_fxnum.cc.

◆ set_bit()

bool sc_dt::sc_fxnum_fast::set_bit ( int  i,
bool  high 
)
protected

Definition at line 773 of file sc_fxnum.cc.

◆ set_slice()

bool sc_dt::sc_fxnum_fast::set_slice ( int  i,
int  j,
const sc_bv_base bv 
)
protected

Definition at line 849 of file sc_fxnum.cc.

Referenced by sc_dt::sc_fxnum_subref::scan().

◆ to_bin()

const std::string sc_dt::sc_fxnum_fast::to_bin ( ) const

Definition at line 684 of file sc_fxnum.cc.

References X86ISA::os.

◆ to_dec()

const std::string sc_dt::sc_fxnum_fast::to_dec ( ) const

Definition at line 678 of file sc_fxnum.cc.

References MipsISA::is, and ArmISA::s.

◆ to_double()

double sc_dt::sc_fxnum_fast::to_double ( ) const
inline

Definition at line 3955 of file sc_fxnum.hh.

References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

◆ to_float()

float sc_dt::sc_fxnum_fast::to_float ( ) const
inline

Definition at line 3948 of file sc_fxnum.hh.

References m_val, and SC_FXNUM_FAST_OBSERVER_READ_.

◆ to_hex()

const std::string sc_dt::sc_fxnum_fast::to_hex ( ) const

Definition at line 696 of file sc_fxnum.cc.

◆ to_int()

int sc_dt::sc_fxnum_fast::to_int ( ) const
inline

Definition at line 3890 of file sc_fxnum.hh.

References to_uint64().

◆ to_int64()

int64 sc_dt::sc_fxnum_fast::to_int64 ( ) const
inline

Definition at line 3897 of file sc_fxnum.hh.

References to_uint64().

◆ to_long()

long sc_dt::sc_fxnum_fast::to_long ( ) const
inline

Definition at line 3934 of file sc_fxnum.hh.

References to_uint64().

◆ to_oct()

const std::string sc_dt::sc_fxnum_fast::to_oct ( ) const

Definition at line 690 of file sc_fxnum.cc.

◆ to_short()

short sc_dt::sc_fxnum_fast::to_short ( ) const
inline

Definition at line 3876 of file sc_fxnum.hh.

References to_uint64().

◆ to_string() [1/6]

const std::string sc_dt::sc_fxnum_fast::to_string ( ) const

Definition at line 639 of file sc_fxnum.cc.

References m_params, m_val, and sc_dt::to_string().

◆ to_string() [2/6]

const std::string sc_dt::sc_fxnum_fast::to_string ( sc_fmt  fmt) const

Definition at line 658 of file sc_fxnum.cc.

References m_params, m_val, sc_dt::SC_F, sc_dt::SC_OCT, and sc_dt::to_string().

◆ to_string() [3/6]

const std::string sc_dt::sc_fxnum_fast::to_string ( sc_numrep  numrep) const

Definition at line 645 of file sc_fxnum.cc.

References m_params, m_val, sc_dt::SC_DEC, sc_dt::SC_F, and sc_dt::to_string().

◆ to_string() [4/6]

const std::string sc_dt::sc_fxnum_fast::to_string ( sc_numrep  numrep,
bool  w_prefix 
) const

Definition at line 651 of file sc_fxnum.cc.

References m_params, m_val, sc_dt::SC_BIN, sc_dt::SC_F, and sc_dt::to_string().

◆ to_string() [5/6]

const std::string sc_dt::sc_fxnum_fast::to_string ( sc_numrep  numrep,
bool  w_prefix,
sc_fmt  fmt 
) const

Definition at line 670 of file sc_fxnum.cc.

References m_params, m_val, X86ISA::os, sc_dt::SC_DEC, sc_dt::SC_F, and sc_dt::to_string().

◆ to_string() [6/6]

const std::string sc_dt::sc_fxnum_fast::to_string ( sc_numrep  numrep,
sc_fmt  fmt 
) const

Definition at line 664 of file sc_fxnum.cc.

References m_params, m_val, sc_dt::SC_F, sc_dt::SC_HEX, and sc_dt::to_string().

◆ to_uint()

unsigned int sc_dt::sc_fxnum_fast::to_uint ( ) const
inline

Definition at line 3904 of file sc_fxnum.hh.

References to_uint64().

◆ to_uint64()

uint64 sc_dt::sc_fxnum_fast::to_uint64 ( ) const
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().

◆ to_ulong()

unsigned long sc_dt::sc_fxnum_fast::to_ulong ( ) const
inline

Definition at line 3941 of file sc_fxnum.hh.

References to_uint64().

◆ to_ushort()

unsigned short sc_dt::sc_fxnum_fast::to_ushort ( ) const
inline

Definition at line 3883 of file sc_fxnum.hh.

References to_uint64().

◆ type_params()

const sc_fxtype_params & sc_dt::sc_fxnum_fast::type_params ( ) const
inline

Definition at line 4038 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::type_params().

◆ unlock_observer()

void sc_dt::sc_fxnum_fast::unlock_observer ( sc_fxnum_fast_observer observer_) const
protected

Definition at line 893 of file sc_fxnum.cc.

◆ value()

const sc_fxval_fast sc_dt::sc_fxnum_fast::value ( ) const
inline

Definition at line 4000 of file sc_fxnum.hh.

References m_val, SC_FXNUM_FAST_OBSERVER_READ_, and sc_fxval_fast.

◆ wl()

int sc_dt::sc_fxnum_fast::wl ( ) const
inline

Definition at line 4008 of file sc_fxnum.hh.

References m_params, and sc_dt::scfx_params::wl().

Friends And Related Function Documentation

◆ lshift [1/2]

void lshift ( sc_fxnum_fast c,
const sc_fxnum_fast a,
int  b 
)
friend

Definition at line 3507 of file sc_fxnum.hh.

◆ lshift [2/2]

void lshift ( sc_fxval_fast c,
const sc_fxnum_fast a,
int  b 
)
friend

Definition at line 3493 of file sc_fxnum.hh.

◆ neg [1/2]

void neg ( sc_fxnum_fast c,
const sc_fxnum_fast a 
)
friend

Definition at line 3249 of file sc_fxnum.hh.

◆ neg [2/2]

void neg ( sc_fxval_fast c,
const sc_fxnum_fast a 
)
friend

Definition at line 3242 of file sc_fxnum.hh.

◆ operator/

const friend sc_fxval_fast operator/ ( const sc_fxnum_fast a,
const sc_fxnum_fast b 
)
friend

Definition at line 3320 of file sc_fxnum.hh.

◆ operator>>

const friend sc_fxval_fast operator>> ( const sc_fxnum_fast a,
int  b 
)
friend

Definition at line 3369 of file sc_fxnum.hh.

◆ rshift [1/2]

void rshift ( sc_fxnum_fast c,
const sc_fxnum_fast a,
int  b 
)
friend

Definition at line 3516 of file sc_fxnum.hh.

◆ rshift [2/2]

void rshift ( sc_fxval_fast c,
const sc_fxnum_fast a,
int  b 
)
friend

Definition at line 3500 of file sc_fxnum.hh.

◆ sc_fxnum_bitref

friend class sc_fxnum_bitref
friend

Definition at line 848 of file sc_fxnum.hh.

◆ sc_fxnum_fast_bitref

friend class sc_fxnum_fast_bitref
friend

Definition at line 850 of file sc_fxnum.hh.

Referenced by bit(), and operator[]().

◆ sc_fxnum_fast_subref

friend class sc_fxnum_fast_subref
friend

Definition at line 851 of file sc_fxnum.hh.

Referenced by operator()(), and range().

◆ sc_fxnum_subref

friend class sc_fxnum_subref
friend

Definition at line 849 of file sc_fxnum.hh.

◆ sc_fxval_fast

friend class sc_fxval_fast
friend

◆ sc_gem5::TraceValFxnumBase

template<typename T , typename B >
friend class sc_gem5::TraceValFxnumBase
friend

Definition at line 854 of file sc_fxnum.hh.

Member Data Documentation

◆ int

uint64 const sc_uint_base sc_dt::sc_fxnum_fast::int

Definition at line 957 of file sc_fxnum.hh.

◆ m_o_flag

bool sc_dt::sc_fxnum_fast::m_o_flag
private

Definition at line 1185 of file sc_fxnum.hh.

Referenced by overflow_flag().

◆ m_observer

sc_fxnum_fast_observer* sc_dt::sc_fxnum_fast::m_observer
mutableprivate

Definition at line 1187 of file sc_fxnum.hh.

◆ m_params

scfx_params sc_dt::sc_fxnum_fast::m_params
private

◆ m_q_flag

bool sc_dt::sc_fxnum_fast::m_q_flag
private

Definition at line 1184 of file sc_fxnum.hh.

Referenced by quantization_flag().

◆ m_val

double sc_dt::sc_fxnum_fast::m_val
private

The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:03:10 for gem5 by doxygen 1.8.17