gem5  v22.0.0.1
Classes | Namespaces | Macros | Functions
sc_fix.hh File Reference
#include "sc_fxnum.hh"

Go to the source code of this file.

Classes

class  sc_dt::sc_fix
 
class  sc_dt::sc_fix_fast
 

Namespaces

 sc_dt
 

Macros

#define DECL_CTORS_T(tp)
 
#define DECL_CTORS_T_A(tp)
 
#define DECL_CTORS_T_B(tp)
 
#define DECL_ASN_OP_T(op, tp)   sc_fix &operator op (tp);
 
#define DECL_ASN_OP_OTHER(op)
 
#define DECL_ASN_OP(op)
 
#define DECL_CTORS_T(tp)
 
#define DECL_CTORS_T_A(tp)
 
#define DECL_CTORS_T_B(tp)
 
#define DECL_ASN_OP_T(op, tp)   sc_fix_fast &operator op (tp);
 
#define DECL_ASN_OP_OTHER(op)
 
#define DECL_ASN_OP(op)
 
#define DEFN_CTORS_T_A(tp)
 
#define DEFN_CTORS_T_B(tp)
 
#define DEFN_BIN_OP_T(op, op2, tp1, tp2)
 
#define DEFN_BIN_FNC_T(fnc, op2, tp1, tp2)
 
#define DEFN_ASN_OP_T(op, tp)
 
#define DEFN_ASN_OP_OTHER(op)
 
#define DEFN_ASN_OP(op)
 
#define DEFN_ASN_OP_T(op, op2, tp)
 
#define DEFN_CTORS_T_A(tp)
 
#define DEFN_CTORS_T_B(tp)
 
#define DEFN_BIN_OP_T(op, op2, tp1, tp2)
 
#define DEFN_BIN_FNC_T(fnc, op2, tp1, tp2)
 
#define DEFN_ASN_OP_T(op, tp)
 
#define DEFN_ASN_OP_OTHER(op)
 
#define DEFN_ASN_OP(op)
 
#define DEFN_ASN_OP_T(op, op2, tp)
 

Functions

void sc_dt::b_not (sc_fix &c, const sc_fix &a)
 
void sc_dt::b_not (sc_fix_fast &c, const sc_fix_fast &a)
 

Macro Definition Documentation

◆ DECL_ASN_OP [1/2]

#define DECL_ASN_OP (   op)
Value:
DECL_ASN_OP_T(op, int) \
DECL_ASN_OP_T(op, unsigned int) \
DECL_ASN_OP_T(op, long) \
DECL_ASN_OP_T(op, unsigned long) \
DECL_ASN_OP_T(op, float) \
DECL_ASN_OP_T(op, double) \
DECL_ASN_OP_T(op, const char *) \
DECL_ASN_OP_T(op, const sc_fxval &) \
DECL_ASN_OP_T(op, const sc_fxval_fast &) \
DECL_ASN_OP_T(op, const sc_fxnum &) \
DECL_ASN_OP_T(op, const sc_fxnum_fast &) \
DECL_ASN_OP_OTHER(op)

Definition at line 386 of file sc_fix.hh.

◆ DECL_ASN_OP [2/2]

#define DECL_ASN_OP (   op)
Value:
DECL_ASN_OP_T(op, int) \
DECL_ASN_OP_T(op, unsigned int) \
DECL_ASN_OP_T(op, long) \
DECL_ASN_OP_T(op, unsigned long) \
DECL_ASN_OP_T(op, float) \
DECL_ASN_OP_T(op, double) \
DECL_ASN_OP_T(op, const char *) \
DECL_ASN_OP_T(op, const sc_fxval &) \
DECL_ASN_OP_T(op, const sc_fxval_fast &) \
DECL_ASN_OP_T(op, const sc_fxnum &) \
DECL_ASN_OP_T(op, const sc_fxnum_fast &) \
DECL_ASN_OP_OTHER(op)

Definition at line 386 of file sc_fix.hh.

◆ DECL_ASN_OP_OTHER [1/2]

#define DECL_ASN_OP_OTHER (   op)
Value:
DECL_ASN_OP_T(op, uint64) \
DECL_ASN_OP_T(op, const sc_int_base &) \
DECL_ASN_OP_T(op, const sc_uint_base &) \
DECL_ASN_OP_T(op, const sc_signed &) \
DECL_ASN_OP_T(op, const sc_unsigned &)

Definition at line 378 of file sc_fix.hh.

◆ DECL_ASN_OP_OTHER [2/2]

#define DECL_ASN_OP_OTHER (   op)
Value:
DECL_ASN_OP_T(op, uint64) \
DECL_ASN_OP_T(op, const sc_int_base &) \
DECL_ASN_OP_T(op, const sc_uint_base &) \
DECL_ASN_OP_T(op, const sc_signed &) \
DECL_ASN_OP_T(op, const sc_unsigned &)

