110 #define DECL_CTORS_T(tp)                                                      \ 
  113                       sc_fxnum_observer* = 0 );                               \ 
  115                       sc_q_mode, sc_o_mode,                                   \ 
  116                       sc_fxnum_observer* = 0 );                               \ 
  118                       sc_q_mode, sc_o_mode, int,                              \ 
  119                       sc_fxnum_observer* = 0 );                               \ 
  121                       int, int, sc_q_mode, sc_o_mode,                         \ 
  122                       sc_fxnum_observer* = 0 );                               \ 
  124                       int, int, sc_q_mode, sc_o_mode, int,                    \ 
  125                       sc_fxnum_observer* = 0 );                               \ 
  127                       const sc_fxcast_switch&,                                \ 
  128                       sc_fxnum_observer* = 0 );                               \ 
  131                       const sc_fxcast_switch&,                                \ 
  132                       sc_fxnum_observer* = 0 );                               \ 
  134                       sc_q_mode, sc_o_mode,                                   \ 
  135                       const sc_fxcast_switch&,                                \ 
  136                       sc_fxnum_observer* = 0 );                               \ 
  138                       sc_q_mode, sc_o_mode, int,                              \ 
  139                       const sc_fxcast_switch&,                                \ 
  140                       sc_fxnum_observer* = 0 );                               \ 
  142                       int, int, sc_q_mode, sc_o_mode,                         \ 
  143                       const sc_fxcast_switch&,                                \ 
  144                       sc_fxnum_observer* = 0 );                               \ 
  146                       int, int, sc_q_mode, sc_o_mode, int,                    \ 
  147                       const sc_fxcast_switch&,                                \ 
  148                       sc_fxnum_observer* = 0 );                               \ 
  150                       const sc_fxtype_params&,                                \ 
  151                       sc_fxnum_observer* = 0 );                               \ 
  153                       const sc_fxtype_params&,                                \ 
  154                       const sc_fxcast_switch&,                                \ 
  155                       sc_fxnum_observer* = 0 ); 
  157 #define DECL_CTORS_T_A(tp)                                                    \ 
  159                       sc_fxnum_observer* = 0 );                               \ 
  162 #define DECL_CTORS_T_B(tp)                                                    \ 
  163     explicit sc_ufix( tp,                                                     \ 
  164                       sc_fxnum_observer* = 0 );                               \ 
  178 #ifndef SC_FX_EXCLUDE_OTHER 
  188 #undef DECL_CTORS_T_A 
  189 #undef DECL_CTORS_T_B 
  203     friend void b_not( sc_ufix&, 
const sc_ufix& );
 
  208     friend const sc_ufix 
operator & ( 
const sc_ufix&, 
const sc_ufix& );
 
  211     friend const sc_ufix 
operator | ( 
const sc_ufix&, 
const sc_ufix& );
 
  214     friend const sc_ufix 
