59 template <
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N> 
class sc_ufixed;
 
   60 template <
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N> 
class sc_ufixed_fast;
 
   69 template <
int W, 
int I,
 
   82 #define DECL_CTORS_T_A(tp)                                                    \ 
   83              sc_ufixed( tp, sc_fxnum_observer* = 0 );                         \ 
   84              sc_ufixed( tp, const sc_fxcast_switch&, sc_fxnum_observer* = 0 ); 
   86 #define DECL_CTORS_T_B(tp)                                                    \ 
   87     explicit sc_ufixed( tp, sc_fxnum_observer* = 0 );                         \ 
   88              sc_ufixed( tp, const sc_fxcast_switch&, sc_fxnum_observer* = 0 ); 
  101 #ifndef SC_FX_EXCLUDE_OTHER 
  110 #undef DECL_CTORS_T_A 
  111 #undef DECL_CTORS_T_B 
  122 #define DECL_ASN_OP_T(op,tp)                                                  \ 
  123     sc_ufixed& operator op ( tp ); 
  125 #ifndef SC_FX_EXCLUDE_OTHER 
  126 #define DECL_ASN_OP_OTHER(op)                                                 \ 
  127     DECL_ASN_OP_T(op,int64)                                                   \ 
  128     DECL_ASN_OP_T(op,uint64)                                                  \ 
  129     DECL_ASN_OP_T(op,const sc_int_base&)                                      \ 
  130     DECL_ASN_OP_T(op,const sc_uint_base&)                                     \ 
  131     DECL_ASN_OP_T(op,const sc_signed&)                                        \ 
  132     DECL_ASN_OP_T(op,const sc_unsigned&) 
  134 #define DECL_ASN_OP_OTHER(op) 
  137 #define DECL_ASN_OP(op)                                                       \ 
  138     DECL_ASN_OP_T(op,int)                                                     \ 
  139     DECL_ASN_OP_T(op,unsigned int)                                            \ 
  140     DECL_ASN_OP_T(op,long)                                                    \ 
  141     DECL_ASN_OP_T(op,unsigned long)                                           \ 
  142     DECL_ASN_OP_T(op,float)                                                  \ 
  143     DECL_ASN_OP_T(op,double)                                                  \ 
  144     DECL_ASN_OP_T(op,const char*)                                             \ 
  145     DECL_ASN_OP_T(op,const sc_fxval&)                                         \ 
  146     DECL_ASN_OP_T(op,const sc_fxval_fast&)                                    \ 
  147     DECL_ASN_OP_T(op,const sc_fxnum&)                                         \ 
  148     DECL_ASN_OP_T(op,const sc_fxnum_fast&)                                    \ 
  149     DECL_ASN_OP_OTHER(op) 
  159     DECL_ASN_OP_T(>>=,
int)
 
  161     DECL_ASN_OP_T(&=,const 
sc_ufix&)
 
  163     DECL_ASN_OP_T(|=,const 
sc_ufix&)
 
  165     DECL_ASN_OP_T(^=,const 
sc_ufix&)
 
  169 #undef DECL_ASN_OP_OTHER 
  190 template <
int W, 
int I,
 
  204 #define DECL_CTORS_T_A(tp)                                                    \ 
  205              sc_ufixed_fast( tp, sc_fxnum_fast_observer* = 0 );               \ 
  206              sc_ufixed_fast( tp, const sc_fxcast_switch&,                     \ 
  207                              sc_fxnum_fast_observer* = 0 ); 
  209 #define DECL_CTORS_T_B(tp)                                                    \ 
  210     explicit sc_ufixed_fast( tp, sc_fxnum_fast_observer* = 0 );               \ 
  211              sc_ufixed_fast( tp, const sc_fxcast_switch&,                     \ 
  212                              sc_fxnum_fast_observer* = 0 ); 
  225 #ifndef SC_FX_EXCLUDE_OTHER 
  234 #undef DECL_CTORS_T_A 
  235 #undef DECL_CTORS_T_B 
  246 #define DECL_ASN_OP_T(op,tp)                                                  \ 
  247     sc_ufixed_fast& operator op ( tp ); 
  249 #ifndef SC_FX_EXCLUDE_OTHER 
  250 #define DECL_ASN_OP_OTHER(op)                                                 \ 
  251     DECL_ASN_OP_T(op,int64)                                                   \ 
  252     DECL_ASN_OP_T(op,uint64)                                                  \ 
  253     DECL_ASN_OP_T(op,const sc_int_base&)                                      \ 
  254     DECL_ASN_OP_T(op,const sc_uint_base&)                                     \ 
  255     DECL_ASN_OP_T(op,const sc_signed&)                                        \ 
  256     DECL_ASN_OP_T(op,const sc_unsigned&) 
  258 #define DECL_ASN_OP_OTHER(op) 
  261 #define DECL_ASN_OP(op)                                                       \ 
  262     DECL_ASN_OP_T(op,int)                                                     \ 
  263     DECL_ASN_OP_T(op,unsigned int)                                            \ 
  264     DECL_ASN_OP_T(op,long)                                                    \ 
  265     DECL_ASN_OP_T(op,unsigned long)                                           \ 
  266     DECL_ASN_OP_T(op,float)                                                  \ 
  267     DECL_ASN_OP_T(op,double)                                                  \ 
  268     DECL_ASN_OP_T(op,const char*)                                             \ 
  269     DECL_ASN_OP_T(op,const sc_fxval&)                                         \ 
  270     DECL_ASN_OP_T(op,const sc_fxval_fast&)                                    \ 
  271     DECL_ASN_OP_T(op,const sc_fxnum&)                                         \ 
  272     DECL_ASN_OP_T(op,const sc_fxnum_fast&)                                    \ 
  273     DECL_ASN_OP_OTHER(op) 
  283     DECL_ASN_OP_T(>>=,
int)
 
  285     DECL_ASN_OP_T(&=,const sc_ufix&)
 
  287     DECL_ASN_OP_T(|=,const sc_ufix&)
 
  289     DECL_ASN_OP_T(^=,const sc_ufix&)
 
  293 #undef DECL_ASN_OP_OTHER 
  316 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  319 : 
