50#ifndef __SYSTEMC_EXT_DT_FX_SC_UFIXED_HH__
51#define __SYSTEMC_EXT_DT_FX_SC_UFIXED_HH__
59template <
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
61template <
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
71template <
int W,
int I,
81#define DECL_CTORS_T_A(tp) \
82 sc_ufixed(tp, sc_fxnum_observer * =0); \
83 sc_ufixed(tp, const sc_fxcast_switch &, sc_fxnum_observer * =0);
85#define DECL_CTORS_T_B(tp) \
86 explicit sc_ufixed(tp, sc_fxnum_observer * =0); \
87 sc_ufixed(tp, const sc_fxcast_switch &, sc_fxnum_observer * =0);
116#define DECL_ASN_OP_T(op,tp) sc_ufixed &operator op (tp);
118#define DECL_ASN_OP_OTHER(op) \
119 DECL_ASN_OP_T(op, int64) \
120 DECL_ASN_OP_T(op, uint64) \
121 DECL_ASN_OP_T(op, const sc_int_base &) \
122 DECL_ASN_OP_T(op, const sc_uint_base &) \
123 DECL_ASN_OP_T(op, const sc_signed &) \
124 DECL_ASN_OP_T(op, const sc_unsigned &)
126#define DECL_ASN_OP(op) \
127 DECL_ASN_OP_T(op, int) \
128 DECL_ASN_OP_T(op, unsigned int) \
129 DECL_ASN_OP_T(op, long) \
130 DECL_ASN_OP_T(op, unsigned long) \
131 DECL_ASN_OP_T(op, float) \
132 DECL_ASN_OP_T(op, double) \
133 DECL_ASN_OP_T(op, const char *) \
134 DECL_ASN_OP_T(op, const sc_fxval &) \
135 DECL_ASN_OP_T(op, const sc_fxval_fast &) \
136 DECL_ASN_OP_T(op, const sc_fxnum &) \
137 DECL_ASN_OP_T(op, const sc_fxnum_fast &) \
138 DECL_ASN_OP_OTHER(op)
158#undef DECL_ASN_OP_OTHER
176template <
int W,
int I,
187#define DECL_CTORS_T_A(tp) \
188 sc_ufixed_fast(tp, sc_fxnum_fast_observer * =0); \
189 sc_ufixed_fast(tp, const sc_fxcast_switch &, sc_fxnum_fast_observer * =0);
191#define DECL_CTORS_T_B(tp) \
192 explicit sc_ufixed_fast(tp, sc_fxnum_fast_observer * =0); \
193 sc_ufixed_fast(tp, const sc_fxcast_switch &, sc_fxnum_fast_observer * =0);
222#define DECL_ASN_OP_T(op,tp) sc_ufixed_fast &operator op (tp);
224#define DECL_ASN_OP_OTHER(op) \
225 DECL_ASN_OP_T(op, int64) \
226 DECL_ASN_OP_T(op, uint64) \
227 DECL_ASN_OP_T(op, const sc_int_base &) \
228 DECL_ASN_OP_T(op, const sc_uint_base &) \
229 DECL_ASN_OP_T(op, const sc_signed &) \
230 DECL_ASN_OP_T(op, const sc_unsigned &)
232#define DECL_ASN_OP(op) \
233 DECL_ASN_OP_T(op, int) \
234 DECL_ASN_OP_T(op, unsigned int) \
235 DECL_ASN_OP_T(op, long) \
236 DECL_ASN_OP_T(op, unsigned long) \
237 DECL_ASN_OP_T(op, float) \
238 DECL_ASN_OP_T(op, double) \
239 DECL_ASN_OP_T(op, const char *) \
240 DECL_ASN_OP_T(op, const sc_fxval &) \
241 DECL_ASN_OP_T(op, const sc_fxval_fast &) \
242 DECL_ASN_OP_T(op, const sc_fxnum &) \
243 DECL_ASN_OP_T(op, const sc_fxnum_fast &) \
244 DECL_ASN_OP_OTHER(op)
264#undef DECL_ASN_OP_OTHER
284template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
286 sc_ufix(W, I, Q, O, N, observer_)
289template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
292 sc_ufix(W, I, Q, O, N, cast_sw, observer_)
295#define DEFN_CTORS_T(tp) \
296template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
297inline sc_ufixed<W, I, Q, O, N>::sc_ufixed( \
298 tp a, sc_fxnum_observer *observer_) :\
299 sc_ufix(a, W, I, Q, O, N, observer_) \
302template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
303inline sc_ufixed<W, I, Q, O, N>::sc_ufixed( \
304 tp a, const sc_fxcast_switch &cast_sw, \
305 sc_fxnum_observer *observer_) : \
306 sc_ufix(a, W, I, Q, O, N, cast_sw, observer_) \
331template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
337template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
345#define DEFN_ASN_OP_T(op,tp) \
346template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
347inline sc_ufixed<W, I, Q, O, N> & \
348sc_ufixed<W, I, Q, O, N>::operator op (tp a) \
350 sc_ufix::operator op (a); \
354#define DEFN_ASN_OP_OTHER(op) \
355DEFN_ASN_OP_T(op, int64) \
356DEFN_ASN_OP_T(op, uint64) \
357DEFN_ASN_OP_T(op, const sc_int_base &) \
358DEFN_ASN_OP_T(op, const sc_uint_base &) \
359DEFN_ASN_OP_T(op, const sc_signed &) \
360DEFN_ASN_OP_T(op, const sc_unsigned &)
362#define DEFN_ASN_OP(op) \
363DEFN_ASN_OP_T(op, int) \
364DEFN_ASN_OP_T(op, unsigned int) \
365DEFN_ASN_OP_T(op, long) \
366DEFN_ASN_OP_T(op, unsigned long) \
367DEFN_ASN_OP_T(op, float) \
368DEFN_ASN_OP_T(op, double) \
369DEFN_ASN_OP_T(op, const char *) \
370DEFN_ASN_OP_T(op, const sc_fxval &) \
371DEFN_ASN_OP_T(op, const sc_fxval_fast &) \
372DEFN_ASN_OP_T(op, const sc_fxnum &) \
373DEFN_ASN_OP_T(op, const sc_fxnum_fast &) \
394#undef DEFN_ASN_OP_OTHER
398template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
402 return sc_fxval(sc_ufix::operator ++ (0));
405template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
409 return sc_fxval(sc_ufix::operator -- (0));
412template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
420template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
435template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
441template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
448#define DEFN_CTORS_T(tp) \
449template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
450inline sc_ufixed_fast<W, I, Q, O, N>::sc_ufixed_fast( \
451 tp a, sc_fxnum_fast_observer *observer_ ) : \
452 sc_ufix_fast(a, W, I, Q, O, N, observer_) \
455template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
456inline sc_ufixed_fast<W, I, Q, O, N>::sc_ufixed_fast( \
457 tp a, const sc_fxcast_switch &cast_sw, \
458 sc_fxnum_fast_observer *observer_) : \
459 sc_ufix_fast(a, W, I, Q, O, N, cast_sw, observer_) \
484template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
491template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
500#define DEFN_ASN_OP_T(op, tp) \
501template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
502inline sc_ufixed_fast<W, I, Q, O, N> & \
503sc_ufixed_fast<W, I, Q, O, N>::operator op (tp a) \
505 sc_ufix_fast::operator op (a); \
509#define DEFN_ASN_OP_OTHER(op) \
510DEFN_ASN_OP_T(op, int64) \
511DEFN_ASN_OP_T(op, uint64) \
512DEFN_ASN_OP_T(op, const sc_int_base &) \
513DEFN_ASN_OP_T(op, const sc_uint_base &) \
514DEFN_ASN_OP_T(op, const sc_signed &) \
515DEFN_ASN_OP_T(op, const sc_unsigned &)
517#define DEFN_ASN_OP(op) \
518DEFN_ASN_OP_T(op, int) \
519DEFN_ASN_OP_T(op, unsigned int) \
520DEFN_ASN_OP_T(op, long) \
521DEFN_ASN_OP_T(op, unsigned long) \
522DEFN_ASN_OP_T(op, float) \
523DEFN_ASN_OP_T(op, double) \
524DEFN_ASN_OP_T(op, const char *) \
525DEFN_ASN_OP_T(op, const sc_fxval &) \
526DEFN_ASN_OP_T(op, const sc_fxval_fast &) \
527DEFN_ASN_OP_T(op, const sc_fxnum &) \
528DEFN_ASN_OP_T(op, const sc_fxnum_fast &) \
549#undef DEFN_ASN_OP_OTHER
553template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
560template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
567template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
575template<
int W,
int I, sc_q_mode Q, sc_o_mode O,
int N>
sc_ufix_fast & operator--()
sc_ufix_fast & operator=(const sc_ufix_fast &)
sc_ufix_fast & operator++()
sc_ufix & operator=(const sc_ufix &)
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 > &)
sc_ufixed(sc_fxnum_observer *=0)
sc_ufixed & operator=(const sc_ufixed< W, I, Q, O, N > &)
const sc_q_mode SC_DEFAULT_Q_MODE_
const sc_o_mode SC_DEFAULT_O_MODE_
const int SC_DEFAULT_N_BITS_
#define DEFN_ASN_OP_T(op, tp)
#define DECL_CTORS_T_A(tp)
#define DECL_CTORS_T_B(tp)
#define DECL_ASN_OP_T(op, tp)