Definition at line 378 of file sc_fix.hh.

◆ DECL_ASN_OP_T [1/2]

#define DECL_ASN_OP_T (   op,
  tp 
)    sc_fix &operator op (tp);

Definition at line 376 of file sc_fix.hh.

◆ DECL_ASN_OP_T [2/2]

#define DECL_ASN_OP_T (   op,
  tp 
)    sc_fix_fast &operator op (tp);

Definition at line 376 of file sc_fix.hh.

◆ DECL_CTORS_T [1/2]

#define DECL_CTORS_T (   tp)
Value:
sc_fix(tp, int, int, sc_fxnum_observer * =0); \
sc_fix(tp, sc_q_mode, sc_o_mode, sc_fxnum_observer * =0); \
sc_fix(tp, sc_q_mode, sc_o_mode, int, sc_fxnum_observer * =0); \
sc_fix(tp, int, int, sc_q_mode, sc_o_mode, sc_fxnum_observer * =0); \
sc_fix(tp, int, int, sc_q_mode, sc_o_mode, int, sc_fxnum_observer * =0); \
sc_fix(tp, const sc_fxcast_switch &, sc_fxnum_observer * =0); \
sc_fix(tp, int, int, const sc_fxcast_switch &, sc_fxnum_observer * =0); \
sc_fix(tp, sc_q_mode, sc_o_mode, const sc_fxcast_switch &, \
sc_fxnum_observer * =0); \
sc_fix(tp, sc_q_mode, sc_o_mode, int, const sc_fxcast_switch &, \
sc_fxnum_observer * =0); \
sc_fix(tp, int, int, sc_q_mode, sc_o_mode, const sc_fxcast_switch &, \
sc_fxnum_observer * =0); \
sc_fix(tp, int, int, sc_q_mode, sc_o_mode, int, \
const sc_fxcast_switch &, sc_fxnum_observer * =0); \
sc_fix(tp, const sc_fxtype_params &, sc_fxnum_observer * =0); \
sc_fix(tp, const sc_fxtype_params &, const sc_fxcast_switch &, \
sc_fxnum_observer * =0);

Definition at line 297 of file sc_fix.hh.

◆ DECL_CTORS_T [2/2]

#define DECL_CTORS_T (   tp)
Value:
sc_fix_fast(tp, int, int, sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, sc_q_mode, sc_o_mode, sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, sc_q_mode, sc_o_mode, int, sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, int, int, sc_q_mode, sc_o_mode, \
sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, int, int, sc_q_mode, sc_o_mode, int, \
sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, const sc_fxcast_switch &, sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, int, int, const sc_fxcast_switch &, \
sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, sc_q_mode, sc_o_mode, const sc_fxcast_switch &, \
sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, sc_q_mode, sc_o_mode, int, const sc_fxcast_switch &, \
sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, int, int, sc_q_mode, sc_o_mode, const sc_fxcast_switch &, \
sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, int, int, sc_q_mode, sc_o_mode, int, \
const sc_fxcast_switch &, sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, const sc_fxtype_params &, sc_fxnum_fast_observer * = 0); \
sc_fix_fast(tp, const sc_fxtype_params &, const sc_fxcast_switch &, \
sc_fxnum_fast_observer * = 0);

Definition at line 297 of file sc_fix.hh.

◆ DECL_CTORS_T_A [1/2]

#define DECL_CTORS_T_A (   tp)
Value:
sc_fix(tp, sc_fxnum_observer * =0); \
DECL_CTORS_T(tp)

Definition at line 320 of file sc_fix.hh.

◆ DECL_CTORS_T_A [2/2]

#define DECL_CTORS_T_A (   tp)
Value:
sc_fix_fast(tp, sc_fxnum_fast_observer * =0); \
DECL_CTORS_T(tp)

Definition at line 320 of file sc_fix.hh.

◆ DECL_CTORS_T_B [1/2]

#define DECL_CTORS_T_B (   tp)
Value:
explicit sc_fix(tp, sc_fxnum_observer * =0); \
DECL_CTORS_T(tp)

Definition at line 324 of file sc_fix.hh.

◆ DECL_CTORS_T_B [2/2]

#define DECL_CTORS_T_B (   tp)
Value:
explicit sc_fix_fast(tp, sc_fxnum_fast_observer * =0); \
DECL_CTORS_T(tp)

Definition at line 324 of file sc_fix.hh.

◆ DEFN_ASN_OP [1/2]

