Go to the documentation of this file.
68 #ifndef __SYSTEMC_EXT_DT_FX_SCFX_REP_HH__
69 #define __SYSTEMC_EXT_DT_FX_SCFX_REP_HH__
90 void multiply(scfx_rep &,
const scfx_rep &,
const scfx_rep &,
95 scfx_rep *
div_scfx_rep(
const scfx_rep &,
const scfx_rep &,
97 scfx_rep *
add_scfx_rep(
const scfx_rep &,
const scfx_rep &,
99 scfx_rep *
sub_scfx_rep(
const scfx_rep &,
const scfx_rep &,
120 int wi()
const {
return m_wi; }
121 int bi()
const {
return m_bi; }
123 void wi(
int wi_) {
m_wi = wi_; }
166 void *
operator new (std::size_t);
167 void operator delete (
void *, std::size_t);
214 void print(::std::ostream &)
const;
215 void dump(::std::ostream &)
const;
314 m_mant(
min_mant), m_wp(2), m_sign(1), m_state(normal),
315 m_msw(0), m_lsw(0), m_r_flag(false)
342 c.m_sign = -
c.m_sign;
380 for (
int i = 0;
i <
size();
i++) {
399 c.quantization(params, q_flag);
407 c.overflow(params, o_flag);
417 int size_incr = new_size -
size();
450 for (
int i = wi + 1;
i <
size(); ++
i)
456 for (
int i = wi + 1;
i <
size(); ++
i)
484 for (
int i = wi + 1;
i <
size(); ++
i)
499 for (
int i = wi - 1;
i >= 0; --
i)
541 for (
i = wi + 1;
i <
size(); ++
i)
545 for (
i = wi2 - 1;
i >= 0; --
i)
574 for (
int i = wi3 + 1;
i <
size(); ++
i) {
596 for (
int i = wi2 + 1;
i <
size(); ++
i)
625 for (
int i = wi - 1;
i >= 0; --
i)
639 if (
m_mant[wi] <= old_val) {
640 if (wi + 1 ==
size())
643 for (
int i = wi + 1;
i <
size(); ++
i) {
673 for (
int i = wi - 1;
i >= 0; --
i)
675 }
else if (wi != 0) {
677 for (
int i = wi - 2;
i >= 0; --
i)
689 for (
int i = 0;
i <
size();
i++) {
699 for (
int i =
size() - 1;
i >= 0;
i--) {
724 #endif // __SYSTEMC_EXT_DT_FX_SCFX_REP_HH__
scfx_rep * add_scfx_rep(const scfx_rep &lhs, const scfx_rep &rhs, int max_wl)
const int SC_DEFAULT_DIV_WL_
friend void multiply(scfx_rep &, const scfx_rep &, const scfx_rep &, int)
friend void align(const scfx_rep &, const scfx_rep &, int &, int &, scfx_mant_ref &, scfx_mant_ref &)
const scfx_index calc_indices(int) const
bool o_bit_at(const scfx_index &) const
friend void print_dec(scfx_string &, const scfx_rep &, int, sc_fmt)
int cmp_scfx_rep(const scfx_rep &a, const scfx_rep &b)
void quantization(const scfx_params &, bool &)
scfx_rep * div_scfx_rep(const scfx_rep &lhs, const scfx_rep &rhs, int div_wl)
bool clear(int, const scfx_params &)
bool o_zero_left(const scfx_index &) const
friend scfx_rep * add_scfx_rep(const scfx_rep &, const scfx_rep &, int)
void overflow(const scfx_params &, bool &)
void from_string(const char *, int)
friend scfx_rep * overflow_scfx_rep(const scfx_rep &, const scfx_params &, bool &)
void o_invert(const scfx_index &)
void inc(scfx_mant &mant)
void cast(const scfx_params &, bool &, bool &)
scfx_rep * quantization_scfx_rep(const scfx_rep &a, const scfx_params ¶ms, bool &q_flag)
void complement(scfx_mant &target, const scfx_mant &source, int size)
friend scfx_rep * rsh_scfx_rep(const scfx_rep &, int)
unsigned int divide_by_ten()
void operator=(const scfx_rep &)
scfx_mant * resize(int, int) const
friend scfx_rep * sub_scfx_rep(const scfx_rep &, const scfx_rep &, int)
const int SC_DEFAULT_CTE_WL_
void dump(::std::ostream &) const
void resize_to(int, int=0)
scfx_rep * neg_scfx_rep(const scfx_rep &)
friend scfx_rep * neg_scfx_rep(const scfx_rep &)
void q_clear(const scfx_index &)
bool set(int, const scfx_params &)
bool set_slice(int, int, const scfx_params &, const sc_bv_base &)
void o_extend(const scfx_index &, sc_enc)
friend int compare_abs(const scfx_rep &, const scfx_rep &)
void print(::std::ostream &) const
friend scfx_rep * div_scfx_rep(const scfx_rep &, const scfx_rep &, int)
bool q_zero(const scfx_index &) const
void q_incr(const scfx_index &)
friend int compare_msw_ff(const scfx_rep &lhs, const scfx_rep &rhs)
bool q_bit(const scfx_index &) const
const int SC_DEFAULT_MAX_WL_
const char * to_string(sc_numrep, int, sc_fmt, const scfx_params *=0) const
friend scfx_rep * mult_scfx_rep(const scfx_rep &, const scfx_rep &, int)
friend void print_other(scfx_string &, const scfx_rep &, sc_numrep, int, sc_fmt, const scfx_params *)
scfx_index(int wi_, int bi_)
void resize_to(int, int=0)
scfx_rep * mult_scfx_rep(const scfx_rep &, const scfx_rep &, int max_wl=SC_DEFAULT_MAX_WL_)
bool o_zero_right(const scfx_index &) const
bool q_odd(const scfx_index &) const
scfx_rep * sub_scfx_rep(const scfx_rep &lhs, const scfx_rep &rhs, int max_wl)
void multiply(scfx_rep &result, const scfx_rep &lhs, const scfx_rep &rhs, int max_wl)
friend scfx_rep * quantization_scfx_rep(const scfx_rep &, const scfx_params &, bool &)
friend int compare_msw(const scfx_rep &, const scfx_rep &)
scfx_rep * lsh_scfx_rep(const scfx_rep &, int)
scfx_rep * overflow_scfx_rep(const scfx_rep &a, const scfx_params ¶ms, bool &o_flag)
friend int cmp_scfx_rep(const scfx_rep &, const scfx_rep &)
bool rounding_flag() const
void o_set_low(const scfx_index &, sc_enc)
scfx_rep * rsh_scfx_rep(const scfx_rep &, int)
void get_type(int &, int &, sc_enc &) const
#define SC_ASSERT_(cnd, msg)
void o_set(const scfx_index &, const scfx_index &, sc_enc, bool)
void o_set_high(const scfx_index &, const scfx_index &, sc_enc, int=1)
friend scfx_rep * lsh_scfx_rep(const scfx_rep &, int)
bool get_slice(int, int, const scfx_params &, sc_bv_base &) const
Generated on Wed Sep 30 2020 14:02:15 for gem5 by doxygen 1.8.17