sc_ufix( W, I, Q, O, N, observer_ )
 
  322 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  326 : 
sc_ufix( W, I, Q, O, N, cast_sw, observer_ )
 
  329 #define DEFN_CTORS_T(tp)                                                      \ 
  330 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>                       \ 
  332 sc_ufixed<W,I,Q,O,N>::sc_ufixed( tp a,                                        \ 
  333                                  sc_fxnum_observer* observer_ )               \ 
  334 : sc_ufix( a, W, I, Q, O, N, observer_ )                                      \ 
  337 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>                       \ 
  339 sc_ufixed<W,I,Q,O,N>::sc_ufixed( tp a,                                        \ 
  340                                  const sc_fxcast_switch& cast_sw,             \ 
  341                                  sc_fxnum_observer* observer_ )               \ 
  342 : sc_ufix( a, W, I, Q, O, N, cast_sw, observer_ )                             \ 
  356 #ifndef SC_FX_EXCLUDE_OTHER 
  369 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  378 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  387 #define DEFN_ASN_OP_T(op,tp)                                                  \ 
  388 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>                       \ 
  390 sc_ufixed<W,I,Q,O,N>&                                                         \ 
  391 sc_ufixed<W,I,Q,O,N>::operator op ( tp a )                                    \ 
  393     sc_ufix::operator op ( a );                                               \ 
  397 #ifndef SC_FX_EXCLUDE_OTHER 
  398 #define DEFN_ASN_OP_OTHER(op)                                                 \ 
  399 DEFN_ASN_OP_T(op,int64)                                                       \ 
  400 DEFN_ASN_OP_T(op,uint64)                                                      \ 
  401 DEFN_ASN_OP_T(op,const sc_int_base&)                                          \ 
  402 DEFN_ASN_OP_T(op,const sc_uint_base&)                                         \ 
  403 DEFN_ASN_OP_T(op,const sc_signed&)                                            \ 
  404 DEFN_ASN_OP_T(op,const sc_unsigned&) 
  406 #define DEFN_ASN_OP_OTHER(op) 
  409 #define DEFN_ASN_OP(op)                                                       \ 
  410 DEFN_ASN_OP_T(op,int)                                                         \ 
  411 DEFN_ASN_OP_T(op,unsigned int)                                                \ 
  412 DEFN_ASN_OP_T(op,long)                                                        \ 
  413 DEFN_ASN_OP_T(op,unsigned long)                                               \ 
  414 DEFN_ASN_OP_T(op,float)                                                      \ 
  415 DEFN_ASN_OP_T(op,double)                                                      \ 
  416 DEFN_ASN_OP_T(op,const char*)                                                 \ 
  417 DEFN_ASN_OP_T(op,const sc_fxval&)                                             \ 
  418 DEFN_ASN_OP_T(op,const sc_fxval_fast&)                                        \ 
  419 DEFN_ASN_OP_T(op,const sc_fxnum&)                                             \ 
  420 DEFN_ASN_OP_T(op,const sc_fxnum_fast&)                                        \ 
  421 DEFN_ASN_OP_OTHER(op) 
  431 DEFN_ASN_OP_T(>>=,
int)
 
  433 DEFN_ASN_OP_T(&=,const 
sc_ufix&)
 
  435 DEFN_ASN_OP_T(|=,const 
sc_ufix&)
 
  437 DEFN_ASN_OP_T(^=,const 
sc_ufix&)
 
  441 #undef DEFN_ASN_OP_OTHER 
  447 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  452     return sc_fxval( sc_ufix::operator ++ ( 0 ) );
 
  455 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  460     return sc_fxval( sc_ufix::operator -- ( 0 ) );
 
  463 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  472 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  488 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  494 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  501 #define DEFN_CTORS_T(tp)                                                      \ 
  502 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>                       \ 
  504 sc_ufixed_fast<W,I,Q,O,N>::sc_ufixed_fast( tp a,                              \ 
  505                                            sc_fxnum_fast_observer* observer_ )\ 
  506 : sc_ufix_fast( a, W, I, Q, O, N, observer_ )                                 \ 
  509 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>                       \ 
  511 sc_ufixed_fast<W,I,Q,O,N>::sc_ufixed_fast( tp a,                              \ 
  512                                            const sc_fxcast_switch& cast_sw,   \ 
  513                                            sc_fxnum_fast_observer* observer_ )\ 
  514 : sc_ufix_fast( a, W, I, Q, O, N, cast_sw, observer_ )                        \ 
  528 #ifndef SC_FX_EXCLUDE_OTHER 
  541 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  550 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  559 #define DEFN_ASN_OP_T(op,tp)                                                  \ 
  560 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>                       \ 
  562 sc_ufixed_fast<W,I,Q,O,N>&                                                    \ 
  563 sc_ufixed_fast<W,I,Q,O,N>::operator op ( tp a )                               \ 
  565     sc_ufix_fast::operator op ( a );                                          \ 
  569 #ifndef SC_FX_EXCLUDE_OTHER 
  570 #define DEFN_ASN_OP_OTHER(op)                                                 \ 
  571 DEFN_ASN_OP_T(op,int64)                                                       \ 
  572 DEFN_ASN_OP_T(op,uint64)                                                      \ 
  573 DEFN_ASN_OP_T(op,const sc_int_base&)                                          \ 
  574 DEFN_ASN_OP_T(op,const sc_uint_base&)                                         \ 
  575 DEFN_ASN_OP_T(op,const sc_signed&)                                            \ 
  576 DEFN_ASN_OP_T(op,const sc_unsigned&) 
  578 #define DEFN_ASN_OP_OTHER(op) 
  581 #define DEFN_ASN_OP(op)                                                       \ 
  582 DEFN_ASN_OP_T(op,int)                                                         \ 
  583 DEFN_ASN_OP_T(op,unsigned int)                                                \ 
  584 DEFN_ASN_OP_T(op,long)                                                        \ 
  585 DEFN_ASN_OP_T(op,unsigned long)                                               \ 
  586 DEFN_ASN_OP_T(op,float)                                                      \ 
  587 DEFN_ASN_OP_T(op,double)                                                      \ 
  588 DEFN_ASN_OP_T(op,const char*)                                                 \ 
  589 DEFN_ASN_OP_T(op,const sc_fxval&)                                             \ 
  590 DEFN_ASN_OP_T(op,const sc_fxval_fast&)                                        \ 
  591 DEFN_ASN_OP_T(op,const sc_fxnum&)                                             \ 
  592 DEFN_ASN_OP_T(op,const sc_fxnum_fast&)                                        \ 
  593 DEFN_ASN_OP_OTHER(op) 
  602 DEFN_ASN_OP_T(<<=,
int)
 
  603 DEFN_ASN_OP_T(>>=,
int)
 
  605 DEFN_ASN_OP_T(&=,const sc_ufix&)
 
  606 DEFN_ASN_OP_T(&=,const sc_ufix_fast&)
 
  607 DEFN_ASN_OP_T(|=,const sc_ufix&)
 
  608 DEFN_ASN_OP_T(|=,const sc_ufix_fast&)
 
  609 DEFN_ASN_OP_T(^=,const sc_ufix&)
 
  610 DEFN_ASN_OP_T(^=,const sc_ufix_fast&)
 
  613 #undef DEFN_ASN_OP_OTHER 
  619 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  627 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  635 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
  644 template<
int W, 
int I, sc_q_mode Q, sc_o_mode O, 
int N>
 
#define DEFN_ASN_OP_T(op, tp)
 
sc_ufixed(sc_fxnum_observer *=0)
 
#define DECL_CTORS_T_A(tp)
 
sc_ufixed & operator=(const sc_ufixed< W, I, Q, O, N > &)
 
sc_ufix_fast & operator=(const sc_ufix_fast &)
 
sc_ufix_fast & operator++()
 
sc_ufix & operator=(const sc_ufix &)
 
friend class sc_fxval_fast
 
sc_ufix_fast(sc_fxnum_fast_observer *=0)
 
#define DECL_CTORS_T_B(tp)
 
#define DECL_ASN_OP_T(op, tp)
 
sc_ufixed_fast(sc_fxnum_fast_observer *=0)
 
sc_ufixed_fast & operator=(const sc_ufixed_fast< W, I, Q, O, N > &)
 
sc_ufixed_fast & operator++()
 
const int SC_DEFAULT_N_BITS_
 
sc_ufixed_fast & operator--()
 
sc_ufix_fast & operator--()
 
const sc_q_mode SC_DEFAULT_Q_MODE_
 
const sc_o_mode SC_DEFAULT_O_MODE_