operator ^ ( 
const sc_ufix&, 
const sc_ufix& );
 
  221     friend void b_and( sc_ufix&, 
const sc_ufix&, 
const sc_ufix& );
 
  224     friend void b_or ( sc_ufix&, 
const sc_ufix&, 
const sc_ufix& );
 
  227     friend void b_xor( sc_ufix&, 
const sc_ufix&, 
const sc_ufix& );
 
  236 #define DECL_ASN_OP_T(op,tp)                                                  \ 
  237     sc_ufix& operator op ( tp ); 
  239 #ifndef SC_FX_EXCLUDE_OTHER 
  240 #define DECL_ASN_OP_OTHER(op)                                                 \ 
  241     DECL_ASN_OP_T(op,int64)                                                   \ 
  242     DECL_ASN_OP_T(op,uint64)                                                  \ 
  243     DECL_ASN_OP_T(op,const sc_int_base&)                                      \ 
  244     DECL_ASN_OP_T(op,const sc_uint_base&)                                     \ 
  245     DECL_ASN_OP_T(op,const sc_signed&)                                        \ 
  246     DECL_ASN_OP_T(op,const sc_unsigned&) 
  248 #define DECL_ASN_OP_OTHER(op) 
  251 #define DECL_ASN_OP(op)                                                       \ 
  252     DECL_ASN_OP_T(op,int)                                                     \ 
  253     DECL_ASN_OP_T(op,unsigned int)                                            \ 
  254     DECL_ASN_OP_T(op,long)                                                    \ 
  255     DECL_ASN_OP_T(op,unsigned long)                                           \ 
  256     DECL_ASN_OP_T(op,float)                                                  \ 
  257     DECL_ASN_OP_T(op,double)                                                  \ 
  258     DECL_ASN_OP_T(op,const char*)                                             \ 
  259     DECL_ASN_OP_T(op,const sc_fxval&)                                         \ 
  260     DECL_ASN_OP_T(op,const sc_fxval_fast&)                                    \ 
  261     DECL_ASN_OP_T(op,const sc_fxnum&)                                         \ 
  262     DECL_ASN_OP_T(op,const sc_fxnum_fast&)                                    \ 
  263     DECL_ASN_OP_OTHER(op) 
  283 #undef DECL_ASN_OP_OTHER 
  345 #define DECL_CTORS_T(tp)                                                      \ 
  348                            sc_fxnum_fast_observer* = 0 );                     \ 
  350                            sc_q_mode, sc_o_mode,                              \ 
  351                            sc_fxnum_fast_observer* = 0 );                     \ 
  353                            sc_q_mode, sc_o_mode, int,                         \ 
  354                            sc_fxnum_fast_observer* = 0 );                     \ 
  356                            int, int, sc_q_mode, sc_o_mode,                    \ 
  357                            sc_fxnum_fast_observer* = 0 );                     \ 
  359                            int, int, sc_q_mode, sc_o_mode, int,               \ 
  360                            sc_fxnum_fast_observer* = 0 );                     \ 
  362                            const sc_fxcast_switch&,                           \ 
  363                            sc_fxnum_fast_observer* = 0 );                     \ 
  366                            const sc_fxcast_switch&,                           \ 
  367                            sc_fxnum_fast_observer* = 0 );                     \ 
  369                            sc_q_mode, sc_o_mode,                              \ 
  370                            const sc_fxcast_switch&,                           \ 
  371                            sc_fxnum_fast_observer* = 0 );                     \ 
  373                            sc_q_mode, sc_o_mode, int,                         \ 
  374                            const sc_fxcast_switch&,                           \ 
  375                            sc_fxnum_fast_observer* = 0 );                     \ 
  377                            int, int, sc_q_mode, sc_o_mode,                    \ 
  378                            const sc_fxcast_switch&,                           \ 
  379                            sc_fxnum_fast_observer* = 0 );                     \ 
  381                            int, int, sc_q_mode, sc_o_mode, int,               \ 
  382                            const sc_fxcast_switch&,                           \ 
  383                            sc_fxnum_fast_observer* = 0 );                     \ 
  385                            const sc_fxtype_params&,                           \ 
  386                            sc_fxnum_fast_observer* = 0 );                     \ 
  388                            const sc_fxtype_params&,                           \ 
  389                            const sc_fxcast_switch&,                           \ 
  390                            sc_fxnum_fast_observer* = 0 ); 
  392 #define DECL_CTORS_T_A(tp)                                                    \ 
  394                            sc_fxnum_fast_observer* = 0 );                     \ 
  397 #define DECL_CTORS_T_B(tp)                                                    \ 
  398     explicit sc_ufix_fast( tp,                                                \ 
  399                            sc_fxnum_fast_observer* = 0 );                     \ 
  413 #ifndef SC_FX_EXCLUDE_OTHER 
  423 #undef DECL_CTORS_T_A 
  424 #undef DECL_CTORS_T_B 
  465 #define DECL_ASN_OP_T(op,tp)                                                  \ 
  466     sc_ufix_fast& operator op ( tp ); 
  468 #ifndef SC_FX_EXCLUDE_OTHER 
  469 #define DECL_ASN_OP_OTHER(op)                                                 \ 
  470     DECL_ASN_OP_T(op,int64)                                                   \ 
  471     DECL_ASN_OP_T(op,uint64)                                                  \ 
  472     DECL_ASN_OP_T(op,const sc_int_base&)                                      \ 
  473     DECL_ASN_OP_T(op,const sc_uint_base&)                                     \ 
  474     DECL_ASN_OP_T(op,const sc_signed&)                                        \ 
  475     DECL_ASN_OP_T(op,const sc_unsigned&) 
  477 #define DECL_ASN_OP_OTHER(op) 
  480 #define DECL_ASN_OP(op)                                                       \ 
  481     DECL_ASN_OP_T(op,int)                                                     \ 
  482     DECL_ASN_OP_T(op,unsigned int)                                            \ 
  483     DECL_ASN_OP_T(op,long)                                                    \ 
  484     DECL_ASN_OP_T(op,unsigned long)                                           \ 
  485     DECL_ASN_OP_T(op,float)                                                  \ 
  486     DECL_ASN_OP_T(op,double)                                                  \ 
  487     DECL_ASN_OP_T(op,const char*)                                             \ 
  488     DECL_ASN_OP_T(op,const sc_fxval&)                                         \ 
  489     DECL_ASN_OP_T(op,const sc_fxval_fast&)                                    \ 
  490     DECL_ASN_OP_T(op,const sc_fxnum&)                                         \ 
  491     DECL_ASN_OP_T(op,const sc_fxnum_fast&)                                    \ 
  492     DECL_ASN_OP_OTHER(op) 
  502     DECL_ASN_OP_T(>>=,
int)
 
  504     DECL_ASN_OP_T(&=,const sc_ufix&)
 
  506     DECL_ASN_OP_T(|=,const sc_ufix&)
 
  508     DECL_ASN_OP_T(^=,const sc_ufix&)
 
  512 #undef DECL_ASN_OP_OTHER 
  668 #define DEFN_CTORS_T_A(tp)                                                    \ 
  670 sc_ufix::sc_ufix( tp a,                                                       \ 
  671                   sc_fxnum_observer* observer_ )                              \ 
  673             sc_fxtype_params(),                                               \ 
  675             sc_fxcast_switch(),                                               \ 
  680 sc_ufix::sc_ufix( tp a,                                                       \ 
  682                   sc_fxnum_observer* observer_ )                              \ 
  684             sc_fxtype_params( wl_, iwl_ ),                                    \ 
  686             sc_fxcast_switch(),                                               \ 
  691 sc_ufix::sc_ufix( tp a,                                                       \ 
  692                   sc_q_mode qm, sc_o_mode om,                                 \ 
  693                   sc_fxnum_observer* observer_ )                              \ 
  695             sc_fxtype_params( qm, om ),                                       \ 
  697             sc_fxcast_switch(),                                               \ 
  702 sc_ufix::sc_ufix( tp a,                                                       \ 
  703                   sc_q_mode qm, sc_o_mode om, int nb,                         \ 
  704                   sc_fxnum_observer* observer_ )                              \ 
  706             sc_fxtype_params( qm, om, nb ),                                   \ 
  708             sc_fxcast_switch(),                                               \ 
  713 sc_ufix::sc_ufix( tp a,                                                       \ 
  714                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,              \ 
  715                   sc_fxnum_observer* observer_ )                              \ 
  717             sc_fxtype_params( wl_, iwl_, qm, om ),                            \ 
  719             sc_fxcast_switch(),                                               \ 
  724 sc_ufix::sc_ufix( tp a,                                                       \ 
  725                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om, int nb,      \ 
  726                   sc_fxnum_observer* observer_ )                              \ 
  728             sc_fxtype_params( wl_, iwl_, qm, om, nb ),                        \ 
  730             sc_fxcast_switch(),                                               \ 
  735 sc_ufix::sc_ufix( tp a,                                                       \ 
  736                   const sc_fxcast_switch& cast_sw,                            \ 
  737                   sc_fxnum_observer* observer_ )                              \ 
  739             sc_fxtype_params(),                                               \ 
  746 sc_ufix::sc_ufix( tp a,                                                       \ 
  748                   const sc_fxcast_switch& cast_sw,                            \ 
  749                   sc_fxnum_observer* observer_ )                              \ 
  751             sc_fxtype_params( wl_, iwl_ ),                                    \ 
  758 sc_ufix::sc_ufix( tp a,                                                       \ 
  759                   sc_q_mode qm, sc_o_mode om,                                 \ 
  760                   const sc_fxcast_switch& cast_sw,                            \ 
  761                   sc_fxnum_observer* observer_ )                              \ 
  763             sc_fxtype_params( qm, om ),                                       \ 
  770 sc_ufix::sc_ufix( tp a,                                                       \ 
  771                   sc_q_mode qm, sc_o_mode om, int nb,                         \ 
  772                   const sc_fxcast_switch& cast_sw,                            \ 
  773                   sc_fxnum_observer* observer_ )                              \ 
  775             sc_fxtype_params( qm, om, nb ),                                   \ 
  782 sc_ufix::sc_ufix( tp a,                                                       \ 
  783                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,              \ 
  784                   const sc_fxcast_switch& cast_sw,                            \ 
  785                   sc_fxnum_observer* observer_ )                              \ 
  787             sc_fxtype_params( wl_, iwl_, qm, om ),                            \ 
  794 sc_ufix::sc_ufix( tp a,                                                       \ 
  795                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om, int nb,      \ 
  796                   const sc_fxcast_switch& cast_sw,                            \ 
  797                   sc_fxnum_observer* observer_ )                              \ 
  799             sc_fxtype_params( wl_, iwl_, qm, om, nb ),                        \ 
  806 sc_ufix::sc_ufix( tp a,                                                       \ 
  807                   const sc_fxtype_params& type_params,                        \ 
  808                   sc_fxnum_observer* observer_ )                              \ 
  812             sc_fxcast_switch(),                                               \ 
  817 sc_ufix::sc_ufix( tp a,                                                       \ 
  818                   const sc_fxtype_params& type_params,                        \ 
  819                   const sc_fxcast_switch& cast_sw,                            \ 
  820                   sc_fxnum_observer* observer_ )                              \ 
  828 #define DEFN_CTORS_T_B(tp)                                                    \ 
  830 sc_ufix::sc_ufix( tp a,                                                       \ 
  831                   sc_fxnum_observer* observer_ )                              \ 
  835             sc_fxcast_switch(),                                               \ 
  840 sc_ufix::sc_ufix( tp a,                                                       \ 
  842                   sc_fxnum_observer* observer_ )                              \ 
  844             sc_fxtype_params( a.type_params(), wl_, iwl_ ),                   \ 
  846             sc_fxcast_switch(),                                               \ 
  851 sc_ufix::sc_ufix( tp a,                                                       \ 
  852                   sc_q_mode qm, sc_o_mode om,                                 \ 
  853                   sc_fxnum_observer* observer_ )                              \ 
  855             sc_fxtype_params( a.type_params(), qm, om ),                      \ 
  857             sc_fxcast_switch(),                                               \ 
  862 sc_ufix::sc_ufix( tp a,                                                       \ 
  863                   sc_q_mode qm, sc_o_mode om, int nb,                         \ 
  864                   sc_fxnum_observer* observer_ )                              \ 
  866             sc_fxtype_params( a.type_params(), qm, om, nb ),                  \ 
  868             sc_fxcast_switch(),                                               \ 
  873 sc_ufix::sc_ufix( tp a,                                                       \ 
  874                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,              \ 
  875                   sc_fxnum_observer* observer_ )                              \ 
  877             sc_fxtype_params( wl_, iwl_, qm, om ),                            \ 
  879             sc_fxcast_switch(),                                               \ 
  884 sc_ufix::sc_ufix( tp a,                                                       \ 
  885                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om, int nb,      \ 
  886                   sc_fxnum_observer* observer_ )                              \ 
  888             sc_fxtype_params( wl_, iwl_, qm, om, nb ),                        \ 
  890             sc_fxcast_switch(),                                               \ 
  895 sc_ufix::sc_ufix( tp a,                                                       \ 
  896                   const sc_fxcast_switch& cast_sw,                            \ 
  897                   sc_fxnum_observer* observer_ )                              \ 
  906 sc_ufix::sc_ufix( tp a,                                                       \ 
  908                   const sc_fxcast_switch& cast_sw,                            \ 
  909                   sc_fxnum_observer* observer_ )                              \ 
  911             sc_fxtype_params( a.type_params(), wl_, iwl_ ),                   \ 
  918 sc_ufix::sc_ufix( tp a,                                                       \ 
  919                   sc_q_mode qm, sc_o_mode om,                                 \ 
  920                   const sc_fxcast_switch& cast_sw,                            \ 
  921                   sc_fxnum_observer* observer_ )                              \ 
  923             sc_fxtype_params( a.type_params(), qm, om ),                      \ 
  930 sc_ufix::sc_ufix( tp a,                                                       \ 
  931                   sc_q_mode qm, sc_o_mode om, int nb,                         \ 
  932                   const sc_fxcast_switch& cast_sw,                            \ 
  933                   sc_fxnum_observer* observer_ )                              \ 
  935             sc_fxtype_params( a.type_params(), qm, om, nb ),                  \ 
  942 sc_ufix::sc_ufix( tp a,                                                       \ 
  943                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,              \ 
  944                   const sc_fxcast_switch& cast_sw,                            \ 
  945                   sc_fxnum_observer* observer_ )                              \ 
  947             sc_fxtype_params( wl_, iwl_, qm, om ),                            \ 
  954 sc_ufix::sc_ufix( tp a,                                                       \ 
  955                   int wl_, int iwl_, sc_q_mode qm, sc_o_mode om, int nb,      \ 
  956                   const sc_fxcast_switch& cast_sw,                            \ 
  957                   sc_fxnum_observer* observer_ )                              \ 
  959             sc_fxtype_params( wl_, iwl_, qm, om, nb ),                        \ 
  966 sc_ufix::sc_ufix( tp a,                                                       \ 
  967                   const sc_fxtype_params& type_params,                        \ 
  968                   sc_fxnum_observer* observer_ )                              \ 
  972             sc_fxcast_switch(),                                               \ 
  977 sc_ufix::sc_ufix( tp a,                                                       \ 
  978                   const sc_fxtype_params& type_params,                        \ 
  979                   const sc_fxcast_switch& cast_sw,                            \ 
  980                   sc_fxnum_observer* observer_ )                              \ 
  999 #ifndef SC_FX_EXCLUDE_OTHER 
 1008 #undef DEFN_CTORS_T_A 
 1009 #undef DEFN_CTORS_T_B 
 1033     for( 
int i = iwl_c - wl_c; i < iwl_c; ++ i )
 
 1035     return sc_ufix( c, wl_c, iwl_c );
 
 1046     int iwl_c = c.
