82template <
class X>
class sc_proxy;
87template <
class X>
class sc_bitref_r;
88template <
class X>
class sc_bitref;
89template <
class X>
class sc_subref_r;
90template <
class X>
class sc_subref;
91template <
class X,
class Y>
class sc_concref_r;
92template <
class X,
class Y>
class sc_concref;
105template <
class X,
class Y>
113template <
class X,
class T>
180 , typename Y::traits_type >
185 , typename Y::traits_type >
212 {
return static_cast<X&
>( *this ); }
215 {
return static_cast<const X&
>( *this ); }
508#ifdef SC_DT_DEPRECATED
510 int to_signed()
const
521 void print( ::std::ostream& os = ::std::cout )
const
531 void scan( ::std::istream& is = ::std::cin );
546template <
class X,
class Y>
552template <
class X,
class Y>
558#define DECL_BITWISE_AND_OP_T(tp) \
562operator & ( tp b, const sc_proxy<X>& px );
578#undef DECL_BITWISE_AND_OP_T
583template <
class X,
class Y>
586operator |= ( sc_proxy<X>& px,
const sc_proxy<Y>& py );
589template <
class X,
class Y>
592operator | (
const sc_proxy<X>& px,
const sc_proxy<Y>& py );
595#define DECL_BITWISE_OR_OP_T(tp) \
599operator | ( tp a, const sc_proxy<X>& px );
615#undef DECL_BITWISE_OR_OP_T
620template <
class X,
class Y>
623operator ^= ( sc_proxy<X>& px,
const sc_proxy<Y>& py );
626template <
class X,
class Y>
629operator ^ (
const sc_proxy<X>& px,
const sc_proxy<Y>& py );
632#define DECL_BITWISE_XOR_OP_T(tp) \
636operator ^ ( tp a, const sc_proxy<X>& px );
652#undef DECL_BITWISE_XOR_OP_T
657template <
class X,
class Y>
660operator == (
const sc_proxy<X>& px,
const sc_proxy<Y>& py );
662template <
class X,
class Y>
665operator != (
const sc_proxy<X>& px,
const sc_proxy<Y>& py );
668#define DECL_REL_OP_T(tp) \
672operator == ( tp b, const sc_proxy<X>& px ); \
677operator != ( const sc_proxy<X>& px, tp b ); \
682operator != ( tp b, const sc_proxy<X>& px );
715 x_dw = x.get_word( wi );
716 x_cw = x.get_cword( wi );
724 x.set_word( wi, x_dw );
725 x.set_cword( wi, x_cw );
735 for(
int i = wi; i < sz; ++ i ) {
743template <
class X,
class Y>
748 if( (
void*) &px != (
void*) &py ) {
752 int min_sz =
sc_min( sz, y.size() );
754 for( ; i < min_sz; ++ i ) {
755 set_words_( x, i, y.get_word( i ), y.get_cword( i ) );
769template <
class X,
class T>
776 int len_x = x.length();
777 int len_a = a.length();
778 if ( len_a > len_x ) len_a = len_x;
779 for( i = 0 ; i < len_a; ++ i ) {
782 for( ; i < len_x; ++ i ) {
797 if ( len_a > len_x ) len_a = len_x;
798 for( i = 0 ; i < len_a; ++ i ) {
801 for( ; i < len_x; ++ i ) {
814 int len_x = x.length();
816 if ( len_a > len_x ) len_a = len_x;
817 for( i = 0 ; i < len_a; ++ i ) {
820 for( ; i < len_x; ++ i ) {
832 int len_x = x.length();
834 if ( len_a > len_x ) len_a = len_x;
835 for( i = 0 ; i < len_a; ++ i ) {
838 for( ; i < len_x; ++ i ) {
850 int len_x = x.length();
852 if ( len_a > len_x ) len_a = len_x;
853 for( i = 0 ; i < len_a; ++ i ) {
856 for( ; i < len_x; ++ i ) {
871 int len = x.length();
872 int s_len = s.length() - 1;
873 int min_len =
sc_min( len, s_len );
875 for( ; i < min_len; ++ i ) {
876 char c = s[s_len - i - 1];
882 for( ; i < len; ++ i ) {
883 x.set_bit( i, fill );
895 int len = x.length();
896 for(
int i = 0; i < len; ++ i ) {
909 int len = x.length();
910 for(
int i = 0; i < len; ++ i ) {
911 x.set_bit( i, a[i].
value() );
942#if defined(SC_LONG_64)
1013 if( x.size() > 1 ) {
1031 if( x.size() > 1 ) {
1054 for(
int i = 0; i < sz; ++ i ) {
1057 x.set_word( i, x_cw | ~x_dw );
1066template <
class X,
class Y>
1075 for(
int i = 0; i < sz; ++ i ) {
1079 sc_digit cw = (x_dw & y_cw) | (x_cw & y_dw) | (x_cw & y_cw);
1090template <
class X,
class Y>
1099 for(
int i = 0; i < sz; ++ i ) {
1103 sc_digit cw = (x_cw & y_cw) | (x_cw & ~y_dw) | (~x_dw & y_cw);
1114template <
class X,
class Y>
1120 const Y& y =
b.back_cast();
1123 for(
int i = 0; i < sz; ++ i ) {
1146 "positive shift values, shift value = ", n );
1149 if( n >= x.length() ) {
1160 for( ; i >= wn; -- i ) {
1161 set_words_( x, i, x.get_word( i - wn ), x.get_cword( i - wn ) );
1163 for( ; i >= 0; -- i ) {
1169 for(
int i = sz - 1; i >= 1; -- i ) {
1200 "positive shift values, shift value = ", n );
1203 if( n >= x.length() ) {
1214 for( ; i < (sz - wn); ++ i ) {
1215 set_words_( x, i, x.get_word( i + wn ), x.get_cword( i + wn ) );
1217 for( ; i < sz; ++ i ) {
1223 for(
int i = 0; i < (sz - 1); ++ i ) {
1267 int len = x.length();
1268 int half_len = len / 2;
1269 for(
int i = 0, j = len - 1; i < half_len; ++ i, --j ) {
1271 x.set_bit( i, x.get_bit( j ) );
1290 const X& x = back_cast();
1292 int len = x.length();
1293 for(
int i = 0; i < len; ++ i ) {
1304 const X& x = back_cast();
1306 int len = x.length();
1307 for(
int i = 0; i < len; ++ i ) {
1318 const X& x = back_cast();
1320 int len = x.length();
1321 for(
int i = 0; i < len; ++ i ) {
1330template <
class X,
class Y>
1335 return !( px == py );
1339#define DEFN_REL_OP_T(tp) \
1343operator == ( tp b, const sc_proxy<X>& px ) \
1345 return ( px == b ); \
1351operator != ( const sc_proxy<X>& px, tp b ) \
1353 return !( px == b ); \
1359operator != ( tp b, const sc_proxy<X>& px ) \
1361 return !( px == b ); \
1388 const X& x = back_cast();
1389 int len = x.length();
1391 for(
int i = 0; i < len; ++ i ) {
1423 back_cast() = s.c_str();
1432 if( n < 0 || n >= back_cast().length() ) {
1443 if( n < 0 || n >= back_cast().size() ) {
1457 const X& x = back_cast();
1458 int len = x.length();
#define DECL_REL_OP_T(tp)
#define DECL_BITWISE_AND_OP_T(tp)
#define DEFN_REL_OP_T(tp)
#define DECL_BITWISE_OR_OP_T(tp)
#define DECL_BITWISE_XOR_OP_T(tp)
#define SC_REPORT_WARNING(msg_type, msg)
const char SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_[]
void assign_v_(sc_proxy< X > &px, const T &a)
const sc_digit SC_DIGIT_ONE
sc_numrep sc_io_base(systemc_ostream &stream_object, sc_numrep def_base)
X & operator|=(sc_proxy< X > &px, const sc_proxy< Y > &py)
sc_lv_base lrotate(const sc_proxy< X > &x, int n)
bool sc_io_show_base(systemc_ostream &stream_object)
sc_proxy< X >::value_type or_reduce(const sc_proxy< X > &a)
X & b_or_assign_(sc_proxy< X > &px, const sc_proxy< Y > &py)
sc_bit operator&(const sc_bit &a, const sc_bit &b)
SC_API std::string convert_to_fmt(const std::string &s, sc_numrep numrep, bool)
sc_proxy< X >::value_type xor_reduce(const sc_proxy< X > &a)
sc_bit operator^(const sc_bit &a, const sc_bit &b)
const sc_digit SC_DIGIT_ZERO
void get_words_(const X &x, int wi, sc_digit &x_dw, sc_digit &x_cw)
void set_words_(X &x, int wi, sc_digit x_dw, sc_digit x_cw)
X & operator^=(sc_proxy< X > &px, const sc_proxy< Y > &py)
unsigned long long uint64
bool operator==(const sc_bit &a, const sc_bit &b)
const T sc_min(const T &a, const T &b)
sc_proxy< X >::value_type nor_reduce(const sc_proxy< X > &a)
SC_API std::string to_string(sc_enc)
SC_API void sc_proxy_out_of_bounds(const char *msg=NULL, int64 val=0)
X & b_and_assign_(sc_proxy< X > &px, const sc_proxy< Y > &py)
sc_lv_base reverse(const sc_proxy< X > &x)
X & b_xor_assign_(sc_proxy< X > &a, const sc_proxy< Y > &b)
sc_lv_base rrotate(const sc_proxy< X > &x, int n)
SC_API std::string convert_to_bin(const char *s)
void assign_p_(sc_proxy< X > &px, const sc_proxy< Y > &py)
X & operator&=(sc_proxy< X > &px, const sc_proxy< Y > &py)
const sc_digit SC_DIGIT_TWO
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)
inline::std::ostream & operator<<(::std::ostream &os, const sc_bit &a)
uint64 const sc_uint_base int b
void extend_sign_w_(X &x, int wi, bool sign)
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, const sc_bit &b)
sc_core::sc_signal_in_if< T > & value(const T &val)
static const sc_logic_value_t or_table[4][4]
static const sc_logic_value_t xor_table[4][4]
static const sc_logic_value_t and_table[4][4]
static const sc_logic_value_t char_to_logic[128]
static const char logic_to_char[4]
static const sc_logic_value_t not_table[4]
std::string to_string() const
X & operator&=(const char *b)
void check_bounds(int n) const
void scan(::std::istream &is=::std::cin)
sc_bitref< X > operator[](int i)
traits_type::value_type value_type
X & operator^=(const char *b)
value_type and_reduce() const
X & assign_(unsigned long a)
X & assign_(const sc_int_base &a)
sc_lv_base operator^(const char *b) const
X & assign_(unsigned int a)
sc_lv_base operator>>(int n) const
X & assign_(const sc_unsigned &a)
sc_bitref_r< X > bit(int i) const
value_type nand_reduce() const
sc_lv_base operator<<(int n) const
unsigned int to_uint() const
value_type or_reduce() const
sc_lv_base operator&(const char *b) const
sc_lv_base operator|(const char *b) const
void check_wbounds(int n) const
sc_bitref< X > bit(int i)
sc_lv_base operator~() const
unsigned long to_ulong() const
value_type nor_reduce() const
std::string to_string(sc_numrep, bool) const
X & assign_(const sc_proxy< Y > &a)
traits_type::bit_type bit_type
X & assign_(const sc_uint_base &a)
X & assign_(const sc_signed &a)
X & assign_(const bool *a)
value_type xor_reduce() const
sc_subref< X > range(int hi, int lo)
sc_subref< X > operator()(int hi, int lo)
sc_subref_r< X > range(int hi, int lo) const
value_type xnor_reduce() const
X & assign_(const char *a)
bool operator==(const char *b) const
sc_proxy_traits< X >::traits_type traits_type
std::string to_string(sc_numrep) const
X & assign_(const sc_logic *a)
void print(::std::ostream &os=::std::cout) const
const X & back_cast() const
X & operator|=(const char *b)
sc_proxy_traits< sc_bv_base > traits_type
sc_proxy_traits< sc_lv_base > traits_type
sc_logic_value_t value_type