#define DEFN_ASN_OP (   op)
Value:
DEFN_ASN_OP_T(op, unsigned int) \
DEFN_ASN_OP_T(op, long) \
DEFN_ASN_OP_T(op, unsigned long) \
DEFN_ASN_OP_T(op, float) \
DEFN_ASN_OP_T(op, double) \
DEFN_ASN_OP_T(op, const char *) \
DEFN_ASN_OP_T(op, const sc_fxval &) \
DEFN_ASN_OP_T(op, const sc_fxval_fast &) \
DEFN_ASN_OP_T(op, const sc_fxnum &) \
DEFN_ASN_OP_T(op, const sc_fxnum_fast &) \
DEFN_ASN_OP_OTHER(op)

Definition at line 1294 of file sc_fix.hh.

◆ DEFN_ASN_OP [2/2]

#define DEFN_ASN_OP (   op)
Value:
DEFN_ASN_OP_T(op, unsigned int) \
DEFN_ASN_OP_T(op, long) \
DEFN_ASN_OP_T(op, unsigned long) \
DEFN_ASN_OP_T(op, float) \
DEFN_ASN_OP_T(op, double) \
DEFN_ASN_OP_T(op, const char *) \
DEFN_ASN_OP_T(op, const sc_fxval &) \
DEFN_ASN_OP_T(op, const sc_fxval_fast &) \
DEFN_ASN_OP_T(op, const sc_fxnum &) \
DEFN_ASN_OP_T(op, const sc_fxnum_fast &) \
DEFN_ASN_OP_OTHER(op)

Definition at line 1294 of file sc_fix.hh.

◆ DEFN_ASN_OP_OTHER [1/2]

#define DEFN_ASN_OP_OTHER (   op)
Value:
DEFN_ASN_OP_T(op, uint64) \
DEFN_ASN_OP_T(op, const sc_int_base &) \
DEFN_ASN_OP_T(op, const sc_uint_base &) \
DEFN_ASN_OP_T(op, const sc_signed &) \
DEFN_ASN_OP_T(op, const sc_unsigned &)

Definition at line 1286 of file sc_fix.hh.

◆ DEFN_ASN_OP_OTHER [2/2]

#define DEFN_ASN_OP_OTHER (   op)
Value:
DEFN_ASN_OP_T(op, uint64) \
DEFN_ASN_OP_T(op, const sc_int_base &) \
DEFN_ASN_OP_T(op, const sc_uint_base &) \
DEFN_ASN_OP_T(op, const sc_signed &) \
DEFN_ASN_OP_T(op, const sc_unsigned &)

Definition at line 1286 of file sc_fix.hh.

◆ DEFN_ASN_OP_T [1/4]

#define DEFN_ASN_OP_T (   op,
  op2,
  tp 
)
Value:
inline sc_fix & \
sc_fix::operator op (const tp &b) \
{ \
SC_FXNUM_OBSERVER_READ_(*this) \
b.observer_read(); \
int iwl_c = iwl(); \
for (int i = iwl_c - wl(); i < iwl_c; ++i) \
set_bit(i, get_bit(i) op2 b.get_bit(i)); \
cast(); \
SC_FXNUM_OBSERVER_WRITE_(*this) \
return *this; \
}

Definition at line 1322 of file sc_fix.hh.

◆ DEFN_ASN_OP_T [2/4]

#define DEFN_ASN_OP_T (   op,
  op2,
  tp 
)
Value:
inline sc_fix_fast & \
sc_fix_fast::operator op (const tp &b) \
{ \
SC_FXNUM_FAST_OBSERVER_READ_(*this) \
b.observer_read(); \
int iwl_c = iwl(); \
for (int i = iwl_c - wl(); i < iwl_c; ++i) \
set_bit(i, get_bit(i) op2 b.get_bit(i)); \
cast(); \
SC_FXNUM_FAST_OBSERVER_WRITE_(*this) \
return *this; \
}

Definition at line 1322 of file sc_fix.hh.

◆ DEFN_ASN_OP_T [3/4]

#define DEFN_ASN_OP_T (   op,
  tp 
)
Value:
inline sc_fix & \
sc_fix::operator op (tp a) \
{ \
sc_fxnum::operator op(a); \
return *this; \
}

Definition at line 1322 of file sc_fix.hh.

◆ DEFN_ASN_OP_T [4/4]

#define DEFN_ASN_OP_T (   op,
  tp 
)
Value:
inline sc_fix_fast & \
sc_fix_fast::operator op (tp a) \
{ \
sc_fxnum_fast::operator op(a); \
return *this; \
}

Definition at line 1322 of file sc_fix.hh.

◆ DEFN_BIN_FNC_T [1/2]

#define DEFN_BIN_FNC_T (   fnc,
  op2,
  tp1,
  tp2 
)
Value:
inline void \
fnc (sc_fix &c, const tp1 &a, const tp2 &b) \
{ \
a.observer_read(); \
b.observer_read(); \
int iwl_c = c.iwl(); \
for (int i = iwl_c - c.wl(); i < iwl_c; ++i) \
c.set_bit(i, a.get_bit(i) op2 b.get_bit(i)); \
c.cast(); \
SC_FXNUM_OBSERVER_WRITE_(c) \
}