iwl();
 
 1047     for( 
int i = iwl_c - c.
wl(); i < iwl_c; ++ i )
 
 1056 #define DEFN_BIN_OP_T(op,op2,tp1,tp2)                                         \ 
 1059 operator op ( const tp1& a, const tp2& b )                                    \ 
 1061     a.observer_read();                                                        \ 
 1062     b.observer_read();                                                        \ 
 1063     int iwl_a = a.iwl();                                                      \ 
 1064     int iwl_b = b.iwl();                                                      \ 
 1065     int iwl_c = sc_max( iwl_a, iwl_b );                                       \ 
 1066     int fwl_c = sc_max( a.wl() - iwl_a, b.wl() - iwl_b );                     \ 
 1067     sc_ufix c( iwl_c + fwl_c, iwl_c );                                        \ 
 1068     for( int i = -fwl_c; i < iwl_c; ++ i )                                    \ 
 1069         c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) );                    \ 
 1070     return sc_ufix( c, iwl_c + fwl_c, iwl_c );                                \ 
 1075 DEFN_BIN_OP_T(&,&&,sc_ufix_fast,sc_ufix)
 
 1077 DEFN_BIN_OP_T(|,||,sc_ufix,sc_ufix)
 
 1078 DEFN_BIN_OP_T(|,||,sc_ufix,sc_ufix_fast)
 
 1079 DEFN_BIN_OP_T(|,||,sc_ufix_fast,sc_ufix)
 
 1081 DEFN_BIN_OP_T(^,!=,sc_ufix,sc_ufix)
 
 1082 DEFN_BIN_OP_T(^,!=,sc_ufix,sc_ufix_fast)
 
 1083 DEFN_BIN_OP_T(^,!=,sc_ufix_fast,sc_ufix)
 
 1085 #undef DEFN_BIN_OP_T 
 1090 #define DEFN_BIN_FNC_T(fnc,op2,tp1,tp2)                                       \ 
 1093 fnc ( sc_ufix& c, const tp1& a, const tp2& b )                                \ 
 1095     a.observer_read();                                                        \ 
 1096     b.observer_read();                                                        \ 
 1097     int iwl_c = c.iwl();                                                      \ 
 1098     for( int i = iwl_c - c.wl(); i < iwl_c; ++ i )                            \ 
 1099         c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) );                    \ 
 1101     SC_FXNUM_OBSERVER_WRITE_( c )                                             \ 
 1116 #undef DEFN_BIN_FNC_T 
 1125     sc_fxnum::operator = ( a );
 
 1129 #define DEFN_ASN_OP_T(op,tp)                                                  \ 
 1132 sc_ufix::operator op ( tp a )                                                 \ 
 1134     sc_fxnum::operator op( a );                                               \ 
 1138 #ifndef SC_FX_EXCLUDE_OTHER 
 1139 #define DEFN_ASN_OP_OTHER(op)                                                 \ 
 1140 DEFN_ASN_OP_T(op,int64)                                                       \ 
 1141 DEFN_ASN_OP_T(op,uint64)                                                      \ 
 1142 DEFN_ASN_OP_T(op,const sc_int_base&)                                          \ 
 1143 DEFN_ASN_OP_T(op,const sc_uint_base&)                                         \ 
 1144 DEFN_ASN_OP_T(op,const sc_signed&)                                            \ 
 1145 DEFN_ASN_OP_T(op,const sc_unsigned&) 
 1147 #define DEFN_ASN_OP_OTHER(op) 
 1150 #define DEFN_ASN_OP(op)                                                       \ 
 1151 DEFN_ASN_OP_T(op,int)                                                         \ 
 1152 DEFN_ASN_OP_T(op,unsigned int)                                                \ 
 1153 DEFN_ASN_OP_T(op,long)                                                        \ 
 1154 DEFN_ASN_OP_T(op,unsigned long)                                               \ 
 1155 DEFN_ASN_OP_T(op,float)                                                      \ 
 1156 DEFN_ASN_OP_T(op,double)                                                      \ 
 1157 DEFN_ASN_OP_T(op,const char*)                                                 \ 
 1158 DEFN_ASN_OP_T(op,const sc_fxval&)                                             \ 
 1159 DEFN_ASN_OP_T(op,const sc_fxval_fast&)                                        \ 
 1160 DEFN_ASN_OP_T(op,const sc_fxnum&)                                             \ 
 1161 DEFN_ASN_OP_T(op,const sc_fxnum_fast&)                                        \ 
 1162 DEFN_ASN_OP_OTHER(op) 
 1172 DEFN_ASN_OP_T(>>=,
int)
 
 1174 #undef DEFN_ASN_OP_T 
 1175 #undef DEFN_ASN_OP_OTHER 
 1179 #define DEFN_ASN_OP_T(op,op2,tp)                                              \ 
 1182 sc_ufix::operator op ( const tp& b )                                          \ 
 1184     SC_FXNUM_OBSERVER_READ_( *this )                                          \ 
 1185     b.observer_read();                                                        \ 
 1186     int iwl_c = iwl();                                                        \ 
 1187     for( int i = iwl_c - wl(); i < iwl_c; ++ i )                              \ 
 1188         set_bit( i, get_bit( i ) op2 b.get_bit( i ) );                        \ 
 1190     SC_FXNUM_OBSERVER_WRITE_( *this )                                         \ 
 1195 DEFN_ASN_OP_T(&=,&&,sc_ufix_fast)
 
 1196 DEFN_ASN_OP_T(|=,||,sc_ufix)
 
 1197 DEFN_ASN_OP_T(|=,||,sc_ufix_fast)
 
 1198 DEFN_ASN_OP_T(^=,!=,sc_ufix)
 
 1199 DEFN_ASN_OP_T(^=,!=,sc_ufix_fast)
 
 1201 #undef DEFN_ASN_OP_T 
 1210     return sc_fxval( sc_fxnum::operator ++ ( 0 ) );
 
 1217     return sc_fxval( sc_fxnum::operator -- ( 0 ) );
 
 1378 #define DEFN_CTORS_T_A(tp)                                                    \ 
 1380 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1381                             sc_fxnum_fast_observer* observer_ )               \ 
 1382 : sc_fxnum_fast( a,                                                           \ 
 1383                  sc_fxtype_params(),                                          \ 
 1385                  sc_fxcast_switch(),                                          \ 
 1390 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1391                             int wl_, int iwl_,                                \ 
 1392                             sc_fxnum_fast_observer* observer_ )               \ 
 1393 : sc_fxnum_fast( a,                                                           \ 
 1394                  sc_fxtype_params( wl_, iwl_ ),                               \ 
 1396                  sc_fxcast_switch(),                                          \ 
 1401 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1402                             sc_q_mode qm, sc_o_mode om,                       \ 
 1403                             sc_fxnum_fast_observer* observer_ )               \ 
 1404 : sc_fxnum_fast( a,                                                           \ 
 1405                  sc_fxtype_params( qm, om ),                                  \ 
 1407                  sc_fxcast_switch(),                                          \ 
 1412 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1413                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1414                             sc_fxnum_fast_observer* observer_ )               \ 
 1415 : sc_fxnum_fast( a,                                                           \ 
 1416                  sc_fxtype_params( qm, om, nb ),                              \ 
 1418                  sc_fxcast_switch(),                                          \ 
 1423 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1424                             int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,    \ 
 1425                             sc_fxnum_fast_observer* observer_ )               \ 
 1426 : sc_fxnum_fast( a,                                                           \ 
 1427                  sc_fxtype_params( wl_, iwl_, qm, om ),                       \ 
 1429                  sc_fxcast_switch(),                                          \ 
 1434 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1435                             int wl_, int iwl_,                                \ 
 1436                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1437                             sc_fxnum_fast_observer* observer_ )               \ 
 1438 : sc_fxnum_fast( a,                                                           \ 
 1439                  sc_fxtype_params( wl_, iwl_, qm, om, nb ),                   \ 
 1441                  sc_fxcast_switch(),                                          \ 
 1446 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1447                             const sc_fxcast_switch& cast_sw,                  \ 
 1448                             sc_fxnum_fast_observer* observer_ )               \ 
 1449 : sc_fxnum_fast( a,                                                           \ 
 1450                  sc_fxtype_params(),                                          \ 
 1457 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1458                             int wl_, int iwl_,                                \ 
 1459                             const sc_fxcast_switch& cast_sw,                  \ 
 1460                             sc_fxnum_fast_observer* observer_ )               \ 
 1461 : sc_fxnum_fast( a,                                                           \ 
 1462                  sc_fxtype_params( wl_, iwl_ ),                               \ 
 1469 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1470                             sc_q_mode qm, sc_o_mode om,                       \ 
 1471                             const sc_fxcast_switch& cast_sw,                  \ 
 1472                             sc_fxnum_fast_observer* observer_ )               \ 
 1473 : sc_fxnum_fast( a,                                                           \ 
 1474                  sc_fxtype_params( qm, om ),                                  \ 
 1481 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1482                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1483                             const sc_fxcast_switch& cast_sw,                  \ 
 1484                             sc_fxnum_fast_observer* observer_ )               \ 
 1485 : sc_fxnum_fast( a,                                                           \ 
 1486                  sc_fxtype_params( qm, om, nb ),                              \ 
 1493 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1494                             int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,    \ 
 1495                             const sc_fxcast_switch& cast_sw,                  \ 
 1496                             sc_fxnum_fast_observer* observer_ )               \ 
 1497 : sc_fxnum_fast( a,                                                           \ 
 1498                  sc_fxtype_params( wl_, iwl_, qm, om ),                       \ 
 1505 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1506                             int wl_, int iwl_,                                \ 
 1507                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1508                             const sc_fxcast_switch& cast_sw,                  \ 
 1509                             sc_fxnum_fast_observer* observer_ )               \ 
 1510 : sc_fxnum_fast( a,                                                           \ 
 1511                  sc_fxtype_params( wl_, iwl_, qm, om, nb ),                   \ 
 1518 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1519                             const sc_fxtype_params& type_params,              \ 
 1520                             sc_fxnum_fast_observer* observer_ )               \ 
 1521 : sc_fxnum_fast( a,                                                           \ 
 1524                  sc_fxcast_switch(),                                          \ 
 1529 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1530                             const sc_fxtype_params& type_params,              \ 
 1531                             const sc_fxcast_switch& cast_sw,                  \ 
 1532                             sc_fxnum_fast_observer* observer_ )               \ 
 1533 : sc_fxnum_fast( a,                                                           \ 
 1540 #define DEFN_CTORS_T_B(tp)                                                    \ 
 1542 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1543                             sc_fxnum_fast_observer* observer_ )               \ 
 1544 : sc_fxnum_fast( a,                                                           \ 
 1547                  sc_fxcast_switch(),                                          \ 
 1552 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1553                             int wl_, int iwl_,                                \ 
 1554                             sc_fxnum_fast_observer* observer_ )               \ 
 1555 : sc_fxnum_fast( a,                                                           \ 
 1556                  sc_fxtype_params( a.type_params(), wl_, iwl_ ),              \ 
 1558                  sc_fxcast_switch(),                                          \ 
 1563 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1564                             sc_q_mode qm, sc_o_mode om,                       \ 
 1565                             sc_fxnum_fast_observer* observer_ )               \ 
 1566 : sc_fxnum_fast( a,                                                           \ 
 1567                  sc_fxtype_params( a.type_params(), qm, om ),                 \ 
 1569                  sc_fxcast_switch(),                                          \ 
 1574 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1575                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1576                             sc_fxnum_fast_observer* observer_ )               \ 
 1577 : sc_fxnum_fast( a,                                                           \ 
 1578                  sc_fxtype_params( a.type_params(), qm, om, nb ),             \ 
 1580                  sc_fxcast_switch(),                                          \ 
 1585 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1586                             int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,    \ 
 1587                             sc_fxnum_fast_observer* observer_ )               \ 
 1588 : sc_fxnum_fast( a,                                                           \ 
 1589                  sc_fxtype_params( wl_, iwl_, qm, om ),                       \ 
 1591                  sc_fxcast_switch(),                                          \ 
 1596 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1597                             int wl_, int iwl_,                                \ 
 1598                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1599                             sc_fxnum_fast_observer* observer_ )               \ 
 1600 : sc_fxnum_fast( a,                                                           \ 
 1601                  sc_fxtype_params( wl_, iwl_, qm, om, nb ),                   \ 
 1603                  sc_fxcast_switch(),                                          \ 
 1608 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1609                             const sc_fxcast_switch& cast_sw,                  \ 
 1610                             sc_fxnum_fast_observer* observer_ )               \ 
 1611 : sc_fxnum_fast( a,                                                           \ 
 1619 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1620                             int wl_, int iwl_,                                \ 
 1621                             const sc_fxcast_switch& cast_sw,                  \ 
 1622                             sc_fxnum_fast_observer* observer_ )               \ 
 1623 : sc_fxnum_fast( a,                                                           \ 
 1624                  sc_fxtype_params( a.type_params(), wl_, iwl_ ),              \ 
 1631 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1632                             sc_q_mode qm, sc_o_mode om,                       \ 
 1633                             const sc_fxcast_switch& cast_sw,                  \ 
 1634                             sc_fxnum_fast_observer* observer_ )               \ 
 1635 : sc_fxnum_fast( a,                                                           \ 
 1636                  sc_fxtype_params( a.type_params(), qm, om ),                 \ 
 1643 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1644                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1645                             const sc_fxcast_switch& cast_sw,                  \ 
 1646                             sc_fxnum_fast_observer* observer_ )               \ 
 1647 : sc_fxnum_fast( a,                                                           \ 
 1648                  sc_fxtype_params( a.type_params(), qm, om, nb ),             \ 
 1655 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1656                             int wl_, int iwl_, sc_q_mode qm, sc_o_mode om,    \ 
 1657                             const sc_fxcast_switch& cast_sw,                  \ 
 1658                             sc_fxnum_fast_observer* observer_ )               \ 
 1659 : sc_fxnum_fast( a,                                                           \ 
 1660                  sc_fxtype_params( wl_, iwl_, qm, om ),                       \ 
 1667 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1668                             int wl_, int iwl_,                                \ 
 1669                             sc_q_mode qm, sc_o_mode om, int nb,               \ 
 1670                             const sc_fxcast_switch& cast_sw,                  \ 
 1671                             sc_fxnum_fast_observer* observer_ )               \ 
 1672 : sc_fxnum_fast( a,                                                           \ 
 1673                  sc_fxtype_params( wl_, iwl_, qm, om, nb ),                   \ 
 1680 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1681                             const sc_fxtype_params& type_params,              \ 
 1682                             sc_fxnum_fast_observer* observer_ )               \ 
 1683 : sc_fxnum_fast( a,                                                           \ 
 1686                  sc_fxcast_switch(),                                          \ 
 1691 sc_ufix_fast::sc_ufix_fast( tp a,                                             \ 
 1692                             const sc_fxtype_params& type_params,              \ 
 1693                             const sc_fxcast_switch& cast_sw,                  \ 
 1694                             sc_fxnum_fast_observer* observer_ )               \ 
 1695 : sc_fxnum_fast( a,                                                           \ 
 1713 #ifndef SC_FX_EXCLUDE_OTHER 
 1722 #undef DEFN_CTORS_T_A 
 1723 #undef DEFN_CTORS_T_B 
 1746     sc_ufix_fast c( wl_c, iwl_c );
 
 1747     for( 
int i = iwl_c - wl_c; i < iwl_c; ++ i )
 
 1757 b_not( sc_ufix_fast& c, 
const sc_ufix_fast& a )
 
 1760     int iwl_c = c.
iwl();
 
 1761     for( 
int i = iwl_c - c.
wl(); i < iwl_c; ++ i )
 
 1770 #define DEFN_BIN_OP_T(op,op2,tp1,tp2)                                         \ 
 1772 const sc_ufix_fast                                                            \ 
 1773 operator op ( const tp1& a, const tp2& b )                                    \ 
 1775     a.observer_read();                                                        \ 
 1776     b.observer_read();                                                        \ 
 1777     int iwl_a = a.iwl();                                                      \ 
 1778     int iwl_b = b.iwl();                                                      \ 
 1779     int iwl_c = sc_max( iwl_a, iwl_b );                                       \ 
 1780     int fwl_c = sc_max( a.wl() - iwl_a, b.wl() - iwl_b );                     \ 
 1781     sc_ufix_fast c( iwl_c + fwl_c, iwl_c );                                   \ 
 1782     for( int i = -fwl_c; i < iwl_c; ++ i )                                    \ 
 1783         c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) );                    \ 
 1784     return sc_ufix_fast( c, iwl_c + fwl_c, iwl_c );                           \ 
 1788 DEFN_BIN_OP_T(|,||,sc_ufix_fast,sc_ufix_fast)
 
 1789 DEFN_BIN_OP_T(^,!=,sc_ufix_fast,sc_ufix_fast)
 
 1791 #undef DEFN_BIN_OP_T 
 1796 #define DEFN_BIN_FNC_T(fnc,op2,tp1,tp2)                                       \ 
 1799 fnc ( sc_ufix_fast& c, const tp1& a, const tp2& b )                           \ 
 1801     a.observer_read();                                                        \ 
 1802     b.observer_read();                                                        \ 
 1803     int iwl_c = c.iwl();                                                      \ 
 1804     for( int i = iwl_c - c.wl(); i < iwl_c; ++ i )                            \ 
 1805         c.set_bit( i, a.get_bit( i ) op2 b.get_bit( i ) );                    \ 
 1807     SC_FXNUM_FAST_OBSERVER_WRITE_( c )                                        \ 
 1814 #undef DEFN_BIN_FNC_T 
 1823     sc_fxnum_fast::operator = ( a );
 
 1827 #define DEFN_ASN_OP_T(op,tp)                                                  \ 
 1830 sc_ufix_fast::operator op ( tp a )                                            \ 
 1832     sc_fxnum_fast::operator op( a );                                          \ 
 1836 #ifndef SC_FX_EXCLUDE_OTHER 
 1837 #define DEFN_ASN_OP_OTHER(op)                                                 \ 
 1838 DEFN_ASN_OP_T(op,int64)                                                       \ 
 1839 DEFN_ASN_OP_T(op,uint64)                                                      \ 
 1840 DEFN_ASN_OP_T(op,const sc_int_base&)                                          \ 
 1841 DEFN_ASN_OP_T(op,const sc_uint_base&)                                         \ 
 1842 DEFN_ASN_OP_T(op,const sc_signed&)                                            \ 
 1843 DEFN_ASN_OP_T(op,const sc_unsigned&) 
 1845 #define DEFN_ASN_OP_OTHER(op) 
 1848 #define DEFN_ASN_OP(op)                                                       \ 
 1849 DEFN_ASN_OP_T(op,int)                                                         \ 
 1850 DEFN_ASN_OP_T(op,unsigned int)                                                \ 
 1851 DEFN_ASN_OP_T(op,long)                                                        \ 
 1852 DEFN_ASN_OP_T(op,unsigned long)                                               \ 
 1853 DEFN_ASN_OP_T(op,float)                                                      \ 
 1854 DEFN_ASN_OP_T(op,double)                                                      \ 
 1855 DEFN_ASN_OP_T(op,const char*)                                                 \ 
 1856 DEFN_ASN_OP_T(op,const sc_fxval&)                                             \ 
 1857 DEFN_ASN_OP_T(op,const sc_fxval_fast&)                                        \ 
 1858 DEFN_ASN_OP_T(op,const sc_fxnum&)                                             \ 
 1859 DEFN_ASN_OP_T(op,const sc_fxnum_fast&)                                        \ 
 1860 DEFN_ASN_OP_OTHER(op) 
 1869 DEFN_ASN_OP_T(<<=,
int)
 
 1870 DEFN_ASN_OP_T(>>=,
int)
 
 1872 #undef DEFN_ASN_OP_T 
 1873 #undef DEFN_ASN_OP_OTHER 
 1877 #define DEFN_ASN_OP_T(op,op2,tp)                                              \ 
 1880 sc_ufix_fast::operator op ( const tp& b )                                     \ 
 1882     SC_FXNUM_FAST_OBSERVER_READ_( *this )                                     \ 
 1883     b.observer_read();                                                        \ 
 1884     int iwl_c = iwl();                                                        \ 
 1885     for( int i = iwl_c - wl(); i < iwl_c; ++ i )                              \ 
 1886         set_bit( i, get_bit( i ) op2 b.get_bit( i ) );                        \ 
 1888     SC_FXNUM_FAST_OBSERVER_WRITE_( *this )                                    \ 
 1893 DEFN_ASN_OP_T(&=,&&,sc_ufix_fast)
 
 1894 DEFN_ASN_OP_T(|=,||,sc_ufix)
 
 1895 DEFN_ASN_OP_T(|=,||,sc_ufix_fast)
 
 1896 DEFN_ASN_OP_T(^=,!=,sc_ufix)
 
 1897 DEFN_ASN_OP_T(^=,!=,sc_ufix_fast)
 
 1899 #undef DEFN_ASN_OP_T 
