#include "sysc/datatypes/fx/sc_fxnum.h"
ネームスペース | |
namespace | sc_dt |
構成 | |
class | sc_dt::sc_ufix |
class | sc_dt::sc_ufix_fast |
マクロ定義 | |
#define | DECL_CTORS_T(tp) |
#define | DECL_CTORS_T_A(tp) |
#define | DECL_CTORS_T_B(tp) |
#define | DECL_ASN_OP_T(op, tp) sc_ufix& operator op ( tp ); |
#define | DECL_ASN_OP_OTHER(op) |
#define | DECL_ASN_OP(op) |
#define | DECL_CTORS_T(tp) |
#define | DECL_CTORS_T_A(tp) |
#define | DECL_CTORS_T_B(tp) |
#define | DECL_ASN_OP_T(op, tp) sc_ufix_fast& operator op ( tp ); |
#define | DECL_ASN_OP_OTHER(op) |
#define | DECL_ASN_OP(op) |
#define | DEFN_CTORS_T_A(tp) |
#define | DEFN_CTORS_T_B(tp) |
#define | DEFN_BIN_OP_T(op, op2, tp1, tp2) |
#define | DEFN_BIN_FNC_T(fnc, op2, tp1, tp2) |
#define | DEFN_ASN_OP_T(op, tp) |
#define | DEFN_ASN_OP_OTHER(op) |
#define | DEFN_ASN_OP(op) |
#define | DEFN_ASN_OP_T(op, op2, tp) |
#define | DEFN_CTORS_T_A(tp) |
#define | DEFN_CTORS_T_B(tp) |
#define | DEFN_BIN_OP_T(op, op2, tp1, tp2) |
#define | DEFN_BIN_FNC_T(fnc, op2, tp1, tp2) |
#define | DEFN_ASN_OP_T(op, tp) |
#define | DEFN_ASN_OP_OTHER(op) |
#define | DEFN_ASN_OP(op) |
#define | DEFN_ASN_OP_T(op, op2, tp) |
関数 | |
void | sc_dt::b_not (sc_ufix &c, const sc_ufix &a) |
void | sc_dt::b_not (sc_ufix_fast &c, const sc_ufix_fast &a) |
#define DECL_ASN_OP | ( | op | ) |
値:
DECL_ASN_OP_T(op,int) \ DECL_ASN_OP_T(op,unsigned int) \ DECL_ASN_OP_T(op,long) \ DECL_ASN_OP_T(op,unsigned long) \ DECL_ASN_OP_T(op,double) \ DECL_ASN_OP_T(op,const char*) \ DECL_ASN_OP_T(op,const sc_fxval&) \ DECL_ASN_OP_T(op,const sc_fxval_fast&) \ DECL_ASN_OP_T(op,const sc_fxnum&) \ DECL_ASN_OP_T(op,const sc_fxnum_fast&) \ DECL_ASN_OP_OTHER(op)
#define DECL_ASN_OP | ( | op | ) |
値:
DECL_ASN_OP_T(op,int) \ DECL_ASN_OP_T(op,unsigned int) \ DECL_ASN_OP_T(op,long) \ DECL_ASN_OP_T(op,unsigned long) \ DECL_ASN_OP_T(op,double) \ DECL_ASN_OP_T(op,const char*) \ DECL_ASN_OP_T(op,const sc_fxval&) \ DECL_ASN_OP_T(op,const sc_fxval_fast&) \ DECL_ASN_OP_T(op,const sc_fxnum&) \ DECL_ASN_OP_T(op,const sc_fxnum_fast&) \ DECL_ASN_OP_OTHER(op)
#define DECL_ASN_OP_OTHER | ( | op | ) |
値:
DECL_ASN_OP_T(op,int64) \ DECL_ASN_OP_T(op,uint64) \ DECL_ASN_OP_T(op,const sc_int_base&) \ DECL_ASN_OP_T(op,const sc_uint_base&) \ DECL_ASN_OP_T(op,const sc_signed&) \ DECL_ASN_OP_T(op,const sc_unsigned&)
#define DECL_ASN_OP_OTHER | ( | op | ) |
値:
DECL_ASN_OP_T(op,int64) \ DECL_ASN_OP_T(op,uint64) \ DECL_ASN_OP_T(op,const sc_int_base&) \ DECL_ASN_OP_T(op,const sc_uint_base&) \ DECL_ASN_OP_T(op,const sc_signed&) \ DECL_ASN_OP_T(op,const sc_unsigned&)
#define DECL_ASN_OP_T | ( | op, | |||
tp | ) | sc_ufix_fast& operator op ( tp ); |
#define DECL_ASN_OP_T | ( | op, | |||
tp | ) | sc_ufix& operator op ( tp ); |
#define DECL_CTORS_T | ( | tp | ) |
#define DECL_CTORS_T | ( | tp | ) |
#define DECL_CTORS_T_A | ( | tp | ) |
値:
sc_ufix_fast( tp, \ sc_fxnum_fast_observer* = 0 ); \ DECL_CTORS_T(tp)
#define DECL_CTORS_T_A | ( | tp | ) |
値:
sc_ufix( tp, \ sc_fxnum_observer* = 0 ); \ DECL_CTORS_T(tp)
#define DECL_CTORS_T_B | ( | tp | ) |
値:
explicit sc_ufix_fast( tp, \ sc_fxnum_fast_observer* = 0 ); \ DECL_CTORS_T(tp)
#define DECL_CTORS_T_B | ( | tp | ) |
値:
explicit sc_ufix( tp, \ sc_fxnum_observer* = 0 ); \ DECL_CTORS_T(tp)
#define DEFN_ASN_OP | ( | op | ) |
値:
DEFN_ASN_OP_T(op,int) \ DEFN_ASN_OP_T(op,unsigned int) \ DEFN_ASN_OP_T(op,long) \ DEFN_ASN_OP_T(op,unsigned long) \ DEFN_ASN_OP_T(op,double) \ DEFN_ASN_OP_T(op,const char*) \ DEFN_ASN_OP_T(op,const sc_fxval&) \ DEFN_ASN_OP_T(op,const sc_fxval_fast&) \ DEFN_ASN_OP_T(op,const sc_fxnum&) \ DEFN_ASN_OP_T(op,const sc_fxnum_fast&) \ DEFN_ASN_OP_OTHER(op)
#define DEFN_ASN_OP | ( | op | ) |
値:
DEFN_ASN_OP_T(op,int) \ DEFN_ASN_OP_T(op,unsigned int) \ DEFN_ASN_OP_T(op,long) \ DEFN_ASN_OP_T(op,unsigned long) \ DEFN_ASN_OP_T(op,double) \ DEFN_ASN_OP_T(op,const char*) \ DEFN_ASN_OP_T(op,const sc_fxval&) \ DEFN_ASN_OP_T(op,const sc_fxval_fast&) \ DEFN_ASN_OP_T(op,const sc_fxnum&) \ DEFN_ASN_OP_T(op,const sc_fxnum_fast&) \ DEFN_ASN_OP_OTHER(op)
#define DEFN_ASN_OP_OTHER | ( | op | ) |
値:
DEFN_ASN_OP_T(op,int64) \ DEFN_ASN_OP_T(op,uint64) \ DEFN_ASN_OP_T(op,const sc_int_base&) \ DEFN_ASN_OP_T(op,const sc_uint_base&) \ DEFN_ASN_OP_T(op,const sc_signed&) \ DEFN_ASN_OP_T(op,const sc_unsigned&)
#define DEFN_ASN_OP_OTHER | ( | op | ) |
値:
DEFN_ASN_OP_T(op,int64) \ DEFN_ASN_OP_T(op,uint64) \ DEFN_ASN_OP_T(op,const sc_int_base&) \ DEFN_ASN_OP_T(op,const sc_uint_base&) \ DEFN_ASN_OP_T(op,const sc_signed&) \ DEFN_ASN_OP_T(op,const sc_unsigned&)
#define DEFN_ASN_OP_T | ( | op, | |||
op2, | |||||
tp | ) |
値:
inline \ sc_ufix_fast& \ sc_ufix_fast::operator op ( const tp& b ) \ { \ SC_FXNUM_FAST_OBSERVER_READ_( *this ) \ b.observer_read(); \ int iwl_c = iwl(); \ for( int i = iwl_c - wl(); i < iwl_c; ++ i ) \ set_bit( i, get_bit( i ) op2 b.get_bit( i ) ); \ cast(); \ SC_FXNUM_FAST_OBSERVER_WRITE_( *this ) \ return *this; \ }
#define DEFN_ASN_OP_T | ( | op, | |||
tp | ) |
値:
inline \ sc_ufix_fast& \ sc_ufix_fast::operator op ( tp a ) \ { \ sc_fxnum_fast::operator op( a ); \ return *this; \ }
#define DEFN_ASN_OP_T | ( | op, | |||
op2, | |||||
tp | ) |
値:
inline \ sc_ufix& \ sc_ufix::operator op ( const tp& b ) \ { \ SC_FXNUM_OBSERVER_READ_( *this ) \ b.observer_read(); \ int iwl_c = iwl(); \ for( int i = iwl_c - wl(); i < iwl_c; ++ i ) \ set_bit( i, get_bit( i ) op2 b.get_bit( i ) ); \ cast(); \ SC_FXNUM_OBSERVER_WRITE_( *this ) \ return *this; \ }
#define DEFN_ASN_OP_T | ( | op, | |||
tp | ) |
値:
inline \ sc_ufix& \ sc_ufix::operator op ( tp a ) \ { \ sc_fxnum::operator op( a ); \ return *this; \ }
#define DEFN_BIN_FNC_T | ( | fnc, | |||
op2, | |||||
tp1, | |||||
tp2 | ) |
値:
inline \ void \ fnc ( sc_ufix_fast& c, const tp1& a, const tp2& b ) \ { \ a.observer_read(); \ b.observer_read(); \ int iwl_c = c.iwl(); \ for( int i = iwl_c - c.wl(); i < iwl_c; ++ i ) \ c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) ); \ c.cast(); \ SC_FXNUM_FAST_OBSERVER_WRITE_( c ) \ }
#define DEFN_BIN_FNC_T | ( | fnc, | |||
op2, | |||||
tp1, | |||||
tp2 | ) |
値:
inline \ void \ fnc ( sc_ufix& c, const tp1& a, const tp2& b ) \ { \ a.observer_read(); \ b.observer_read(); \ int iwl_c = c.iwl(); \ for( int i = iwl_c - c.wl(); i < iwl_c; ++ i ) \ c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) ); \ c.cast(); \ SC_FXNUM_OBSERVER_WRITE_( c ) \ }
#define DEFN_BIN_OP_T | ( | op, | |||
op2, | |||||
tp1, | |||||
tp2 | ) |
値:
inline \ const sc_ufix_fast \ operator op ( const tp1& a, const tp2& b ) \ { \ a.observer_read(); \ b.observer_read(); \ int iwl_a = a.iwl(); \ int iwl_b = b.iwl(); \ int iwl_c = sc_max( iwl_a, iwl_b ); \ int fwl_c = sc_max( a.wl() - iwl_a, b.wl() - iwl_b ); \ sc_ufix_fast c( iwl_c + fwl_c, iwl_c ); \ for( int i = -fwl_c; i < iwl_c; ++ i ) \ c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) ); \ return sc_ufix_fast( c, iwl_c + fwl_c, iwl_c ); \ }
#define DEFN_BIN_OP_T | ( | op, | |||
op2, | |||||
tp1, | |||||
tp2 | ) |
値:
inline \ const sc_ufix \ operator op ( const tp1& a, const tp2& b ) \ { \ a.observer_read(); \ b.observer_read(); \ int iwl_a = a.iwl(); \ int iwl_b = b.iwl(); \ int iwl_c = sc_max( iwl_a, iwl_b ); \ int fwl_c = sc_max( a.wl() - iwl_a, b.wl() - iwl_b ); \ sc_ufix c( iwl_c + fwl_c, iwl_c ); \ for( int i = -fwl_c; i < iwl_c; ++ i ) \ c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) ); \ return sc_ufix( c, iwl_c + fwl_c, iwl_c ); \ }
#define DEFN_CTORS_T_A | ( | tp | ) |
#define DEFN_CTORS_T_A | ( | tp | ) |
#define DEFN_CTORS_T_B | ( | tp | ) |
#define DEFN_CTORS_T_B | ( | tp | ) |