71 class vcd_sc_fxnum_trace;
72 class vcd_sc_fxnum_fast_trace;
73 class wif_sc_fxnum_trace;
74 class wif_sc_fxnum_fast_trace;
82class sc_fxnum_bitref_r;
83class sc_fxnum_fast_bitref_r;
85class sc_fxnum_fast_bitref;
86class sc_fxnum_subref_r;
87class sc_fxnum_fast_subref_r;
89class sc_fxnum_fast_subref;
112 operator bool()
const;
115 void print( ::std::ostream& = ::std::cout )
const;
116 void dump( ::std::ostream& = ::std::cout )
const;
150#define DECL_ASN_OP_T(op,tp) \
151 sc_fxnum_bitref& operator op ( tp );
153#define DECL_ASN_OP(op) \
154 DECL_ASN_OP_T(op,const sc_fxnum_bitref&) \
155 DECL_ASN_OP_T(op,const sc_fxnum_fast_bitref&) \
156 DECL_ASN_OP_T(op,const sc_bit&) \
157 DECL_ASN_OP_T(op,bool)
169 void scan( ::std::istream& = ::std::cin );
194 operator bool()
const;
196 void print( ::std::ostream& = ::std::cout )
const;
197 void dump( ::std::ostream& = ::std::cout )
const;
226#define DECL_ASN_OP_T(op,tp) \
227 sc_fxnum_fast_bitref& operator op ( tp );
229#define DECL_ASN_OP(op) \
230 DECL_ASN_OP_T(op,const sc_fxnum_bitref&) \
231 DECL_ASN_OP_T(op,const sc_fxnum_fast_bitref&) \
232 DECL_ASN_OP_T(op,const sc_bit&) \
233 DECL_ASN_OP_T(op,bool)
244 void scan( ::std::istream& = ::std::cin );
278#define DECL_REL_OP_T(op,tp) \
279 friend bool operator op ( const sc_fxnum_subref_r&, tp ); \
280 friend bool operator op ( tp, const sc_fxnum_subref_r& );
282#define DECL_REL_OP(op) \
283 friend bool operator op ( const sc_fxnum_subref_r&, \
284 const sc_fxnum_subref_r& ); \
285 friend bool operator op ( const sc_fxnum_subref_r&, \
286 const sc_fxnum_fast_subref_r& ); \
287 DECL_REL_OP_T(op,const sc_bv_base&) \
288 DECL_REL_OP_T(op,const sc_lv_base&) \
289 DECL_REL_OP_T(op,const char*) \
290 DECL_REL_OP_T(op,const bool*) \
291 DECL_REL_OP_T(op,const sc_signed&) \
292 DECL_REL_OP_T(op,const sc_unsigned&) \
293 DECL_REL_OP_T(op,int) \
294 DECL_REL_OP_T(op,unsigned int) \
295 DECL_REL_OP_T(op,long) \
296 DECL_REL_OP_T(op,unsigned long)
323 unsigned int to_uint()
const;
324 long to_long()
const;
325 unsigned long to_ulong()
const;
326 int64 to_int64()
const;
329#ifdef SC_DT_DEPRECATED
330 int to_signed()
const;
331 unsigned int to_unsigned()
const;
346 void print( ::std::ostream& = ::std::cout )
const;
347 void dump( ::std::ostream& = ::std::cout )
const;
385#define DECL_ASN_OP_T(tp) \
386 sc_fxnum_subref& operator = ( tp );
408#define DECL_ASN_OP_T_A(op,tp) \
409 sc_fxnum_subref& operator op ## = ( tp );
411#define DECL_ASN_OP_A(op) \
412 DECL_ASN_OP_T_A(op,const sc_fxnum_subref&) \
413 DECL_ASN_OP_T_A(op,const sc_fxnum_fast_subref&) \
414 DECL_ASN_OP_T_A(op,const sc_bv_base&) \
415 DECL_ASN_OP_T_A(op,const sc_lv_base&)
421#undef DECL_ASN_OP_T_A
424 void scan( ::std::istream& = ::std::cin );
458#define DECL_REL_OP_T(op,tp) \
459 friend bool operator op ( const sc_fxnum_fast_subref_r&, tp ); \
460 friend bool operator op ( tp, const sc_fxnum_fast_subref_r& );
462#define DECL_REL_OP(op) \
463 friend bool operator op ( const sc_fxnum_fast_subref_r&, \
464 const sc_fxnum_fast_subref_r& ); \
465 friend bool operator op ( const sc_fxnum_fast_subref_r&, \
466 const sc_fxnum_subref_r& ); \
467 DECL_REL_OP_T(op,const sc_bv_base&) \
468 DECL_REL_OP_T(op,const sc_lv_base&) \
469 DECL_REL_OP_T(op,const char*) \
470 DECL_REL_OP_T(op,const bool*) \
471 DECL_REL_OP_T(op,const sc_signed&) \
472 DECL_REL_OP_T(op,const sc_unsigned&) \
473 DECL_REL_OP_T(op,int) \
474 DECL_REL_OP_T(op,unsigned int) \
475 DECL_REL_OP_T(op,long) \
476 DECL_REL_OP_T(op,unsigned long)
503 unsigned int to_uint()
const;
504 long to_long()
const;
505 unsigned long to_ulong()
const;
506 int64 to_int64()
const;
509#ifdef SC_DT_DEPRECATED
510 int to_signed()
const;
511 unsigned int to_unsigned()
const;
526 void print( ::std::ostream& = ::std::cout )
const;
527 void dump( ::std::ostream& = ::std::cout )
const;
567#define DECL_ASN_OP_T(tp) \
568 sc_fxnum_fast_subref& operator = ( tp );
590#define DECL_ASN_OP_T_A(op,tp) \
591 sc_fxnum_fast_subref& operator op ## = ( tp );
593#define DECL_ASN_OP_A(op) \
594 DECL_ASN_OP_T_A(op,const sc_fxnum_subref&) \
595 DECL_ASN_OP_T_A(op,const sc_fxnum_fast_subref&) \
596 DECL_ASN_OP_T_A(op,const sc_bv_base&) \
597 DECL_ASN_OP_T_A(op,const sc_lv_base&)
603#undef DECL_ASN_OP_T_A
606 void scan( ::std::istream& = ::std::cin );
627 friend class sc_core::vcd_sc_fxnum_trace;
628 friend class sc_core::wif_sc_fxnum_trace;
645#define DECL_CTOR_T(tp) \
647 const sc_fxtype_params&, \
649 const sc_fxcast_switch&, \
650 sc_fxnum_observer* );
694#define DECL_BIN_OP_T(op,tp) \
695 friend sc_fxval operator op ( const sc_fxnum&, tp ); \
696 friend sc_fxval operator op ( tp, const sc_fxnum& );
698#define DECL_BIN_OP_OTHER(op) \
699 DECL_BIN_OP_T(op,int64) \
700 DECL_BIN_OP_T(op,uint64) \
701 DECL_BIN_OP_T(op,const sc_int_base&) \
702 DECL_BIN_OP_T(op,const sc_uint_base&) \
703 DECL_BIN_OP_T(op,const sc_signed&) \
704 DECL_BIN_OP_T(op,const sc_unsigned&)
706#define DECL_BIN_OP(op,dummy) \
707 friend sc_fxval operator op ( const sc_fxnum&, const sc_fxnum& ); \
708 DECL_BIN_OP_T(op,int) \
709 DECL_BIN_OP_T(op,unsigned int) \
710 DECL_BIN_OP_T(op,long) \
711 DECL_BIN_OP_T(op,unsigned long) \
712 DECL_BIN_OP_T(op,float) \
713 DECL_BIN_OP_T(op,double) \
714 DECL_BIN_OP_T(op,const char*) \
715 DECL_BIN_OP_T(op,const sc_fxval&) \
716 DECL_BIN_OP_T(op,const sc_fxval_fast&) \
717 DECL_BIN_OP_T(op,const sc_fxnum_fast&) \
718 DECL_BIN_OP_OTHER(op)
745#undef DECL_BIN_OP_OTHER
754#define DECL_BIN_FNC_T(fnc,tp) \
755 friend void fnc ( sc_fxval&, const sc_fxnum&, tp ); \
756 friend void fnc ( sc_fxval&, tp, const sc_fxnum& ); \
757 friend void fnc ( sc_fxnum&, const sc_fxnum&, tp ); \
758 friend void fnc ( sc_fxnum&, tp, const sc_fxnum& );
760#define DECL_BIN_FNC_OTHER(fnc) \
761 DECL_BIN_FNC_T(fnc,int64) \
762 DECL_BIN_FNC_T(fnc,uint64) \
763 DECL_BIN_FNC_T(fnc,const sc_int_base&) \
764 DECL_BIN_FNC_T(fnc,const sc_uint_base&) \
765 DECL_BIN_FNC_T(fnc,const sc_signed&) \
766 DECL_BIN_FNC_T(fnc,const sc_unsigned&)
768#define DECL_BIN_FNC(fnc) \
769 friend void fnc ( sc_fxval&, const sc_fxnum&, const sc_fxnum& ); \
770 friend void fnc ( sc_fxnum&, const sc_fxnum&, const sc_fxnum& ); \
771 DECL_BIN_FNC_T(fnc,int) \
772 DECL_BIN_FNC_T(fnc,unsigned int) \
773 DECL_BIN_FNC_T(fnc,long) \
774 DECL_BIN_FNC_T(fnc,unsigned long) \
775 DECL_BIN_FNC_T(fnc,float) \
776 DECL_BIN_FNC_T(fnc,double) \
777 DECL_BIN_FNC_T(fnc,const char*) \
778 DECL_BIN_FNC_T(fnc,const sc_fxval&) \
779 DECL_BIN_FNC_T(fnc,const sc_fxval_fast&) \
780 DECL_BIN_FNC_T(fnc,const sc_fxnum_fast&) \
781 DECL_BIN_FNC_OTHER(fnc)
789#undef DECL_BIN_FNC_OTHER
800#define DECL_REL_OP_T(op,tp) \
801 friend bool operator op ( const sc_fxnum&, tp ); \
802 friend bool operator op ( tp, const sc_fxnum& );
804#define DECL_REL_OP_OTHER(op) \
805 DECL_REL_OP_T(op,int64) \
806 DECL_REL_OP_T(op,uint64) \
807 DECL_REL_OP_T(op,const sc_int_base&) \
808 DECL_REL_OP_T(op,const sc_uint_base&) \
809 DECL_REL_OP_T(op,const sc_signed&) \
810 DECL_REL_OP_T(op,const sc_unsigned&)
812#define DECL_REL_OP(op) \
813 friend bool operator op ( const sc_fxnum&, const sc_fxnum& ); \
814 DECL_REL_OP_T(op,int) \
815 DECL_REL_OP_T(op,unsigned int) \
816 DECL_REL_OP_T(op,long) \
817 DECL_REL_OP_T(op,unsigned long) \
818 DECL_REL_OP_T(op,float) \
819 DECL_REL_OP_T(op,double) \
820 DECL_REL_OP_T(op,const char*) \
821 DECL_REL_OP_T(op,const sc_fxval&) \
822 DECL_REL_OP_T(op,const sc_fxval_fast&) \
823 DECL_REL_OP_T(op,const sc_fxnum_fast&) \
824 DECL_REL_OP_OTHER(op)
834#undef DECL_REL_OP_OTHER
840#define DECL_ASN_OP_T(op,tp) \
841 sc_fxnum& operator op( tp );
843#define DECL_ASN_OP_OTHER(op) \
844 DECL_ASN_OP_T(op,int64) \
845 DECL_ASN_OP_T(op,uint64) \
846 DECL_ASN_OP_T(op,const sc_int_base&) \
847 DECL_ASN_OP_T(op,const sc_uint_base&) \
848 DECL_ASN_OP_T(op,const sc_signed&) \
849 DECL_ASN_OP_T(op,const sc_unsigned&)
851#define DECL_ASN_OP(op) \
852 DECL_ASN_OP_T(op,int) \
853 DECL_ASN_OP_T(op,unsigned int) \
854 DECL_ASN_OP_T(op,long) \
855 DECL_ASN_OP_T(op,unsigned long) \
856 DECL_ASN_OP_T(op,float) \
857 DECL_ASN_OP_T(op,double) \
858 DECL_ASN_OP_T(op,const char*) \
859 DECL_ASN_OP_T(op,const sc_fxval&) \
860 DECL_ASN_OP_T(op,const sc_fxval_fast&) \
861 DECL_ASN_OP_T(op,const sc_fxnum&) \
862 DECL_ASN_OP_T(op,const sc_fxnum_fast&) \
863 DECL_ASN_OP_OTHER(op)
876#undef DECL_ASN_OP_OTHER
916 operator double()
const;
921 short to_short()
const;
922 unsigned short to_ushort()
const;
924 unsigned int to_uint()
const;
925 long to_long()
const;
926 unsigned long to_ulong()
const;
927 int64 to_int64()
const;
929 float to_float()
const;
930 double to_double()
const;
951 bool is_zero()
const;
954 bool is_normal()
const;
956 bool quantization_flag()
const;
957 bool overflow_flag()
const;
977 void print( ::std::ostream& = ::std::cout )
const;
978 void scan( ::std::istream& = ::std::cin );
979 void dump( ::std::ostream& = ::std::cout )
const;
983 void observer_read()
const;
987 bool get_bit(
int )
const;
991 bool set_bit(
int,
bool );
994 bool get_slice(
int,
int,
sc_bv_base& )
const;
995 bool set_slice(
int,
int,
const sc_bv_base& );
1036 friend class sc_core::vcd_sc_fxnum_fast_trace;
1037 friend class sc_core::wif_sc_fxnum_fast_trace;
1054#define DECL_CTOR_T(tp) \
1055 sc_fxnum_fast( tp, \
1056 const sc_fxtype_params&, \
1058 const sc_fxcast_switch&, \
1059 sc_fxnum_fast_observer* );
1085 double get_val()
const;
1097 friend void neg( sc_fxval_fast&,
const sc_fxnum_fast& );
1098 friend void neg( sc_fxnum_fast&,
const sc_fxnum_fast& );
1103#define DECL_BIN_OP_T(op,tp) \
1104 friend sc_fxval_fast operator op ( const sc_fxnum_fast&, tp ); \
1105 friend sc_fxval_fast operator op ( tp, const sc_fxnum_fast& );
1107#define DECL_BIN_OP_OTHER(op) \
1108 DECL_BIN_OP_T(op,int64) \
1109 DECL_BIN_OP_T(op,uint64) \
1110 DECL_BIN_OP_T(op,const sc_int_base&) \
1111 DECL_BIN_OP_T(op,const sc_uint_base&) \
1112 DECL_BIN_OP_T(op,const sc_signed&) \
1113 DECL_BIN_OP_T(op,const sc_unsigned&)
1115#define DECL_BIN_OP(op,dummy) \
1116 friend sc_fxval_fast operator op ( const sc_fxnum_fast&, \
1117 const sc_fxnum_fast& ); \
1118 DECL_BIN_OP_T(op,int) \
1119 DECL_BIN_OP_T(op,unsigned int) \
1120 DECL_BIN_OP_T(op,long) \
1121 DECL_BIN_OP_T(op,unsigned long) \
1122 DECL_BIN_OP_T(op,float) \
1123 DECL_BIN_OP_T(op,double) \
1124 DECL_BIN_OP_T(op,const char*) \
1125 DECL_BIN_OP_T(op,const sc_fxval_fast&) \
1126 DECL_BIN_OP_OTHER(op)
1132 friend sc_fxval_fast
operator / (
const sc_fxnum_fast&,
1133 const sc_fxnum_fast& );
1151#undef DECL_BIN_OP_OTHER
1160#define DECL_BIN_FNC_T(fnc,tp) \
1161 friend void fnc ( sc_fxval_fast&, const sc_fxnum_fast&, tp ); \
1162 friend void fnc ( sc_fxval_fast&, tp, const sc_fxnum_fast& ); \
1163 friend void fnc ( sc_fxnum_fast&, const sc_fxnum_fast&, tp ); \
1164 friend void fnc ( sc_fxnum_fast&, tp, const sc_fxnum_fast& );
1166#define DECL_BIN_FNC_OTHER(fnc) \
1167 DECL_BIN_FNC_T(fnc,int64) \
1168 DECL_BIN_FNC_T(fnc,uint64) \
1169 DECL_BIN_FNC_T(fnc,const sc_int_base&) \
1170 DECL_BIN_FNC_T(fnc,const sc_uint_base&) \
1171 DECL_BIN_FNC_T(fnc,const sc_signed&) \
1172 DECL_BIN_FNC_T(fnc,const sc_unsigned&)
1174#define DECL_BIN_FNC(fnc) \
1175 friend void fnc ( sc_fxval_fast&, const sc_fxnum_fast&, \
1176 const sc_fxnum_fast& ); \
1177 friend void fnc ( sc_fxnum_fast&, const sc_fxnum_fast&, \
1178 const sc_fxnum_fast& ); \
1179 DECL_BIN_FNC_T(fnc,int) \
1180 DECL_BIN_FNC_T(fnc,unsigned int) \
1181 DECL_BIN_FNC_T(fnc,long) \
1182 DECL_BIN_FNC_T(fnc,unsigned long) \
1183 DECL_BIN_FNC_T(fnc,float) \
1184 DECL_BIN_FNC_T(fnc,double) \
1185 DECL_BIN_FNC_T(fnc,const char*) \
1186 DECL_BIN_FNC_T(fnc,const sc_fxval&) \
1187 DECL_BIN_FNC_T(fnc,const sc_fxval_fast&) \
1188 DECL_BIN_FNC_T(fnc,const sc_fxnum&) \
1189 DECL_BIN_FNC_OTHER(fnc)
1196#undef DECL_BIN_FNC_T
1197#undef DECL_BIN_FNC_OTHER
1200 friend void lshift( sc_fxval_fast&,
const sc_fxnum_fast&,
int );
1201 friend void rshift( sc_fxval_fast&,
const sc_fxnum_fast&,
int );
1202 friend void lshift( sc_fxnum_fast&,
const sc_fxnum_fast&,
int );
1203 friend void rshift( sc_fxnum_fast&,
const sc_fxnum_fast&,
int );
1208#define DECL_REL_OP_T(op,tp) \
1209 friend bool operator op ( const sc_fxnum_fast&, tp ); \
1210 friend bool operator op ( tp, const sc_fxnum_fast& );
1212#define DECL_REL_OP_OTHER(op) \
1213 DECL_REL_OP_T(op,int64) \
1214 DECL_REL_OP_T(op,uint64) \
1215 DECL_REL_OP_T(op,const sc_int_base&) \
1216 DECL_REL_OP_T(op,const sc_uint_base&) \
1217 DECL_REL_OP_T(op,const sc_signed&) \
1218 DECL_REL_OP_T(op,const sc_unsigned&)
1220#define DECL_REL_OP(op) \
1221 friend bool operator op ( const sc_fxnum_fast&, const sc_fxnum_fast& ); \
1222 DECL_REL_OP_T(op,int) \
1223 DECL_REL_OP_T(op,unsigned int) \
1224 DECL_REL_OP_T(op,long) \
1225 DECL_REL_OP_T(op,unsigned long) \
1226 DECL_REL_OP_T(op,float) \
1227 DECL_REL_OP_T(op,double) \
1228 DECL_REL_OP_T(op,const char*) \
1229 DECL_REL_OP_T(op,const sc_fxval_fast&) \
1230 DECL_REL_OP_OTHER(op)
1240#undef DECL_REL_OP_OTHER
1246#define DECL_ASN_OP_T(op,tp) \
1247 sc_fxnum_fast& operator op( tp );
1249#define DECL_ASN_OP_OTHER(op) \
1250 DECL_ASN_OP_T(op,int64) \
1251 DECL_ASN_OP_T(op,uint64) \
1252 DECL_ASN_OP_T(op,const sc_int_base&) \
1253 DECL_ASN_OP_T(op,const sc_uint_base&) \
1254 DECL_ASN_OP_T(op,const sc_signed&) \
1255 DECL_ASN_OP_T(op,const sc_unsigned&)
1257#define DECL_ASN_OP(op) \
1258 DECL_ASN_OP_T(op,int) \
1259 DECL_ASN_OP_T(op,unsigned int) \
1260 DECL_ASN_OP_T(op,long) \
1261 DECL_ASN_OP_T(op,unsigned long) \
1262 DECL_ASN_OP_T(op,float) \
1263 DECL_ASN_OP_T(op,double) \
1264 DECL_ASN_OP_T(op,const char*) \
1265 DECL_ASN_OP_T(op,const sc_fxval&) \
1266 DECL_ASN_OP_T(op,const sc_fxval_fast&) \
1267 DECL_ASN_OP_T(op,const sc_fxnum&) \
1268 DECL_ASN_OP_T(op,const sc_fxnum_fast&) \
1269 DECL_ASN_OP_OTHER(op)
1282#undef DECL_ASN_OP_OTHER
1288 sc_fxval_fast operator ++ (
int );
1289 sc_fxval_fast operator -- (
int );
1291 sc_fxnum_fast& operator ++ ();
1292 sc_fxnum_fast& operator -- ();
1297 sc_fxnum_fast_bitref_r operator [] (
int )
const;
1298 sc_fxnum_fast_bitref operator [] (
int );
1300 sc_fxnum_fast_bitref_r bit(
int )
const;
1301 sc_fxnum_fast_bitref bit(
int );
1306 sc_fxnum_fast_subref_r operator () (
int,
int )
const;
1307 sc_fxnum_fast_subref operator () (
int,
int );
1309 sc_fxnum_fast_subref_r range(
int,
int )
const;
1310 sc_fxnum_fast_subref range(
int,
int );
1313 sc_fxnum_fast_subref_r operator () ()
const;
1314 sc_fxnum_fast_subref operator () ();
1316 sc_fxnum_fast_subref_r range()
const;
1317 sc_fxnum_fast_subref range();
1322 operator double()
const;
1327 short to_short()
const;
1328 unsigned short to_ushort()
const;
1330 unsigned int to_uint()
const;
1331 long to_long()
const;
1332 unsigned long to_ulong()
const;
1333 int64 to_int64()
const;
1334 uint64 to_uint64()
const;
1335 float to_float()
const;
1336 double to_double()
const;
1356 bool is_neg()
const;
1357 bool is_zero()
const;
1360 bool is_normal()
const;
1362 bool quantization_flag()
const;
1363 bool overflow_flag()
const;
1383 void print( ::std::ostream& = ::std::cout )
const;
1384 void scan( ::std::istream& = ::std::cin );
1385 void dump( ::std::ostream& = ::std::cout )
const;
1389 void observer_read()
const;
1433 : m_num(num_) , m_idx(idx_)
1438 : m_num( a.m_num ), m_idx ( a.m_idx )
1445sc_fxnum_bitref_r::operator bool()
const
1471sc_fxnum_bitref::sc_fxnum_bitref( sc_fxnum& num_,
int idx_ )
1472 : sc_fxnum_bitref_r ( num_ , idx_ )
1513 set(
static_cast<bool>( a ) );
1520sc_fxnum_bitref::operator = (
bool a )
1552sc_fxnum_bitref::operator &= ( const sc_bit&
b )
1555 set(
get() &&
static_cast<bool>(
b ) );
1595sc_fxnum_bitref::operator |= ( const sc_bit&
b )
1598 set(
get() ||
static_cast<bool>(
b ) );
1638sc_fxnum_bitref::operator ^= ( const sc_bit&
b )
1641 set(
get() !=
static_cast<bool>(
b ) );
1678 : m_num( a.m_num ), m_idx( a.m_idx )
1682sc_fxnum_fast_bitref_r::operator bool()
const
1706sc_fxnum_fast_bitref::sc_fxnum_fast_bitref( sc_fxnum_fast& num_,
int idx_ )
1707 : sc_fxnum_fast_bitref_r( num_ , idx_ )
1748 set(
static_cast<bool>( a ) );
1754sc_fxnum_fast_bitref&
1755sc_fxnum_fast_bitref::operator = (
bool a )
1764sc_fxnum_fast_bitref&
1775sc_fxnum_fast_bitref&
1776sc_fxnum_fast_bitref::operator &= ( const sc_fxnum_fast_bitref&
b )
1786sc_fxnum_fast_bitref&
1787sc_fxnum_fast_bitref::operator &= ( const sc_bit&
b )
1790 set(
get() &&
static_cast<bool>(
b ) );
1796sc_fxnum_fast_bitref&
1807sc_fxnum_fast_bitref&
1818sc_fxnum_fast_bitref&
1819sc_fxnum_fast_bitref::operator |= ( const sc_fxnum_fast_bitref&
b )
1829sc_fxnum_fast_bitref&
1830sc_fxnum_fast_bitref::operator |= ( const sc_bit&
b )
1833 set(
get() ||
static_cast<bool>(
b ) );
1839sc_fxnum_fast_bitref&
1850sc_fxnum_fast_bitref&
1861sc_fxnum_fast_bitref&
1862sc_fxnum_fast_bitref::operator ^= ( const sc_fxnum_fast_bitref&
b )
1872sc_fxnum_fast_bitref&
1873sc_fxnum_fast_bitref::operator ^= ( const sc_bit&
b )
1876 set(
get() !=
static_cast<bool>(
b ) );
1882sc_fxnum_fast_bitref&
1907 :
m_num( num_ ), m_from( from_ ), m_to( to_ ),
1909 sc_min( m_from, m_to ) + 1 ) )
1915 : m_num( a.m_num ), m_from( a.m_from ), m_to( a.m_to ),
1927#define DEFN_REL_OP_T(op,tp) \
1930operator op ( const sc_fxnum_subref_r& a, tp b ) \
1932 return ( static_cast<sc_bv_base>( a ) op b ); \
1937operator op ( tp a, const sc_fxnum_subref_r& b ) \
1939 return ( static_cast<sc_bv_base>( b ) op a ); \
1942#define DEFN_REL_OP(op) \
1945operator op ( const sc_fxnum_subref_r& a, const sc_fxnum_subref_r& b ) \
1947 return ( static_cast<sc_bv_base>( a ) op static_cast<sc_bv_base>( b ) ); \
1952operator op ( const sc_fxnum_subref_r& a, const sc_fxnum_fast_subref_r& b ) \
1954 return ( static_cast<sc_bv_base>( a ) op static_cast<sc_bv_base>( b ) ); \
1957DEFN_REL_OP_T(op,const sc_bv_base&) \
1958DEFN_REL_OP_T(op,const sc_lv_base&) \
1959DEFN_REL_OP_T(op,const char*) \
1960DEFN_REL_OP_T(op,const bool*) \
1961DEFN_REL_OP_T(op,const sc_signed&) \
1962DEFN_REL_OP_T(op,const sc_unsigned&) \
1963DEFN_REL_OP_T(op,int) \
1964DEFN_REL_OP_T(op,unsigned int) \
1965DEFN_REL_OP_T(op,long) \
1966DEFN_REL_OP_T(op,unsigned long)
1977#define DEFN_RED_FNC(fnc) \
1980sc_fxnum_subref_r::fnc() const \
1982 SC_FXNUM_OBSERVER_READ_( m_num ) \
1984 return static_cast<bool>( m_bv.fnc() ); \
2064#ifdef SC_DT_DEPRECATED
2068sc_fxnum_subref_r::to_signed()
const
2075sc_fxnum_subref_r::to_unsigned()
const
2128sc_fxnum_subref::sc_fxnum_subref(
sc_fxnum& num_,
int from_,
int to_ )
2159sc_fxnum_subref::operator = (
const sc_fxnum_fast_subref& a )
2161 m_bv =
static_cast<sc_bv_base
>( a );
2167#define DEFN_ASN_OP_T(tp) \
2170sc_fxnum_subref::operator = ( tp a ) \
2174 SC_FXNUM_OBSERVER_WRITE_( m_num ) \
2197#define DEFN_ASN_OP_T(op,tp) \
2200sc_fxnum_subref::operator op ## = ( tp a ) \
2202 SC_FXNUM_OBSERVER_READ_( m_num ) \
2206 SC_FXNUM_OBSERVER_WRITE_( m_num ) \
2210#define DEFN_ASN_OP(op) \
2213sc_fxnum_subref::operator op ## = ( const sc_fxnum_subref& a ) \
2215 SC_FXNUM_OBSERVER_READ_( m_num ) \
2217 m_bv = m_bv op static_cast<sc_bv_base>( a ); \
2219 SC_FXNUM_OBSERVER_WRITE_( m_num ) \
2225sc_fxnum_subref::operator op ## = ( const sc_fxnum_fast_subref& a ) \
2227 SC_FXNUM_OBSERVER_READ_( m_num ) \
2229 m_bv = m_bv op static_cast<sc_bv_base>( a ); \
2231 SC_FXNUM_OBSERVER_WRITE_( m_num ) \
2235DEFN_ASN_OP_T(op,const sc_bv_base&) \
2236DEFN_ASN_OP_T(op,const sc_lv_base&)
2269 : m_num(num_), m_from(from_), m_to(to_),
2271 sc_min( m_from, m_to ) + 1 ) )
2276 : m_num( a.m_num ), m_from( a.m_from ), m_to( a.m_to ),
2289#define DEFN_REL_OP_T(op,tp) \
2292operator op ( const sc_fxnum_fast_subref_r& a, tp b ) \
2294 return ( static_cast<sc_bv_base>( a ) op b ); \
2299operator op ( tp a, const sc_fxnum_fast_subref_r& b ) \
2301 return ( static_cast<sc_bv_base>( b ) op a ); \
2304#define DEFN_REL_OP(op) \
2307operator op ( const sc_fxnum_fast_subref_r& a, \
2308 const sc_fxnum_fast_subref_r& b ) \
2310 return ( static_cast<sc_bv_base>( a ) op static_cast<sc_bv_base>( b ) ); \
2315operator op ( const sc_fxnum_fast_subref_r& a, const sc_fxnum_subref_r& b ) \
2317 return ( static_cast<sc_bv_base>( a ) op static_cast<sc_bv_base>( b ) ); \
2320DEFN_REL_OP_T(op,const sc_bv_base&) \
2321DEFN_REL_OP_T(op,const sc_lv_base&) \
2322DEFN_REL_OP_T(op,const char*) \
2323DEFN_REL_OP_T(op,const bool*) \
2324DEFN_REL_OP_T(op,const sc_signed&) \
2325DEFN_REL_OP_T(op,const sc_unsigned&) \
2326DEFN_REL_OP_T(op,int) \
2327DEFN_REL_OP_T(op,unsigned int) \
2328DEFN_REL_OP_T(op,long) \
2329DEFN_REL_OP_T(op,unsigned long)
2340#define DEFN_RED_FNC(fnc) \
2343sc_fxnum_fast_subref_r::fnc() const \
2345 SC_FXNUM_FAST_OBSERVER_READ_( m_num ) \
2347 return static_cast<bool>( m_bv.fnc() ); \
2427#ifdef SC_DT_DEPRECATED
2431sc_fxnum_fast_subref_r::to_signed()
const
2438sc_fxnum_fast_subref_r::to_unsigned()
const
2499sc_fxnum_fast_subref::sc_fxnum_fast_subref( sc_fxnum_fast& num_,
2500 int from_,
int to_ )
2501 : sc_fxnum_fast_subref_r( num_ , from_ , to_ )
2526sc_fxnum_fast_subref&
2527sc_fxnum_fast_subref::operator = (
const sc_fxnum_fast_subref& a )
2531 m_bv =
static_cast<sc_bv_base
>( a );
2538#define DEFN_ASN_OP_T(tp) \
2540sc_fxnum_fast_subref& \
2541sc_fxnum_fast_subref::operator = ( tp a ) \
2545 SC_FXNUM_FAST_OBSERVER_WRITE_( m_num ) \
2568#define DEFN_ASN_OP_T(op,tp) \
2570sc_fxnum_fast_subref& \
2571sc_fxnum_fast_subref::operator op ## = ( tp a ) \
2573 SC_FXNUM_FAST_OBSERVER_READ_( m_num ) \
2577 SC_FXNUM_FAST_OBSERVER_WRITE_( m_num ) \
2581#define DEFN_ASN_OP(op) \
2583sc_fxnum_fast_subref& \
2584sc_fxnum_fast_subref::operator op ## = ( const sc_fxnum_subref& a ) \
2586 SC_FXNUM_FAST_OBSERVER_READ_( m_num ) \
2588 m_bv = m_bv op static_cast<sc_bv_base>( a ); \
2590 SC_FXNUM_FAST_OBSERVER_WRITE_( m_num ) \
2595sc_fxnum_fast_subref& \
2596sc_fxnum_fast_subref::operator op ## = ( const sc_fxnum_fast_subref& a ) \
2598 SC_FXNUM_FAST_OBSERVER_READ_( m_num ) \
2600 m_bv = m_bv op static_cast<sc_bv_base>( a ); \
2602 SC_FXNUM_FAST_OBSERVER_WRITE_( m_num ) \
2606DEFN_ASN_OP_T(op,const sc_bv_base&) \
2607DEFN_ASN_OP_T(op,const sc_lv_base&)
2647 m_rep->
cast( m_params, m_q_flag, m_o_flag );
2659 m_params( type_params_, enc_, cast_sw ),
2662 m_observer( observer_ )
2668#define DEFN_CTOR_T(tp,arg) \
2670sc_fxnum::sc_fxnum( tp a, \
2671 const sc_fxtype_params& type_params_, \
2673 const sc_fxcast_switch& cast_sw, \
2674 sc_fxnum_observer* observer_ ) \
2675: m_rep( new scfx_rep( arg ) ), \
2676 m_params( type_params_, enc_, cast_sw ), \
2677 m_q_flag( false ), \
2678 m_o_flag( false ), \
2679 m_observer( observer_ ) \
2681 SC_FXNUM_OBSERVER_DEFAULT_ \
2683 SC_FXNUM_OBSERVER_CONSTRUCT_( *this ) \
2684 SC_FXNUM_OBSERVER_WRITE_( *this ) \
2687#define DEFN_CTOR_T_A(tp) DEFN_CTOR_T(tp,a)
2688#define DEFN_CTOR_T_B(tp) DEFN_CTOR_T(tp,*a.m_rep)
2689#define DEFN_CTOR_T_C(tp) DEFN_CTOR_T(tp,a.to_double())
2690#define DEFN_CTOR_T_D(tp) DEFN_CTOR_T(tp,a.value())
2778#define DEFN_BIN_OP_T(op,fnc,tp) \
2781operator op ( const sc_fxnum& a, tp b ) \
2783 SC_FXNUM_OBSERVER_READ_( a ) \
2784 sc_fxval tmp( b ); \
2785 return sc_fxval( sc_dt::fnc ## _scfx_rep( *a.m_rep, *tmp.get_rep() ) ); \
2790operator op ( tp a, const sc_fxnum& b ) \
2792 SC_FXNUM_OBSERVER_READ_( b ) \
2793 sc_fxval tmp( a ); \
2794 return sc_fxval( sc_dt::fnc ## _scfx_rep( *tmp.get_rep(), *b.m_rep ) ); \
2797#define DEFN_BIN_OP_OTHER(op,fnc) \
2798DEFN_BIN_OP_T(op,fnc,int64) \
2799DEFN_BIN_OP_T(op,fnc,uint64) \
2800DEFN_BIN_OP_T(op,fnc,const sc_int_base&) \
2801DEFN_BIN_OP_T(op,fnc,const sc_uint_base&) \
2802DEFN_BIN_OP_T(op,fnc,const sc_signed&) \
2803DEFN_BIN_OP_T(op,fnc,const sc_unsigned&)
2805#define DEFN_BIN_OP(op,fnc) \
2808operator op ( const sc_fxnum& a, const sc_fxnum& b ) \
2810 SC_FXNUM_OBSERVER_READ_( a ) \
2811 SC_FXNUM_OBSERVER_READ_( b ) \
2812 return sc_fxval( sc_dt::fnc ## _scfx_rep( *a.m_rep, *b.m_rep ) ); \
2817operator op ( const sc_fxnum& a, const sc_fxval& b ) \
2819 SC_FXNUM_OBSERVER_READ_( a ) \
2820 return sc_fxval( sc_dt::fnc ## _scfx_rep( *a.m_rep, *b.get_rep() ) ); \
2825operator op ( const sc_fxval& a, const sc_fxnum& b ) \
2827 SC_FXNUM_OBSERVER_READ_( b ) \
2828 return sc_fxval( sc_dt::fnc ## _scfx_rep( *a.get_rep(), *b.m_rep ) ); \
2831DEFN_BIN_OP_T(op,fnc,int) \
2832DEFN_BIN_OP_T(op,fnc,unsigned int) \
2833DEFN_BIN_OP_T(op,fnc,long) \
2834DEFN_BIN_OP_T(op,fnc,unsigned long) \
2835DEFN_BIN_OP_T(op,fnc,float) \
2836DEFN_BIN_OP_T(op,fnc,double) \
2837DEFN_BIN_OP_T(op,fnc,const char*) \
2838DEFN_BIN_OP_T(op,fnc,const sc_fxval_fast&) \
2839DEFN_BIN_OP_T(op,fnc,const sc_fxnum_fast&) \
2840DEFN_BIN_OP_OTHER(op,fnc)
2890#undef DEFN_BIN_OP_OTHER
2913#define DEFN_BIN_FNC_T(fnc,tp) \
2916fnc ( sc_fxval& c, const sc_fxnum& a, tp b ) \
2918 SC_FXNUM_OBSERVER_READ_( a ) \
2919 sc_fxval tmp( b ); \
2920 c.set_rep( sc_dt::fnc ## _scfx_rep( *a.m_rep, *tmp.get_rep() ) ); \
2925fnc ( sc_fxval& c, tp a, const sc_fxnum& b ) \
2927 SC_FXNUM_OBSERVER_READ_( b ) \
2928 sc_fxval tmp( a ); \
2929 c.set_rep( sc_dt::fnc ## _scfx_rep( *tmp.get_rep(), *b.m_rep ) ); \
2934fnc ( sc_fxnum& c, const sc_fxnum& a, tp b ) \
2936 SC_FXNUM_OBSERVER_READ_( a ) \
2937 sc_fxval tmp( b ); \
2939 c.m_rep = sc_dt::fnc ## _scfx_rep( *a.m_rep, *tmp.get_rep() ); \
2941 SC_FXNUM_OBSERVER_WRITE_( c ) \
2946fnc ( sc_fxnum& c, tp a, const sc_fxnum& b ) \
2948 SC_FXNUM_OBSERVER_READ_( b ) \
2949 sc_fxval tmp( a ); \
2951 c.m_rep = sc_dt::fnc ## _scfx_rep( *tmp.get_rep(), *b.m_rep ); \
2953 SC_FXNUM_OBSERVER_WRITE_( c ) \
2956#define DEFN_BIN_FNC_OTHER(fnc) \
2957DEFN_BIN_FNC_T(fnc,int64) \
2958DEFN_BIN_FNC_T(fnc,uint64) \
2959DEFN_BIN_FNC_T(fnc,const sc_int_base&) \
2960DEFN_BIN_FNC_T(fnc,const sc_uint_base&) \
2961DEFN_BIN_FNC_T(fnc,const sc_signed&) \
2962DEFN_BIN_FNC_T(fnc,const sc_unsigned&)
2964#define DEFN_BIN_FNC(fnc) \
2967fnc ( sc_fxval& c, const sc_fxnum& a, const sc_fxnum& b ) \
2969 SC_FXNUM_OBSERVER_READ_( a ) \
2970 SC_FXNUM_OBSERVER_READ_( b ) \
2971 c.set_rep( sc_dt::fnc ## _scfx_rep( *a.m_rep, *b.m_rep ) ); \
2976fnc ( sc_fxnum& c, const sc_fxnum& a, const sc_fxnum& b ) \
2978 SC_FXNUM_OBSERVER_READ_( a ) \
2979 SC_FXNUM_OBSERVER_READ_( b ) \
2981 c.m_rep = sc_dt::fnc ## _scfx_rep( *a.m_rep, *b.m_rep ); \
2983 SC_FXNUM_OBSERVER_WRITE_( c ) \
2988fnc ( sc_fxval& c, const sc_fxnum& a, const sc_fxval& b ) \
2990 SC_FXNUM_OBSERVER_READ_( a ) \
2991 c.set_rep( sc_dt::fnc ## _scfx_rep( *a.m_rep, *b.get_rep() ) ); \
2996fnc ( sc_fxval& c, const sc_fxval& a, const sc_fxnum& b ) \
2998 SC_FXNUM_OBSERVER_READ_( b ) \
2999 c.set_rep( sc_dt::fnc ## _scfx_rep( *a.get_rep(), *b.m_rep ) ); \
3004fnc ( sc_fxnum& c, const sc_fxnum& a, const sc_fxval& b ) \
3006 SC_FXNUM_OBSERVER_READ_( a ) \
3008 c.m_rep = sc_dt::fnc ## _scfx_rep( *a.m_rep, *b.get_rep() ); \
3010 SC_FXNUM_OBSERVER_WRITE_( c ) \
3015fnc ( sc_fxnum& c, const sc_fxval& a, const sc_fxnum& b ) \
3017 SC_FXNUM_OBSERVER_READ_( b ) \
3019 c.m_rep = sc_dt::fnc ## _scfx_rep( *a.get_rep(), *b.m_rep ); \
3021 SC_FXNUM_OBSERVER_WRITE_( c ) \
3024DEFN_BIN_FNC_T(fnc,int) \
3025DEFN_BIN_FNC_T(fnc,unsigned int) \
3026DEFN_BIN_FNC_T(fnc,long) \
3027DEFN_BIN_FNC_T(fnc,unsigned long) \
3028DEFN_BIN_FNC_T(fnc,float) \
3029DEFN_BIN_FNC_T(fnc,double) \
3030DEFN_BIN_FNC_T(fnc,const char*) \
3031DEFN_BIN_FNC_T(fnc,const sc_fxval_fast&) \
3032DEFN_BIN_FNC_T(fnc,const sc_fxnum_fast&) \
3033DEFN_BIN_FNC_OTHER(fnc)
3040#undef DEFN_BIN_FNC_T
3041#undef DEFN_BIN_FNC_OTHER
3086#define DEFN_REL_OP_T(op,ret,tp) \
3089operator op ( const sc_fxnum& a, tp b ) \
3091 SC_FXNUM_OBSERVER_READ_( a ) \
3092 sc_fxval tmp( b ); \
3093 int result = sc_dt::cmp_scfx_rep( *a.m_rep, *tmp.get_rep() ); \
3099operator op ( tp a, const sc_fxnum& b ) \
3101 SC_FXNUM_OBSERVER_READ_( b ) \
3102 sc_fxval tmp( a ); \
3103 int result = sc_dt::cmp_scfx_rep( *tmp.get_rep(), *b.m_rep ); \
3107#define DEFN_REL_OP_OTHER(op,ret) \
3108DEFN_REL_OP_T(op,ret,int64) \
3109DEFN_REL_OP_T(op,ret,uint64) \
3110DEFN_REL_OP_T(op,ret,const sc_int_base&) \
3111DEFN_REL_OP_T(op,ret,const sc_uint_base&) \
3112DEFN_REL_OP_T(op,ret,const sc_signed&) \
3113DEFN_REL_OP_T(op,ret,const sc_unsigned&)
3115#define DEFN_REL_OP(op,ret) \
3118operator op ( const sc_fxnum& a, const sc_fxnum& b ) \
3120 SC_FXNUM_OBSERVER_READ_( a ) \
3121 SC_FXNUM_OBSERVER_READ_( b ) \
3122 int result = sc_dt::cmp_scfx_rep( *a.m_rep, *b.m_rep ); \
3128operator op ( const sc_fxnum& a, const sc_fxval& b ) \
3130 SC_FXNUM_OBSERVER_READ_( a ) \
3131 int result = sc_dt::cmp_scfx_rep( *a.m_rep, *b.get_rep() ); \
3137operator op ( const sc_fxval& a, const sc_fxnum& b ) \
3139 SC_FXNUM_OBSERVER_READ_( b ) \
3140 int result = sc_dt::cmp_scfx_rep( *a.get_rep(), *b.m_rep ); \
3144DEFN_REL_OP_T(op,ret,int) \
3145DEFN_REL_OP_T(op,ret,unsigned int) \
3146DEFN_REL_OP_T(op,ret,long) \
3147DEFN_REL_OP_T(op,ret,unsigned long) \
3148DEFN_REL_OP_T(op,ret,float) \
3149DEFN_REL_OP_T(op,ret,double) \
3150DEFN_REL_OP_T(op,ret,const char*) \
3151DEFN_REL_OP_T(op,ret,const sc_fxval_fast&) \
3152DEFN_REL_OP_T(op,ret,const sc_fxnum_fast&) \
3153DEFN_REL_OP_OTHER(op,ret)
3163#undef DEFN_REL_OP_OTHER
3171sc_fxnum::operator = (
const sc_fxnum& a )
3185sc_fxnum::operator = (
const sc_fxval& a )
3187 *m_rep = *a.get_rep();
3193#define DEFN_ASN_OP_T(tp) \
3196sc_fxnum::operator = ( tp a ) \
3198 sc_fxval tmp( a ); \
3199 *m_rep = *tmp.get_rep(); \
3201 SC_FXNUM_OBSERVER_WRITE_( *this ) \
3224#define DEFN_ASN_OP_T(op,fnc,tp) \
3227sc_fxnum::operator op ( tp b ) \
3229 SC_FXNUM_OBSERVER_READ_( *this ) \
3230 sc_fxval tmp( b ); \
3231 scfx_rep* new_rep = sc_dt::fnc ## _scfx_rep( *m_rep, *tmp.get_rep() ); \
3235 SC_FXNUM_OBSERVER_WRITE_( *this ) \
3239#define DEFN_ASN_OP_OTHER(op,fnc) \
3240DEFN_ASN_OP_T(op,fnc,int64) \
3241DEFN_ASN_OP_T(op,fnc,uint64) \
3242DEFN_ASN_OP_T(op,fnc,const sc_int_base&) \
3243DEFN_ASN_OP_T(op,fnc,const sc_uint_base&) \
3244DEFN_ASN_OP_T(op,fnc,const sc_signed&) \
3245DEFN_ASN_OP_T(op,fnc,const sc_unsigned&)
3247#define DEFN_ASN_OP(op,fnc) \
3250sc_fxnum::operator op ( const sc_fxnum& b ) \
3252 SC_FXNUM_OBSERVER_READ_( *this ) \
3253 SC_FXNUM_OBSERVER_READ_( b ) \
3254 scfx_rep* new_rep = sc_dt::fnc ## _scfx_rep( *m_rep, *b.m_rep ); \
3258 SC_FXNUM_OBSERVER_WRITE_( *this ) \
3264sc_fxnum::operator op ( const sc_fxval& b ) \
3266 SC_FXNUM_OBSERVER_READ_( *this ) \
3267 scfx_rep* new_rep = sc_dt::fnc ## _scfx_rep( *m_rep, *b.get_rep() ); \
3271 SC_FXNUM_OBSERVER_WRITE_( *this ) \
3275DEFN_ASN_OP_T(op,fnc,int) \
3276DEFN_ASN_OP_T(op,fnc,unsigned int) \
3277DEFN_ASN_OP_T(op,fnc,long) \
3278DEFN_ASN_OP_T(op,fnc,unsigned long) \
3279DEFN_ASN_OP_T(op,fnc,float) \
3280DEFN_ASN_OP_T(op,fnc,double) \
3281DEFN_ASN_OP_T(op,fnc,const char*) \
3282DEFN_ASN_OP_T(op,fnc,const sc_fxval_fast&) \
3283DEFN_ASN_OP_T(op,fnc,const sc_fxnum_fast&) \
3284DEFN_ASN_OP_OTHER(op,fnc)
3292#undef DEFN_ASN_OP_OTHER
3298sc_fxnum::operator <<= (
int b )
3309sc_fxnum::operator >>= (
int b )
3364 i - m_params.
fwl() );
3381 i - m_params.
fwl() );
3403 i - m_params.
fwl(), j - m_params.
fwl() );
3424 i - m_params.
fwl(), j - m_params.
fwl() );
3456 return this->
range( m_params.
wl() - 1, 0 );
3463 return this->
range( m_params.
wl() - 1, 0 );
3470sc_fxnum::operator double()
const
3484 return static_cast<short>( m_rep->
to_uint64() );
3492 return static_cast<unsigned short>( m_rep->
to_uint64() );
3500 return static_cast<int>( m_rep->
to_uint64() );
3516 return static_cast<unsigned int>( m_rep->
to_uint64() );
3532 return static_cast<long>( m_rep->
to_uint64() );
3540 return static_cast<unsigned long>( m_rep->
to_uint64() );
3548 return static_cast<float>( m_rep->
to_double() );
3617 return m_params.
wl();
3624 return m_params.
iwl();
3631 return m_params.
q_mode();
3638 return m_params.
o_mode();
3645 return m_params.
n_bits();
3690 return m_rep->
set( i, m_params );
3692 return m_rep->
clear( i, m_params );
3700 return m_rep->
get_slice( i, j, m_params, bv );
3707 return m_rep->
set_slice( i, j, m_params, bv );
3735sc_fxnum_fast_observer*
3750 m_params( type_params_, enc_, cast_sw ),
3753 m_observer( observer_ )
3766 m_params( type_params_, enc_, cast_sw ),
3769 m_observer( observer_ )
3778#define DEFN_CTOR_T(tp,arg) \
3780sc_fxnum_fast::sc_fxnum_fast( tp a, \
3781 const sc_fxtype_params& type_params_, \
3783 const sc_fxcast_switch& cast_sw, \
3784 sc_fxnum_fast_observer* observer_ ) \
3786 m_params( type_params_, enc_, cast_sw ), \
3787 m_q_flag( false ), \
3788 m_o_flag( false ), \
3789 m_observer( observer_ ) \
3791 SC_FXNUM_FAST_OBSERVER_DEFAULT_ \
3793 SC_FXNUM_FAST_OBSERVER_CONSTRUCT_(*this) \
3794 SC_FXNUM_FAST_OBSERVER_WRITE_( *this ) \
3797#define DEFN_CTOR_T_A(tp) DEFN_CTOR_T(tp,static_cast<double>( a ))
3798#define DEFN_CTOR_T_B(tp) DEFN_CTOR_T(tp,sc_fxval_fast::from_string( a ))
3799#define DEFN_CTOR_T_C(tp) DEFN_CTOR_T(tp,a.to_double())
3877 c.m_val = - a.m_val;
3885#define DEFN_BIN_OP_T(op,tp) \
3888operator op ( const sc_fxnum_fast& a, tp b ) \
3890 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
3891 sc_fxval_fast tmp( b ); \
3892 return sc_fxval_fast( a.m_val op tmp.get_val() ); \
3897operator op ( tp a, const sc_fxnum_fast& b ) \
3899 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
3900 sc_fxval_fast tmp( a ); \
3901 return sc_fxval_fast( tmp.get_val() op b.m_val ); \
3904#define DEFN_BIN_OP_OTHER(op) \
3905DEFN_BIN_OP_T(op,int64) \
3906DEFN_BIN_OP_T(op,uint64) \
3907DEFN_BIN_OP_T(op,const sc_int_base&) \
3908DEFN_BIN_OP_T(op,const sc_uint_base&) \
3909DEFN_BIN_OP_T(op,const sc_signed&) \
3910DEFN_BIN_OP_T(op,const sc_unsigned&)
3912#define DEFN_BIN_OP(op,dummy) \
3915operator op ( const sc_fxnum_fast& a, const sc_fxnum_fast& b ) \
3917 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
3918 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
3919 return sc_fxval_fast( a.m_val op b.m_val ); \
3924operator op ( const sc_fxnum_fast& a, const sc_fxval_fast& b ) \
3926 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
3927 return sc_fxval_fast( a.m_val op b.get_val() ); \
3932operator op ( const sc_fxval_fast& a, const sc_fxnum_fast& b ) \
3934 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
3935 return sc_fxval_fast( a.get_val() op b.m_val ); \
3938DEFN_BIN_OP_T(op,int) \
3939DEFN_BIN_OP_T(op,unsigned int) \
3940DEFN_BIN_OP_T(op,long) \
3941DEFN_BIN_OP_T(op,unsigned long) \
3942DEFN_BIN_OP_T(op,float) \
3943DEFN_BIN_OP_T(op,double) \
3944DEFN_BIN_OP_T(op,const char*) \
3945DEFN_BIN_OP_OTHER(op)
3992#undef DEFN_BIN_OP_OTHER
4015#define DEFN_BIN_FNC_T(fnc,op,tp) \
4018fnc ( sc_fxval_fast& c, const sc_fxnum_fast& a, tp b ) \
4020 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4021 sc_fxval_fast tmp( b ); \
4022 c.set_val( a.m_val op tmp.get_val() ); \
4027fnc ( sc_fxval_fast& c, tp a, const sc_fxnum_fast& b ) \
4029 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4030 sc_fxval_fast tmp( a ); \
4031 c.set_val( tmp.get_val() op b.m_val ); \
4036fnc ( sc_fxnum_fast& c, const sc_fxnum_fast& a, tp b ) \
4038 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4039 sc_fxval_fast tmp( b ); \
4040 c.m_val = a.m_val op tmp.get_val(); \
4042 SC_FXNUM_FAST_OBSERVER_WRITE_( c ) \
4047fnc ( sc_fxnum_fast& c, tp a, const sc_fxnum_fast& b ) \
4049 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4050 sc_fxval_fast tmp( a ); \
4051 c.m_val = tmp.get_val() op b.m_val; \
4053 SC_FXNUM_FAST_OBSERVER_WRITE_( c ) \
4056#define DEFN_BIN_FNC_OTHER(fnc,op) \
4057DEFN_BIN_FNC_T(fnc,op,int64) \
4058DEFN_BIN_FNC_T(fnc,op,uint64) \
4059DEFN_BIN_FNC_T(fnc,op,const sc_int_base&) \
4060DEFN_BIN_FNC_T(fnc,op,const sc_uint_base&) \
4061DEFN_BIN_FNC_T(fnc,op,const sc_signed&) \
4062DEFN_BIN_FNC_T(fnc,op,const sc_unsigned&)
4064#define DEFN_BIN_FNC(fnc,op) \
4067fnc ( sc_fxval_fast& c, const sc_fxnum_fast& a, const sc_fxnum_fast& b ) \
4069 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4070 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4071 c.set_val( a.m_val op b.m_val ); \
4076fnc ( sc_fxnum_fast& c, const sc_fxnum_fast& a, const sc_fxnum_fast& b ) \
4078 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4079 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4080 c.m_val = a.m_val op b.m_val; \
4082 SC_FXNUM_FAST_OBSERVER_WRITE_( c ) \
4087fnc ( sc_fxval_fast& c, const sc_fxnum_fast& a, const sc_fxval_fast& b ) \
4089 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4090 c.set_val( a.m_val op b.get_val() ); \
4095fnc ( sc_fxval_fast& c, const sc_fxval_fast& a, const sc_fxnum_fast& b ) \
4097 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4098 c.set_val( a.get_val() op b.m_val ); \
4103fnc ( sc_fxnum_fast& c, const sc_fxnum_fast& a, const sc_fxval_fast& b ) \
4105 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4106 c.m_val = a.m_val op b.get_val(); \
4108 SC_FXNUM_FAST_OBSERVER_WRITE_( c ) \
4113fnc ( sc_fxnum_fast& c, const sc_fxval_fast& a, const sc_fxnum_fast& b ) \
4115 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4116 c.m_val = a.get_val() op b.m_val; \
4118 SC_FXNUM_FAST_OBSERVER_WRITE_( c ) \
4121DEFN_BIN_FNC_T(fnc,op,int) \
4122DEFN_BIN_FNC_T(fnc,op,unsigned int) \
4123DEFN_BIN_FNC_T(fnc,op,long) \
4124DEFN_BIN_FNC_T(fnc,op,unsigned long) \
4125DEFN_BIN_FNC_T(fnc,op,float) \
4126DEFN_BIN_FNC_T(fnc,op,double) \
4127DEFN_BIN_FNC_T(fnc,op,const char*) \
4128DEFN_BIN_FNC_T(fnc,op,const sc_fxval&) \
4129DEFN_BIN_FNC_T(fnc,op,const sc_fxnum&) \
4130DEFN_BIN_FNC_OTHER(fnc,op)
4137#undef DEFN_BIN_FNC_T
4138#undef DEFN_BIN_FNC_OTHER
4181#define DEFN_REL_OP_T(op,tp) \
4184operator op ( const sc_fxnum_fast& a, tp b ) \
4186 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4187 sc_fxval_fast tmp( b ); \
4188 return ( a.m_val op tmp.get_val() ); \
4193operator op ( tp a, const sc_fxnum_fast& b ) \
4195 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4196 sc_fxval_fast tmp( a ); \
4197 return ( tmp.get_val() op b.m_val ); \
4200#define DEFN_REL_OP_OTHER(op) \
4201DEFN_REL_OP_T(op,int64) \
4202DEFN_REL_OP_T(op,uint64) \
4203DEFN_REL_OP_T(op,const sc_int_base&) \
4204DEFN_REL_OP_T(op,const sc_uint_base&) \
4205DEFN_REL_OP_T(op,const sc_signed&) \
4206DEFN_REL_OP_T(op,const sc_unsigned&)
4208#define DEFN_REL_OP(op) \
4211operator op ( const sc_fxnum_fast& a, const sc_fxnum_fast& b ) \
4213 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4214 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4215 return ( a.m_val op b.m_val ); \
4220operator op ( const sc_fxnum_fast& a, const sc_fxval_fast& b ) \
4222 SC_FXNUM_FAST_OBSERVER_READ_( a ) \
4223 return ( a.m_val op b.get_val() ); \
4228operator op ( const sc_fxval_fast& a, const sc_fxnum_fast& b ) \
4230 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4231 return ( a.get_val() op b.m_val ); \
4234DEFN_REL_OP_T(op,int) \
4235DEFN_REL_OP_T(op,unsigned int) \
4236DEFN_REL_OP_T(op,long) \
4237DEFN_REL_OP_T(op,unsigned long) \
4238DEFN_REL_OP_T(op,float) \
4239DEFN_REL_OP_T(op,double) \
4240DEFN_REL_OP_T(op,const char*) \
4241DEFN_REL_OP_OTHER(op)
4251#undef DEFN_REL_OP_OTHER
4259sc_fxnum_fast::operator = (
const sc_fxnum_fast& a )
4275 m_val = a.get_val();
4281#define DEFN_ASN_OP_T(tp) \
4284sc_fxnum_fast::operator = ( tp a ) \
4286 sc_fxval_fast tmp( a ); \
4287 m_val = tmp.get_val(); \
4289 SC_FXNUM_FAST_OBSERVER_WRITE_( *this ) \
4312#define DEFN_ASN_OP_T(op,tp) \
4315sc_fxnum_fast::operator op ( tp b ) \
4317 SC_FXNUM_FAST_OBSERVER_READ_( *this ) \
4318 sc_fxval_fast tmp( b ); \
4319 m_val op tmp.get_val(); \
4321 SC_FXNUM_FAST_OBSERVER_WRITE_( *this ) \
4325#define DEFN_ASN_OP_OTHER(op) \
4326DEFN_ASN_OP_T(op,int64) \
4327DEFN_ASN_OP_T(op,uint64) \
4328DEFN_ASN_OP_T(op,const sc_int_base&) \
4329DEFN_ASN_OP_T(op,const sc_uint_base&) \
4330DEFN_ASN_OP_T(op,const sc_signed&) \
4331DEFN_ASN_OP_T(op,const sc_unsigned&)
4333#define DEFN_ASN_OP(op) \
4336sc_fxnum_fast::operator op ( const sc_fxnum_fast& b ) \
4338 SC_FXNUM_FAST_OBSERVER_READ_( *this ) \
4339 SC_FXNUM_FAST_OBSERVER_READ_( b ) \
4342 SC_FXNUM_FAST_OBSERVER_WRITE_( *this ) \
4348sc_fxnum_fast::operator op ( const sc_fxval_fast& b ) \
4350 SC_FXNUM_FAST_OBSERVER_READ_( *this ) \
4351 m_val op b.get_val(); \
4353 SC_FXNUM_FAST_OBSERVER_WRITE_( *this ) \
4357DEFN_ASN_OP_T(op,int) \
4358DEFN_ASN_OP_T(op,unsigned int) \
4359DEFN_ASN_OP_T(op,long) \
4360DEFN_ASN_OP_T(op,unsigned long) \
4361DEFN_ASN_OP_T(op,float) \
4362DEFN_ASN_OP_T(op,double) \
4363DEFN_ASN_OP_T(op,const char*) \
4364DEFN_ASN_OP_T(op,const sc_fxval&) \
4365DEFN_ASN_OP_T(op,const sc_fxnum&) \
4366DEFN_ASN_OP_OTHER(op)
4374#undef DEFN_ASN_OP_OTHER
4380sc_fxnum_fast::operator <<= (
int b )
4391sc_fxnum_fast::operator >>= (
int b )
4460 i - m_params.
fwl() );
4477 i - m_params.
fwl() );
4499 i - m_params.
fwl(), j - m_params.
fwl() );
4510 i - m_params.
fwl(), j - m_params.
fwl() );
4521 i - m_params.
fwl(), j - m_params.
fwl() );
4532 i - m_params.
fwl(), j - m_params.
fwl() );
4553 return this->
range( m_params.
wl() - 1, 0 );
4560 return this->
range( m_params.
wl() - 1, 0 );
4567sc_fxnum_fast::operator double()
const
4581 return static_cast<short>(
to_uint64() );
4589 return static_cast<unsigned short>(
to_uint64() );
4613 return static_cast<unsigned int>(
to_uint64() );
4627 double mantissa_dbl = frexp(m_val, &exponent);
4632 if (!(-64 < exponent && exponent < 64))
4637 mantissa = exponent >= 0 ? mantissa << exponent : mantissa >> -exponent;
4638 return mantissa_dbl >= 0 ? mantissa : -mantissa;
4646 return static_cast<long>(
to_uint64() );
4654 return static_cast<unsigned long>(
to_uint64() );
4662 return static_cast<float>( m_val );
4682 return (
id.negative() != 0 );
4691 return id.is_zero();
4735 return m_params.
wl();
4742 return m_params.
iwl();
4749 return m_params.
q_mode();
4756 return m_params.
o_mode();
4763 return m_params.
n_bits();
4820: m_rep( new
scfx_rep( *a.get_rep() ) ),
4821 m_observer( observer_ )
4831: m_rep( new
scfx_rep( a.to_double() ) ),
4832 m_observer( observer_ )
4842#define DEFN_BIN_OP_T(op,fnc,tp) \
4845operator op ( const sc_fxval& a, tp b ) \
4847 SC_FXVAL_OBSERVER_READ_( a ) \
4848 sc_fxval tmp( b ); \
4849 return sc_fxval( sc_dt::fnc ## _scfx_rep( *a.m_rep, *tmp.m_rep ) ); \
4854operator op ( tp a, const sc_fxval& b ) \
4856 SC_FXVAL_OBSERVER_READ_( b ) \
4857 sc_fxval tmp( a ); \
4858 return sc_fxval( sc_dt::fnc ## _scfx_rep( *tmp.m_rep, *b.m_rep ) ); \
4861#define DEFN_BIN_OP(op,fnc) \
4862DEFN_BIN_OP_T(op,fnc,const sc_fxnum_fast&)
4876#define DEFN_BIN_FNC_T(fnc,tp) \
4879fnc ( sc_fxval& c, const sc_fxval& a, tp b ) \
4881 SC_FXVAL_OBSERVER_READ_( a ) \
4882 sc_fxval tmp( b ); \
4884 c.m_rep = sc_dt::fnc ## _scfx_rep( *a.m_rep, *tmp.m_rep ); \
4885 SC_FXVAL_OBSERVER_WRITE_( c ) \
4890fnc ( sc_fxval& c, tp a, const sc_fxval& b ) \
4892 SC_FXVAL_OBSERVER_READ_( b ) \
4893 sc_fxval tmp( a ); \
4895 c.m_rep = sc_dt::fnc ## _scfx_rep( *tmp.m_rep, *b.m_rep ); \
4896 SC_FXVAL_OBSERVER_WRITE_( c ) \
4899#define DEFN_BIN_FNC(fnc) \
4900DEFN_BIN_FNC_T(fnc,const sc_fxnum_fast&)
4907#undef DEFN_BIN_FNC_T
4913#define DEFN_REL_OP_T(op,ret,tp) \
4916operator op ( const sc_fxval& a, tp b ) \
4918 SC_FXVAL_OBSERVER_READ_( a ) \
4919 sc_fxval tmp( b ); \
4920 int result = sc_dt::cmp_scfx_rep( *a.m_rep, *tmp.m_rep ); \
4926operator op ( tp a, const sc_fxval& b ) \
4928 SC_FXVAL_OBSERVER_READ_( b ) \
4929 sc_fxval tmp( a ); \
4930 int result = sc_dt::cmp_scfx_rep( *tmp.m_rep, *b.m_rep ); \
4935#define DEFN_REL_OP(op,ret) \
4936DEFN_REL_OP_T(op,ret,const sc_fxnum_fast&)
4953sc_fxval::operator = (
const sc_fxnum& a )
4955 *m_rep = *a.get_rep();
4960#define DEFN_ASN_OP_T(tp) \
4963sc_fxval::operator = ( tp b ) \
4965 sc_fxval tmp( b ); \
4966 *m_rep = *tmp.m_rep; \
4967 SC_FXVAL_OBSERVER_WRITE_( *this ) \
4976#define DEFN_ASN_OP_T(op,fnc,tp) \
4979sc_fxval::operator op ( tp b ) \
4981 SC_FXVAL_OBSERVER_READ_( *this ) \
4982 sc_fxval tmp( b ); \
4983 scfx_rep* new_rep = sc_dt::fnc ## _scfx_rep( *m_rep, *tmp.m_rep ); \
4986 SC_FXVAL_OBSERVER_WRITE_( *this ) \
4990#define DEFN_ASN_OP(op,fnc) \
4993sc_fxval::operator op ( const sc_fxnum& b ) \
4995 SC_FXVAL_OBSERVER_READ_( *this ) \
4996 scfx_rep* new_rep = sc_dt::fnc ## _scfx_rep( *m_rep, *b.get_rep() ); \
4999 SC_FXVAL_OBSERVER_WRITE_( *this ) \
5003DEFN_ASN_OP_T(op,fnc,const sc_fxnum_fast&)
5025: m_val( a.to_double() ),
5026 m_observer( observer_ )
5036: m_val( a.get_val() ),
5037 m_observer( observer_ )
5047#define DEFN_BIN_FNC_T(fnc,op,tp) \
5050fnc ( sc_fxval_fast& c, const sc_fxval_fast& a, tp b ) \
5052 SC_FXVAL_FAST_OBSERVER_READ_( a ) \
5053 sc_fxval_fast tmp( b ); \
5054 c.m_val = a.m_val op tmp.m_val; \
5055 SC_FXVAL_FAST_OBSERVER_WRITE_( c ) \
5060fnc ( sc_fxval_fast& c, tp a, const sc_fxval_fast& b ) \
5062 SC_FXVAL_FAST_OBSERVER_READ_( b ) \
5063 sc_fxval_fast tmp( a ); \
5064 c.m_val = tmp.m_val op b.m_val; \
5065 SC_FXVAL_FAST_OBSERVER_WRITE_( c ) \
5068#define DEFN_BIN_FNC(fnc,op) \
5069DEFN_BIN_FNC_T(fnc,op,const sc_fxval&) \
5070DEFN_BIN_FNC_T(fnc,op,const sc_fxnum&)
5077#undef DEFN_BIN_FNC_T
5085sc_fxval_fast::operator = (
const sc_fxnum_fast& a )
5087 m_val = a.get_val();
5092#define DEFN_ASN_OP_T(tp) \
5095sc_fxval_fast::operator = ( tp a ) \
5097 sc_fxval_fast tmp( a ); \
5098 m_val = tmp.m_val; \
5099 SC_FXVAL_FAST_OBSERVER_WRITE_( *this ) \
5108#define DEFN_ASN_OP_T(op,tp) \
5111sc_fxval_fast::operator op ( tp b ) \
5113 SC_FXVAL_FAST_OBSERVER_READ_( *this ) \
5114 sc_fxval_fast tmp( b ); \
5115 m_val op tmp.m_val; \
5116 SC_FXVAL_FAST_OBSERVER_WRITE_( *this ) \
5120#define DEFN_ASN_OP(op) \
5123sc_fxval_fast::operator op ( const sc_fxnum_fast& b ) \
5125 SC_FXVAL_FAST_OBSERVER_READ_( *this ) \
5126 m_val op b.get_val(); \
5127 SC_FXVAL_FAST_OBSERVER_WRITE_( *this ) \
5131DEFN_ASN_OP_T(op,const sc_fxnum&)
#define SC_ERROR_IF_(cnd, id)
#define DECL_BIN_FNC(fnc)
#define DECL_BIN_OP_T(op, tp)
#define DEFN_BIN_FNC(fnc)
#define DEFN_RED_FNC(fnc)
#define DEFN_BIN_OP(op, fnc)
#define DEFN_CTOR_T_B(tp)
#define DEFN_CTOR_T_C(tp)
#define DEFN_CTOR_T_A(tp)
#define DEFN_CTOR_T_D(tp)
#define DEFN_ASN_OP_T(tp)
#define DECL_ASN_OP_A(op)
#define DECL_ASN_OP_T(op, tp)
#define DECL_BIN_OP(op, dummy)
#define SC_FXNUM_OBSERVER_WRITE_(object)
#define SC_FXNUM_OBSERVER_DEFAULT_
#define SC_FXNUM_OBSERVER_READ_(object)
#define SC_FXNUM_FAST_OBSERVER_DESTRUCT_(object)
#define SC_FXNUM_OBSERVER_CONSTRUCT_(object)
#define SC_FXNUM_OBSERVER_DESTRUCT_(object)
#define SC_FXNUM_FAST_OBSERVER_CONSTRUCT_(object)
#define SC_FXNUM_FAST_OBSERVER_WRITE_(object)
#define SC_FXNUM_FAST_OBSERVER_READ_(object)
#define SC_FXNUM_FAST_OBSERVER_DEFAULT_
#define SC_FXVAL_OBSERVER_DEFAULT_
#define SC_FXVAL_OBSERVER_WRITE_(object)
#define SC_FXVAL_FAST_OBSERVER_CONSTRUCT_(object)
#define SC_FXVAL_FAST_OBSERVER_DEFAULT_
#define SC_FXVAL_FAST_OBSERVER_WRITE_(object)
#define SC_FXVAL_OBSERVER_CONSTRUCT_(object)
const char SC_ID_INVALID_FX_VALUE_[]
const char SC_ID_OUT_OF_RANGE_[]
void neg(sc_fxval &c, const sc_fxnum &a)
SC_API scfx_rep * neg_scfx_rep(const scfx_rep &)
X & operator|=(sc_proxy< X > &px, const sc_proxy< Y > &py)
sc_proxy< X >::value_type or_reduce(const sc_proxy< X > &a)
sc_proxy< X >::value_type xor_reduce(const sc_proxy< X > &a)
const sc_big_op_info< WL, true, WR, true >::add_result operator+(const sc_bigint< WL > &left, const sc_bigint< WR > &right)
sc_fxval operator/(const sc_fxnum &a, const sc_fxnum &b)
X & operator^=(sc_proxy< X > &px, const sc_proxy< Y > &py)
unsigned long long uint64
const T sc_min(const T &a, const T &b)
const sc_big_op_info< WL, true, WR, true >::sub_result operator-(const sc_bigint< WL > &left, const sc_bigint< WR > &right)
SC_API scfx_rep * div_scfx_rep(const scfx_rep &, const scfx_rep &, int max_wl=SC_DEFAULT_DIV_WL_)
void rshift(sc_fxval &c, const sc_fxnum &a, int b)
sc_proxy< X >::value_type nor_reduce(const sc_proxy< X > &a)
SC_API std::string to_string(sc_enc)
void lshift(sc_fxval &c, const sc_fxnum &a, int b)
const T sc_max(const T &a, const T &b)
SC_API scfx_rep * lsh_scfx_rep(const scfx_rep &, int)
double scfx_pow2(int exp)
X & operator&=(sc_proxy< X > &px, const sc_proxy< Y > &py)
DEFN_BIN_OP_T(/, div, int64) DEFN_BIN_OP_T(/
inline::std::istream & operator>>(::std::istream &is, sc_bit &a)
sc_proxy< X >::value_type and_reduce(const sc_proxy< X > &a)
SC_API scfx_rep * rsh_scfx_rep(const scfx_rep &, int)
inline::std::ostream & operator<<(::std::ostream &os, const sc_bit &a)
uint64 const sc_uint_base int b
sc_proxy< X >::value_type xnor_reduce(const sc_proxy< X > &a)
sc_proxy< X >::value_type nand_reduce(const sc_proxy< X > &a)
constexpr uint64 UINT64_ONE
sc_core::sc_signal_in_if< T > & value(const T &val)
std::string to_string() const
unsigned int to_uint() const
unsigned long to_ulong() const
void print(::std::ostream &=::std::cout) const
sc_fxnum_bitref_r(sc_fxnum &, int)
void dump(::std::ostream &=::std::cout) const
friend class sc_fxnum_fast_bitref
void scan(::std::istream &=::std::cin)
sc_fxnum_fast_bitref_r(sc_fxnum_fast &, int)
void print(::std::ostream &=::std::cout) const
void dump(::std::ostream &=::std::cout) const
friend class sc_fxnum_bitref
void scan(::std::istream &=::std::cin)
void dump(::std::ostream &=::std::cout) const
unsigned int to_uint() const
sc_fxnum_subref_r(sc_fxnum &, int, int)
unsigned long to_ulong() const
std::string to_string() const
void print(::std::ostream &=::std::cout) const
void scan(::std::istream &=::std::cin)
void dump(::std::ostream &=::std::cout) const
unsigned long to_ulong() const
std::string to_string() const
sc_fxnum_fast_subref_r(sc_fxnum_fast &, int, int)
unsigned int to_uint() const
void print(::std::ostream &=::std::cout) const
~sc_fxnum_fast_subref_r()
void scan(::std::istream &=::std::cin)
const sc_fxcast_switch & cast_switch() const
friend class sc_fxnum_bitref_r
sc_fxval operator-() const
std::string to_string(sc_numrep, bool) const
std::string to_string(sc_numrep, sc_fmt) const
void dump(::std::ostream &=::std::cout) const
void unlock_observer(sc_fxnum_observer *) const
std::string to_dec() const
bool get_slice(int, int, sc_bv_base &) const
bool set_slice(int, int, const sc_bv_base &)
void print(::std::ostream &=::std::cout) const
std::string to_oct() const
sc_fxnum_observer * lock_observer() const
std::string to_string(sc_fmt) const
friend class sc_fxnum_subref
std::string to_hex() const
void observer_read() const
void scan(::std::istream &=::std::cin)
const sc_fxtype_params & type_params() const
unsigned int to_uint() const
sc_fxnum(const sc_fxtype_params &, sc_enc, const sc_fxcast_switch &, sc_fxnum_observer *)
sc_fxval operator+() const
friend class sc_fxnum_subref_r
std::string to_string(sc_numrep) const
sc_fxnum_subref_r operator()() const
std::string to_string(sc_numrep, bool, sc_fmt) const
sc_fxnum_subref_r range() const
bool quantization_flag() const
bool overflow_flag() const
unsigned long to_ulong() const
unsigned short to_ushort() const
friend sc_fxval operator>>(const sc_fxnum &, int)
sc_fxnum_bitref_r operator[](int) const
sc_fxnum_observer * observer() const
sc_fxnum_bitref_r bit(int) const
const scfx_rep * get_rep() const
friend void lshift(sc_fxval &, const sc_fxnum &, int)
std::string to_bin() const
friend void rshift(sc_fxval &, const sc_fxnum &, int)
friend sc_fxval operator<<(const sc_fxnum &, int)
std::string to_string() const
friend class sc_fxnum_bitref
std::string to_string(sc_numrep, sc_fmt) const
sc_fxnum_fast & operator--()
sc_fxnum_fast_subref_r range() const
std::string to_string() const
friend class sc_fxnum_fast_bitref_r
friend void lshift(sc_fxval_fast &, const sc_fxnum_fast &, int)
void unlock_observer(sc_fxnum_fast_observer *) const
std::string to_string(sc_numrep) const
friend class sc_fxnum_fast_subref_r
sc_fxnum_fast & operator++()
sc_fxnum_fast_bitref_r bit(int) const
friend class sc_fxnum_fast_subref
friend sc_fxval_fast operator>>(const sc_fxnum_fast &, int)
const sc_fxtype_params & type_params() const
sc_fxval_fast operator+() const
bool set_slice(int, int, const sc_bv_base &)
sc_fxnum_fast_subref_r operator()() const
unsigned short to_ushort() const
sc_fxval_fast operator-() const
std::string to_string(sc_numrep, bool) const
friend void neg(sc_fxval_fast &, const sc_fxnum_fast &)
friend sc_fxval_fast operator/(const sc_fxnum_fast &, const sc_fxnum_fast &)
const sc_fxcast_switch & cast_switch() const
void dump(::std::ostream &=::std::cout) const
void print(::std::ostream &=::std::cout) const
std::string to_oct() const
friend class sc_fxval_fast
void observer_read() const
void scan(::std::istream &=::std::cin)
bool quantization_flag() const
sc_fxnum_fast_bitref_r operator[](int) const
friend void rshift(sc_fxval_fast &, const sc_fxnum_fast &, int)
std::string to_bin() const
std::string to_string(sc_numrep, bool, sc_fmt) const
sc_fxnum_fast(const sc_fxtype_params &, sc_enc, const sc_fxcast_switch &, sc_fxnum_fast_observer *)
friend class sc_fxnum_fast_bitref
std::string to_hex() const
std::string to_string(sc_fmt) const
sc_fxnum_fast_observer * lock_observer() const
bool overflow_flag() const
bool get_slice(int, int, sc_bv_base &) const
unsigned long to_ulong() const
sc_fxnum_fast_observer * observer() const
std::string to_dec() const
unsigned int to_uint() const
sc_fxval_fast value() const
const scfx_rep * get_rep() const
sc_fxval_fast(sc_fxval_fast_observer *=0)
const sc_fxcast_switch & cast_switch() const
const sc_fxtype_params & type_params() const
void cast(const scfx_params &, bool &, bool &)
bool set(int, const scfx_params &)
bool set_slice(int, int, const scfx_params &, const sc_bv_base &)
bool get_slice(int, int, const scfx_params &, sc_bv_base &) const
bool clear(int, const scfx_params &)