#define DEFN_ASN_OP_T(op, tp)
 
const sc_bit b_xor(const sc_bit &a, const sc_bit &b)
 
friend void b_not(sc_ufix &, const sc_ufix &)
 
sc_fxnum_fast & operator--()
 
#define DECL_CTORS_T_A(tp)
 
sc_ufix_fast & operator=(const sc_ufix_fast &)
 
const sc_bit b_not(const sc_bit &a)
 
sc_ufix_fast & operator++()
 
#define DEFN_BIN_FNC_T(fnc, op2, tp1, tp2)
 
sc_ufix & operator=(const sc_ufix &)
 
friend const sc_ufix operator^(const sc_ufix &, const sc_ufix &)
 
friend class sc_fxval_fast
 
friend void b_xor(sc_ufix &, const sc_ufix &, const sc_ufix &)
 
friend void b_and(sc_ufix_fast &, const sc_ufix_fast &, const sc_ufix_fast &)
 
const sc_ufix operator~() const 
 
sc_fxnum_fast & operator++()
 
sc_ufix_fast(sc_fxnum_fast_observer *=0)
 
const sc_bit b_or(const sc_bit &a, const sc_bit &b)
 
friend const sc_ufix_fast operator&(const sc_ufix_fast &, const sc_ufix_fast &)
 
