61template <
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
class sc_ufixed;
62template <
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
class sc_ufixed_fast;
71template <
int W,
int I,
84#define DECL_CTORS_T_A(tp) \
85 sc_ufixed( tp, sc_fxnum_observer* = 0 ); \
86 sc_ufixed( tp, const sc_fxcast_switch&, sc_fxnum_observer* = 0 );
88#define DECL_CTORS_T_B(tp) \
89 explicit sc_ufixed( tp, sc_fxnum_observer* = 0 ); \
90 sc_ufixed( tp, const sc_fxcast_switch&, sc_fxnum_observer* = 0 );
122#define DECL_ASN_OP_T(op,tp) \
123 sc_ufixed& operator op ( tp );
125#define DECL_ASN_OP_OTHER(op) \
126 DECL_ASN_OP_T(op,int64) \
127 DECL_ASN_OP_T(op,uint64) \
128 DECL_ASN_OP_T(op,const sc_int_base&) \
129 DECL_ASN_OP_T(op,const sc_uint_base&) \
130 DECL_ASN_OP_T(op,const sc_signed&) \
131 DECL_ASN_OP_T(op,const sc_unsigned&)
133#define DECL_ASN_OP(op) \
134 DECL_ASN_OP_T(op,int) \
135 DECL_ASN_OP_T(op,unsigned int) \
136 DECL_ASN_OP_T(op,long) \
137 DECL_ASN_OP_T(op,unsigned long) \
138 DECL_ASN_OP_T(op,float) \
139 DECL_ASN_OP_T(op,double) \
140 DECL_ASN_OP_T(op,const char*) \
141 DECL_ASN_OP_T(op,const sc_fxval&) \
142 DECL_ASN_OP_T(op,const sc_fxval_fast&) \
143 DECL_ASN_OP_T(op,const sc_fxnum&) \
144 DECL_ASN_OP_T(op,const sc_fxnum_fast&) \
145 DECL_ASN_OP_OTHER(op)
165#undef DECL_ASN_OP_OTHER
186template <
int W,
int I,
200#define DECL_CTORS_T_A(tp) \
201 sc_ufixed_fast( tp, sc_fxnum_fast_observer* = 0 ); \
202 sc_ufixed_fast( tp, const sc_fxcast_switch&, \
203 sc_fxnum_fast_observer* = 0 );
205#define DECL_CTORS_T_B(tp) \
206 explicit sc_ufixed_fast( tp, sc_fxnum_fast_observer* = 0 ); \
207 sc_ufixed_fast( tp, const sc_fxcast_switch&, \
208 sc_fxnum_fast_observer* = 0 );
240#define DECL_ASN_OP_T(op,tp) \
241 sc_ufixed_fast& operator op ( tp );
243#define DECL_ASN_OP_OTHER(op) \
244 DECL_ASN_OP_T(op,int64) \
245 DECL_ASN_OP_T(op,uint64) \
246 DECL_ASN_OP_T(op,const sc_int_base&) \
247 DECL_ASN_OP_T(op,const sc_uint_base&) \
248 DECL_ASN_OP_T(op,const sc_signed&) \
249 DECL_ASN_OP_T(op,const sc_unsigned&)
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
306template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
309:
sc_ufix( W, I, Q, O, N, observer_ )
312template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
316:
sc_ufix( W, I, Q, O, N, cast_sw, observer_ )
319#define DEFN_CTORS_T(tp) \
320template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
322sc_ufixed<W,I,Q,O,N>::sc_ufixed( tp a, \
323 sc_fxnum_observer* observer_ ) \
324: sc_ufix( a, W, I, Q, O, N, observer_ ) \
327template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
329sc_ufixed<W,I,Q,O,N>::sc_ufixed( tp a, \
330 const sc_fxcast_switch& cast_sw, \
331 sc_fxnum_observer* observer_ ) \
332: sc_ufix( a, W, I, Q, O, N, cast_sw, observer_ ) \
357template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
366template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
375#define DEFN_ASN_OP_T(op,tp) \
376template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
378sc_ufixed<W,I,Q,O,N>& \
379sc_ufixed<W,I,Q,O,N>::operator op ( tp a ) \
381 sc_ufix::operator op ( a ); \
385#define DEFN_ASN_OP_OTHER(op) \
386DEFN_ASN_OP_T(op,int64) \
387DEFN_ASN_OP_T(op,uint64) \
388DEFN_ASN_OP_T(op,const sc_int_base&) \
389DEFN_ASN_OP_T(op,const sc_uint_base&) \
390DEFN_ASN_OP_T(op,const sc_signed&) \
391DEFN_ASN_OP_T(op,const sc_unsigned&)
393#define DEFN_ASN_OP(op) \
394DEFN_ASN_OP_T(op,int) \
395DEFN_ASN_OP_T(op,unsigned int) \
396DEFN_ASN_OP_T(op,long) \
397DEFN_ASN_OP_T(op,unsigned long) \
398DEFN_ASN_OP_T(op,float) \
399DEFN_ASN_OP_T(op,double) \
400DEFN_ASN_OP_T(op,const char*) \
401DEFN_ASN_OP_T(op,const sc_fxval&) \
402DEFN_ASN_OP_T(op,const sc_fxval_fast&) \
403DEFN_ASN_OP_T(op,const sc_fxnum&) \
404DEFN_ASN_OP_T(op,const sc_fxnum_fast&) \
425#undef DEFN_ASN_OP_OTHER
431template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
436 return sc_fxval( sc_ufix::operator ++ ( 0 ) );
439template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
444 return sc_fxval( sc_ufix::operator -- ( 0 ) );
447template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
456template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
472template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
478template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
485#define DEFN_CTORS_T(tp) \
486template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
488sc_ufixed_fast<W,I,Q,O,N>::sc_ufixed_fast( tp a, \
489 sc_fxnum_fast_observer* observer_ )\
490: sc_ufix_fast( a, W, I, Q, O, N, observer_ ) \
493template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
495sc_ufixed_fast<W,I,Q,O,N>::sc_ufixed_fast( tp a, \
496 const sc_fxcast_switch& cast_sw, \
497 sc_fxnum_fast_observer* observer_ )\
498: sc_ufix_fast( a, W, I, Q, O, N, cast_sw, observer_ ) \
523template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
532template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
541#define DEFN_ASN_OP_T(op,tp) \
542template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
544sc_ufixed_fast<W,I,Q,O,N>& \
545sc_ufixed_fast<W,I,Q,O,N>::operator op ( tp a ) \
547 sc_ufix_fast::operator op ( a ); \
551#define DEFN_ASN_OP_OTHER(op) \
552DEFN_ASN_OP_T(op,int64) \
553DEFN_ASN_OP_T(op,uint64) \
554DEFN_ASN_OP_T(op,const sc_int_base&) \
555DEFN_ASN_OP_T(op,const sc_uint_base&) \
556DEFN_ASN_OP_T(op,const sc_signed&) \
557DEFN_ASN_OP_T(op,const sc_unsigned&)
559#define DEFN_ASN_OP(op) \
560DEFN_ASN_OP_T(op,int) \
561DEFN_ASN_OP_T(op,unsigned int) \
562DEFN_ASN_OP_T(op,long) \
563DEFN_ASN_OP_T(op,unsigned long) \
564DEFN_ASN_OP_T(op,float) \
565DEFN_ASN_OP_T(op,double) \
566DEFN_ASN_OP_T(op,const char*) \
567DEFN_ASN_OP_T(op,const sc_fxval&) \
568DEFN_ASN_OP_T(op,const sc_fxval_fast&) \
569DEFN_ASN_OP_T(op,const sc_fxnum&) \
570DEFN_ASN_OP_T(op,const sc_fxnum_fast&) \
591#undef DEFN_ASN_OP_OTHER
597template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
605template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
613template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
622template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
#define DECL_CTORS_T_A(tp)
#define DECL_CTORS_T_B(tp)
#define DEFN_ASN_OP_T(op, tp)
#define DECL_ASN_OP_T(op, tp)
unsigned long long uint64
const sc_q_mode SC_DEFAULT_Q_MODE_
const sc_o_mode SC_DEFAULT_O_MODE_
const int SC_DEFAULT_N_BITS_
friend class sc_fxval_fast
sc_ufix & operator=(const sc_ufix &)
sc_ufix_fast & operator--()
sc_ufix_fast(sc_fxnum_fast_observer *=0)
sc_ufix_fast & operator=(const sc_ufix_fast &)
sc_ufix_fast & operator++()
sc_ufixed(sc_fxnum_observer *=0)
sc_ufixed & operator=(const sc_ufixed< W, I, Q, O, N > &)
sc_ufixed_fast(sc_fxnum_fast_observer *=0)
sc_ufixed_fast & operator++()
sc_ufixed_fast & operator--()
sc_ufixed_fast & operator=(const sc_ufixed_fast< W, I, Q, O, N > &)