SystemC 3.0.0
Accellera SystemC proof-of-concept library
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
sc_dt::sc_fxval Class Reference

#include <sysc/datatypes/fx/sc_fxval.h>

Collaboration diagram for sc_dt::sc_fxval:
Collaboration graph
[legend]

Public Member Functions

 sc_fxval (scfx_rep *)
 
 sc_fxval (sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (int, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (unsigned int, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (long, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (unsigned long, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (float, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (double, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_ sc_fxval (const char *, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxval &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxval_fast &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxnum &, sc_fxval_observer *=0)
 
 sc_fxval (const sc_fxnum_fast &, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_OTHER_ sc_fxval (int64, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_OTHER_ sc_fxval (uint64, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_OTHER_ sc_fxval (const sc_int_base &, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_OTHER_ sc_fxval (const sc_uint_base &, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_OTHER_ sc_fxval (const sc_signed &, sc_fxval_observer *=0)
 
SCFX_EXPLICIT_OTHER_ sc_fxval (const sc_unsigned &, sc_fxval_observer *=0)
 
 ~sc_fxval ()
 
const scfx_repget_rep () const
 
void set_rep (scfx_rep *)
 
sc_fxval operator- () const
 
const sc_fxvaloperator+ () 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 sc_fxval operator<<(const sc_fxval &
 
sc_fxval operator++ (int)
 
sc_fxval operator-- (int)
 
sc_fxvaloperator++ ()
 
sc_fxvaloperator-- ()
 
 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
 
std::string to_string () const
 
std::string to_string (sc_numrep) const
 
std::string to_string (sc_numrep, bool) const
 
std::string to_string (sc_fmt) const
 
std::string to_string (sc_numrep, sc_fmt) const
 
std::string to_string (sc_numrep, bool, sc_fmt) const
 
std::string to_dec () const
 
std::string to_bin () const
 
std::string to_oct () const
 
std::string to_hex () const
 
bool is_neg () const
 
bool is_zero () const
 
bool is_nan () const
 
bool is_inf () const
 
bool is_normal () const
 
bool rounding_flag () const
 
void print (::std::ostream &=::std::cout) const
 
void scan (::std::istream &=::std::cin)
 
void dump (::std::ostream &=::std::cout) const
 
bool get_bit (int) const
 

Public Attributes

uint64 const sc_uint_base int
 

Protected Member Functions

sc_fxval_observerobserver () const
 
sc_fxval_observerlock_observer () const
 
void unlock_observer (sc_fxval_observer *) const
 
void get_type (int &, int &, sc_enc &) const
 
sc_fxval quantization (const scfx_params &, bool &) const
 
sc_fxval overflow (const scfx_params &, bool &) const
 

Friends

class sc_fxnum
 
void neg (sc_fxval &, const sc_fxval &)
 
sc_fxval operator/ (const sc_fxval &, const sc_fxval &)
 
sc_fxval operator>> (const sc_fxval &, int)
 
void lshift (sc_fxval &, const sc_fxval &, int)
 
void rshift (sc_fxval &, const sc_fxval &, int)
 

Detailed Description

Definition at line 93 of file sc_fxval.h.

Constructor & Destructor Documentation

◆ sc_fxval() [1/19]

sc_dt::sc_fxval::sc_fxval ( scfx_rep a)
inlineexplicit

Definition at line 742 of file sc_fxval.h.

◆ sc_fxval() [2/19]

sc_dt::sc_fxval::sc_fxval ( sc_fxval_observer observer_ = 0)
inlineexplicit

Definition at line 751 of file sc_fxval.h.

◆ sc_fxval() [3/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( int  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [4/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( unsigned int  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [5/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( long  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [6/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( unsigned long  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [7/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( float  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [8/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( double  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [9/19]

SCFX_EXPLICIT_ sc_dt::sc_fxval::sc_fxval ( const char *  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [10/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxval a,
sc_fxval_observer observer_ = 0 
)
inline

Definition at line 760 of file sc_fxval.h.

◆ sc_fxval() [11/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxval_fast ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [12/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxnum a,
sc_fxval_observer observer_ = 0 
)
inline

Definition at line 4818 of file sc_fxnum.h.

◆ sc_fxval() [13/19]

sc_dt::sc_fxval::sc_fxval ( const sc_fxnum_fast a,
sc_fxval_observer observer_ = 0 
)
inline

Definition at line 4829 of file sc_fxnum.h.

◆ sc_fxval() [14/19]

SCFX_EXPLICIT_OTHER_ sc_dt::sc_fxval::sc_fxval ( int64  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [15/19]

SCFX_EXPLICIT_OTHER_ sc_dt::sc_fxval::sc_fxval ( uint64  ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [16/19]

SCFX_EXPLICIT_OTHER_ sc_dt::sc_fxval::sc_fxval ( const sc_int_base ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [17/19]

SCFX_EXPLICIT_OTHER_ sc_dt::sc_fxval::sc_fxval ( const sc_uint_base ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [18/19]

SCFX_EXPLICIT_OTHER_ sc_dt::sc_fxval::sc_fxval ( const sc_signed ,
sc_fxval_observer = 0 
)

◆ sc_fxval() [19/19]

SCFX_EXPLICIT_OTHER_ sc_dt::sc_fxval::sc_fxval ( const sc_unsigned ,
sc_fxval_observer = 0 
)

◆ ~sc_fxval()

sc_dt::sc_fxval::~sc_fxval ( )
inline

Definition at line 809 of file sc_fxval.h.

Member Function Documentation

◆ DECL_BIN_OP_T() [1/3]

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

◆ DECL_BIN_OP_T() [2/3]

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

◆ DECL_BIN_OP_T() [3/3]

sc_dt::sc_fxval::DECL_BIN_OP_T ( ,
int64   
)

◆ dump()

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

◆ get_bit()

bool sc_dt::sc_fxval::get_bit ( int  i) const
inline

Definition at line 1424 of file sc_fxval.h.

◆ get_rep()

const scfx_rep * sc_dt::sc_fxval::get_rep ( ) const
inline

Definition at line 819 of file sc_fxval.h.

◆ get_type()

void sc_dt::sc_fxval::get_type ( int wl,
int iwl,
sc_enc enc 
) const
inlineprotected

Definition at line 1434 of file sc_fxval.h.

◆ is_inf()

bool sc_dt::sc_fxval::is_inf ( ) const
inline

Definition at line 1398 of file sc_fxval.h.

◆ is_nan()

bool sc_dt::sc_fxval::is_nan ( ) const
inline

Definition at line 1390 of file sc_fxval.h.

◆ is_neg()

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

Definition at line 1374 of file sc_fxval.h.

◆ is_normal()

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

Definition at line 1406 of file sc_fxval.h.

◆ is_zero()

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

Definition at line 1382 of file sc_fxval.h.

◆ lock_observer()

sc_fxval_observer * sc_dt::sc_fxval::lock_observer ( ) const
protected

◆ observer()

sc_fxval_observer * sc_dt::sc_fxval::observer ( ) const
inlineprotected

Definition at line 734 of file sc_fxval.h.

◆ operator double()

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

Definition at line 1280 of file sc_fxval.h.

◆ operator+()

const sc_fxval & sc_dt::sc_fxval::operator+ ( ) const
inline

Definition at line 848 of file sc_fxval.h.

◆ operator++() [1/2]

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

Definition at line 1262 of file sc_fxval.h.

◆ operator++() [2/2]

sc_fxval sc_dt::sc_fxval::operator++ ( int  )
inline

Definition at line 1244 of file sc_fxval.h.

◆ operator-()

sc_fxval sc_dt::sc_fxval::operator- ( ) const
inline

Definition at line 840 of file sc_fxval.h.

◆ operator--() [1/2]

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

Definition at line 1270 of file sc_fxval.h.

◆ operator--() [2/2]

sc_fxval sc_dt::sc_fxval::operator-- ( int  )
inline

Definition at line 1253 of file sc_fxval.h.

◆ overflow()

sc_fxval sc_dt::sc_fxval::overflow ( const scfx_params params,
bool &  o_flag 
) const
inlineprotected

Definition at line 1449 of file sc_fxval.h.

◆ print()

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

◆ quantization()

sc_fxval sc_dt::sc_fxval::quantization ( const scfx_params params,
bool &  q_flag 
) const
inlineprotected

Definition at line 1442 of file sc_fxval.h.

◆ rounding_flag()

bool sc_dt::sc_fxval::rounding_flag ( ) const
inline

Definition at line 1415 of file sc_fxval.h.

◆ scan()

void sc_dt::sc_fxval::scan ( ::std::istream &  = ::std::cin)

◆ set_rep()

void sc_dt::sc_fxval::set_rep ( scfx_rep rep_)
inline

Definition at line 828 of file sc_fxval.h.

◆ to_bin()

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

◆ to_dec()

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

◆ to_double()

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

Definition at line 1363 of file sc_fxval.h.

◆ to_float()

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

Definition at line 1355 of file sc_fxval.h.

◆ to_hex()

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

◆ to_int()

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

Definition at line 1307 of file sc_fxval.h.

◆ to_int64()

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

Definition at line 1315 of file sc_fxval.h.

◆ to_long()

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

Definition at line 1339 of file sc_fxval.h.

◆ to_oct()

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

◆ to_short()

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

Definition at line 1291 of file sc_fxval.h.

◆ to_string() [1/6]

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

◆ to_string() [2/6]

std::string sc_dt::sc_fxval::to_string ( sc_fmt  ) const

◆ to_string() [3/6]

std::string sc_dt::sc_fxval::to_string ( sc_numrep  ) const

◆ to_string() [4/6]

std::string sc_dt::sc_fxval::to_string ( sc_numrep  ,
bool   
) const

◆ to_string() [5/6]

std::string sc_dt::sc_fxval::to_string ( sc_numrep  ,
bool  ,
sc_fmt   
) const

◆ to_string() [6/6]

std::string sc_dt::sc_fxval::to_string ( sc_numrep  ,
sc_fmt   
) const

◆ to_uint()

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

Definition at line 1323 of file sc_fxval.h.

◆ to_uint64()

uint64 sc_dt::sc_fxval::to_uint64 ( ) const
inline

Definition at line 1331 of file sc_fxval.h.

◆ to_ulong()

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

Definition at line 1347 of file sc_fxval.h.

◆ to_ushort()

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

Definition at line 1299 of file sc_fxval.h.

◆ unlock_observer()

void sc_dt::sc_fxval::unlock_observer ( sc_fxval_observer ) const
protected

Friends And Related Function Documentation

◆ lshift

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

Definition at line 1036 of file sc_fxval.h.

◆ neg

void neg ( sc_fxval c,
const sc_fxval a 
)
friend

Definition at line 859 of file sc_fxval.h.

◆ operator/

sc_fxval operator/ ( const sc_fxval a,
const sc_fxval b 
)
friend

Definition at line 924 of file sc_fxval.h.

◆ operator>>

sc_fxval operator>> ( const sc_fxval a,
int  b 
)
friend

Definition at line 962 of file sc_fxval.h.

◆ rshift

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

Definition at line 1046 of file sc_fxval.h.

◆ sc_fxnum

friend class sc_fxnum
friend

Definition at line 96 of file sc_fxval.h.

Member Data Documentation

◆ int

uint64 const sc_uint_base sc_dt::sc_fxval::int

Definition at line 202 of file sc_fxval.h.


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