#define DECL_CTORS_T_B(tp)
 
const sc_ufix_fast operator~() const 
 
#define DECL_ASN_OP_T(op, tp)
 
sc_ufix(sc_fxnum_observer *=0)
 
#define SC_FXNUM_OBSERVER_READ_(object)
 
friend void b_or(sc_ufix &, const sc_ufix &, const sc_ufix &)
 
#define SC_FXNUM_FAST_OBSERVER_WRITE_(object)
 
const sc_bit b_and(const sc_bit &a, const sc_bit &b)
 
friend void b_or(sc_ufix_fast &, const sc_ufix_fast &, const sc_ufix_fast &)
 
#define SC_FXNUM_FAST_OBSERVER_READ_(object)
 
#define DEFN_CTORS_T_A(tp)
 
friend const sc_ufix operator&(const sc_ufix &, const sc_ufix &)
 
friend void b_xor(sc_ufix_fast &, const sc_ufix_fast &, const sc_ufix_fast &)
 
friend const sc_ufix_fast operator|(const sc_ufix_fast &, const sc_ufix_fast &)
 
friend const sc_ufix_fast operator^(const sc_ufix_fast &, const sc_ufix_fast &)
 
friend const sc_ufix operator|(const sc_ufix &, const sc_ufix &)
 
#define SC_FXNUM_OBSERVER_WRITE_(object)
 
friend void b_and(sc_ufix &, const sc_ufix &, const sc_ufix &)
 
#define DEFN_CTORS_T_B(tp)
 
sc_ufix_fast & operator--()
 
friend void b_not(sc_ufix_fast &, const sc_ufix_fast &)
 
DEFN_BIN_OP_T(/, div, int64) DEFN_BIN_OP_T(/