94class sc_signed_subref_r;
95class sc_unsigned_subref_r;
122 inline bool operator == (
const sc_int_base& a,
const sc_int_base&
b );
124 inline bool operator != (
const sc_int_base& a,
const sc_int_base&
b );
126 inline bool operator < (
const sc_int_base& a,
const sc_int_base&
b );
128 inline bool operator <= (
const sc_int_base& a,
const sc_int_base&
b );
130 inline bool operator > (
const sc_int_base& a,
const sc_int_base&
b );
132 inline bool operator >= (
const sc_int_base& a,
const sc_int_base&
b );
178#ifdef SC_DT_DEPRECATED
186 {
if (xz_present_p) *xz_present_p =
false;
return 1; }
192 dst_p[word_i] &= ~bit_mask;
203 dst_p[word_i] |= bit_mask;
208 dst_p[word_i] &= ~bit_mask;
214 {
return operator uint64(); }
222 bool operator ! ()
const;
229 {
return operator uint64(); }
232 {
return operator uint64(); }
237 void print( ::std::ostream& os = ::std::cout )
const
302 void scan( ::std::istream& is = ::std::cin );
322 friend class sc_int_signal;
358 {
return ( m_left - m_right + 1 ); }
360#ifdef SC_DT_DEPRECATED
368 {
if ( xz_present_p ) *xz_present_p =
false;
return length(); }
411 unsigned int to_uint()
const;
412 long to_long()
const;
413 unsigned long to_ulong()
const;
414 int64 to_int64()
const;
416 double to_double()
const;
427 void print( ::std::ostream& os = ::std::cout )
const
479 {
return operator = ( a.operator
uint_type() ); }
482 {
return operator = ( a.operator
uint_type() ); }
486 {
return operator = ( a->to_int64() ); }
491 {
return operator = ( (
int_type) a ); }
494 {
return operator = ( (
int_type) a ); }
497 {
return operator = ( (
int_type) a ); }
500 {
return operator = ( (
int_type) a ); }
503 {
return operator = ( (
int_type) a ); }
506 {
return operator = ( (
int_type) a ); }
522 void scan( ::std::istream& is = ::std::cin );
549 void invalid_length()
const;
550 void invalid_index(
int i )
const;
551 void invalid_range(
int l,
int r )
const;
553 void check_length()
const
554 {
if( m_len <= 0 || m_len >
SC_INTWIDTH ) { invalid_length(); } }
556 void check_index(
int i )
const
557 {
if( i < 0 || i >= m_len ) { invalid_index( i ); } }
559 void check_range(
int l,
int r )
const
560 {
if( r < 0 || l >= m_len || l < r ) { invalid_range( l, r ); } }
562 void check_value()
const;
569 if ( m_val & (1ull << (m_len-1)) ) {
570 m_val |= (~UINT_ZERO << (m_len-1));
573 m_val &= ( ~UINT_ZERO >> m_ulen );
582 : m_val( 0 ), m_len( w ), m_ulen(
SC_INTWIDTH - m_len )
586 : m_val( v ), m_len( w ), m_ulen(
SC_INTWIDTH - m_len )
587 { check_length(); extend_sign(); }
595 : m_val( a ), m_len( a.length() ),
601 m_val( a->to_int64() ), m_len( a->length() ),
603 { check_length(); extend_sign(); }
623 { m_val = v; extend_sign();
return *
this; }
626 { m_val = a.
m_val; extend_sign();
return *
this; }
629 { m_val = a; extend_sign();
return *
this; }
633 { m_val = a->to_int64(); extend_sign();
return *
this; }
654 { m_val = a; extend_sign();
return *
this; }
657 { m_val = a; extend_sign();
return *
this; }
660 { m_val = a; extend_sign();
return *
this; }
663 { m_val = a; extend_sign();
return *
this; }
666 { m_val = a; extend_sign();
return *
this; }
669 { m_val = (
int_type) a; extend_sign();
return *
this; }
675 { m_val += v; extend_sign();
return *
this; }
678 { m_val -= v; extend_sign();
return *
this; }
681 { m_val *= v; extend_sign();
return *
this; }
684 { m_val /= v; extend_sign();
return *
this; }
687 { m_val %= v; extend_sign();
return *
this; }
693 { m_val &= v; extend_sign();
return *
this; }
696 { m_val |= v; extend_sign();
return *
this; }
699 { m_val ^= v; extend_sign();
return *
this; }
703 { m_val <<= v; extend_sign();
return *
this; }
706 { m_val >>= v;
return *
this; }
712 { ++ m_val; extend_sign();
return *
this; }
715 {
sc_int_base tmp( *
this ); ++ m_val; extend_sign();
return tmp; }
718 { -- m_val; extend_sign();
return *
this; }
721 {
sc_int_base tmp( *
this ); -- m_val; extend_sign();
return tmp; }
778 {
return ( 0 != (m_val & (
UINT_ONE << i)) ); }
792#ifdef SC_DT_DEPRECATED
800 {
if ( xz_present_p ) *xz_present_p =
false;
return length(); }
847 {
return (
int) m_val; }
850 {
return (
unsigned int) m_val; }
853 {
return (
long) m_val; }
856 {
return (
unsigned long) m_val; }
859 {
return (
int64) m_val; }
862 {
return (
uint64) m_val; }
865 {
return (
double) m_val; }
882 void print( ::std::ostream& os = ::std::cout )
const
885 void scan( ::std::istream& is = ::std::cin );
917 return m_obj_p->test( m_index );
1038 int uright = uleft + m_right;
1039 return ( val << uleft >> uright );
1076 int result =
static_cast<int>(
operator uint_type());
1084 unsigned int result =
static_cast<unsigned int>(
operator uint_type());
1092 long result =
static_cast<long>(
operator uint_type());
1100 unsigned long result =
static_cast<unsigned long>(
operator uint_type());
1124 double result =
static_cast<double>(
operator uint_type());
1225 return ( *
this = aa = a );
1295 check_range( left, right );
1305 check_range( left, right );
1316 check_range( left, right );
1326 check_range( left, right );
#define SC_DIGIT_INDEX(BIT_INDEX)
#define SC_BIT_INDEX(BIT)
#define SC_API_TEMPLATE_DECL_
bool operator>=(const sc_int_base &a, const sc_int_base &b)
sc_numrep sc_io_base(systemc_ostream &stream_object, sc_numrep def_base)
X & operator|=(sc_proxy< X > &px, const sc_proxy< Y > &py)
bool sc_io_show_base(systemc_ostream &stream_object)
sc_proxy< X >::value_type or_reduce(const sc_proxy< X > &a)
sc_proxy< X >::value_type xor_reduce(const sc_proxy< X > &a)
constexpr uint64 UINT_ONE
X & operator^=(sc_proxy< X > &px, const sc_proxy< Y > &py)
constexpr uint64 UINT64_32ONES
unsigned long long uint64
bool operator==(const sc_bit &a, const sc_bit &b)
bool operator<(const sc_int_base &a, const sc_int_base &b)
sc_proxy< X >::value_type nor_reduce(const sc_proxy< X > &a)
SC_API std::string to_string(sc_enc)
bool operator<=(const sc_int_base &a, const sc_int_base &b)
X & operator&=(sc_proxy< X > &px, const sc_proxy< Y > &py)
bool operator!=(const sc_bit &a, const sc_bit &b)
inline::std::istream & operator>>(::std::istream &is, sc_bit &a)
sc_proxy< X >::value_type and_reduce(const sc_proxy< X > &a)
SC_API const uint_type mask_int[SC_INTWIDTH][SC_INTWIDTH]
bool operator>(const sc_int_base &a, const sc_int_base &b)
inline::std::ostream & operator<<(::std::ostream &os, const sc_bit &a)
uint64 const sc_uint_base int b
sc_proxy< X >::value_type xnor_reduce(const sc_proxy< X > &a)
sc_proxy< X >::value_type nand_reduce(const sc_proxy< X > &a)
sc_bit operator~(const sc_bit &a)
sc_int_bitref_r(const sc_int_bitref_r &a)
virtual bool concat_get_data(sc_digit *dst_p, int low_i) const
void initialize(const sc_int_base *obj_p, int index_)
virtual uint64 concat_get_uint64() const
void print(::std::ostream &os=::std::cout) const
virtual ~sc_int_bitref_r()
virtual bool concat_get_ctrl(sc_digit *dst_p, int low_i) const
virtual int concat_length(bool *xz_present_p) const
sc_int_bitref & operator^=(bool b)
sc_int_bitref & operator=(const sc_int_bitref_r &b)
virtual void concat_set(uint64 src, int low_i)
virtual void concat_set(const sc_signed &src, int low_i)
sc_int_bitref & operator|=(bool b)
void scan(::std::istream &is=::std::cin)
sc_int_bitref & operator&=(bool b)
virtual void concat_set(int64 src, int low_i)
sc_int_bitref(const sc_int_bitref &a)
virtual void concat_set(const sc_unsigned &src, int low_i)
virtual ~sc_int_subref_r()
virtual bool concat_get_ctrl(sc_digit *dst_p, int low_i) const
virtual bool concat_get_data(sc_digit *dst_p, int low_i) const
const std::string to_string(sc_numrep numrep=SC_DEC) const
unsigned long to_ulong() const
virtual uint64 concat_get_uint64() const
void initialize(const sc_int_base *obj_p, int left_i, int right_i)
unsigned int to_uint() const
sc_int_subref_r(const sc_int_subref_r &a)
void print(::std::ostream &os=::std::cout) const
virtual int concat_length(bool *xz_present_p) const
virtual void concat_set(const sc_unsigned &src, int low_i)
virtual void concat_set(uint64 src, int low_i)
sc_int_subref(const sc_int_subref &a)
sc_int_subref & operator=(int_type v)
virtual void concat_set(const sc_signed &src, int low_i)
virtual void concat_set(int64 src, int low_i)
void scan(::std::istream &is=::std::cin)
sc_int_base(const sc_int_subref_r &a)
virtual uint64 concat_get_uint64() const
sc_int_base(const sc_unsigned &a)
const std::string to_string(sc_numrep numrep, bool w_prefix) const
sc_int_base(const sc_signed_subref_r &v)
sc_int_base(int_type v, int w)
virtual void concat_set(const sc_signed &src, int low_i)
sc_int_base(const sc_int_base &a)
sc_int_subref & operator()(int left, int right)
virtual void concat_set(uint64 src, int low_i)
sc_int_base(const sc_lv_base &v)
virtual bool concat_get_data(sc_digit *dst_p, int low_i) const
sc_int_base(const sc_signed &a)
sc_int_bitref & operator[](int i)
void scan(::std::istream &is=::std::cin)
sc_int_bitref * temporary_bitref() const
virtual void concat_set(const sc_unsigned &src, int low_i)
unsigned long to_ulong() const
virtual int concat_length(bool *xz_present_p) const
sc_int_base(const sc_uint_subref_r &v)
sc_int_bitref & bit(int i)
virtual void concat_set(int64 src, int low_i)
sc_int_subref * temporary_subref() const
sc_int_base(const sc_unsigned_subref_r &v)
unsigned int to_uint() const
void print(::std::ostream &os=::std::cout) const
sc_int_base(int w=sc_length_param().len())
virtual bool concat_get_ctrl(sc_digit *dst_p, int low_i) const
sc_int_base(const sc_bv_base &v)
sc_int_base(const sc_generic_base< T > &a)
sc_int_subref & range(int left, int right)
const std::string to_string(sc_numrep numrep=SC_DEC) const
const std::string to_string(sc_numrep numrep=SC_DEC) const