Definition at line 1251 of file sc_fix.hh.

◆ DEFN_BIN_FNC_T [2/2]

#define DEFN_BIN_FNC_T (   fnc,
  op2,
  tp1,
  tp2 
)
Value:
inline void \
fnc(sc_fix_fast &c, const tp1 &a, const tp2 &b) \
{ \
a.observer_read(); \
b.observer_read(); \
int iwl_c = c.iwl(); \
for (int i = iwl_c - c.wl(); i < iwl_c; ++i) \
c.set_bit(i, a.get_bit(i) op2 b.get_bit(i)); \
c.cast(); \
SC_FXNUM_FAST_OBSERVER_WRITE_(c) \
}

Definition at line 1251 of file sc_fix.hh.

◆ DEFN_BIN_OP_T [1/2]

#define DEFN_BIN_OP_T (   op,
  op2,
  tp1,
  tp2 
)
Value:
inline const sc_fix \
operator op (const tp1 &a, const tp2 &b) \
{ \
a.observer_read(); \
b.observer_read(); \
int iwl_a = a.iwl(); \
int iwl_b = b.iwl(); \
int iwl_c = sc_max(iwl_a, iwl_b); \
int fwl_c = sc_max(a.wl() - iwl_a, b.wl() - iwl_b); \
sc_fix c(iwl_c + fwl_c, iwl_c); \
for (int i = -fwl_c; i < iwl_c; ++ i) \
c.set_bit(i, a.get_bit(i) op2 b.get_bit(i)); \
return sc_fix(c, iwl_c + fwl_c, iwl_c); \
}

Definition at line 1228 of file sc_fix.hh.

◆ DEFN_BIN_OP_T [2/2]

#define DEFN_BIN_OP_T (   op,
  op2,
  tp1,
  tp2 
)
Value:
inline const sc_fix_fast \
operator op (const tp1 &a, const tp2 &b) \
{ \
a.observer_read(); \
b.observer_read(); \
int iwl_a = a.iwl(); \
int iwl_b = b.iwl(); \
int iwl_c = sc_max(iwl_a, iwl_b); \
int fwl_c = sc_max(a.wl() - iwl_a, b.wl() - iwl_b); \
sc_fix_fast c(iwl_c + fwl_c, iwl_c); \
for (int i = -fwl_c; i < iwl_c; ++i) \
c.set_bit(i, a.get_bit(i) op2 b.get_bit(i)); \
return sc_fix_fast(c, iwl_c + fwl_c, iwl_c); \
}

Definition at line 1228 of file sc_fix.hh.

◆ DEFN_CTORS_T_A [1/2]

#define DEFN_CTORS_T_A (   tp)

Definition at line 993 of file sc_fix.hh.

◆ DEFN_CTORS_T_A [2/2]

#define DEFN_CTORS_T_A (   tp)

Definition at line 993 of file sc_fix.hh.

◆ DEFN_CTORS_T_B [1/2]

#define DEFN_CTORS_T_B (   tp)

Definition at line 1084 of file sc_fix.hh.

◆ DEFN_CTORS_T_B [2/2]

#define DEFN_CTORS_T_B (   tp)

Definition at line 1084 of file sc_fix.hh.

DECL_ASN_OP_T
#define DECL_ASN_OP_T(op, tp)
Definition: sc_fix.hh:376
sc_dt::sc_o_mode
sc_o_mode
Definition: sc_fxdefs.hh:117
sc_fix
#define sc_fix
Definition: fx_precision_double.h:63
gem5::ArmISA::a
Bitfield< 8 > a
Definition: misc_types.hh:66
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:67
gem5::VegaISA::c
Bitfield< 2 > c
Definition: pagetable.hh:63
gem5::ArmISA::b
Bitfield< 7 > b
Definition: misc_types.hh:382
DEFN_ASN_OP_T
#define DEFN_ASN_OP_T(op, tp)
Definition: sc_fix.hh:1322
sc_dt::uint64
uint64_t uint64
Definition: sc_nbdefs.hh:206
sc_dt::sc_q_mode
sc_q_mode
Definition: sc_fxdefs.hh:91
sc_dt::int64
int64_t int64
Definition: sc_nbdefs.hh:205
sc_fxval
#define sc_fxval
Definition: fx_precision_double.h:65
sc_dt::sc_max
const T sc_max(const T &a, const T &b)
Definition: functions.hh:56
gem5::X86ISA::op
Bitfield< 4 > op
Definition: types.hh:83

Generated on Sat Jun 18 2022 08:12:54 for gem5 by doxygen 1.8.17