クラス テンプレート sc_dt::sc_proxy< X >

#include <sc_proxy.h>

sc_dt::sc_proxy< X >に対する継承グラフ

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

virtual ~sc_proxy ()
X & back_cast ()
const X & back_cast () const
template<class Y>
X & assign_ (const sc_proxy< Y > &a)
X & assign_ (const char *a)
X & assign_ (const bool *a)
X & assign_ (const sc_logic *a)
X & assign_ (const sc_unsigned &a)
X & assign_ (const sc_signed &a)
X & assign_ (const sc_uint_base &a)
X & assign_ (const sc_int_base &a)
X & assign_ (unsigned int a)
X & assign_ (int a)
X & assign_ (unsigned long a)
X & assign_ (long a)
X & assign_ (uint64 a)
X & assign_ (int64 a)
X & b_not ()
const sc_lv_base operator~ () const
X & operator &= (const char *b)
X & operator &= (const bool *b)
X & operator &= (const sc_logic *b)
X & operator &= (const sc_unsigned &b)
X & operator &= (const sc_signed &b)
X & operator &= (const sc_uint_base &b)
X & operator &= (const sc_int_base &b)
X & operator &= (unsigned long b)
X & operator &= (long b)
X & operator &= (unsigned int b)
X & operator &= (int b)
X & operator &= (uint64 b)
X & operator &= (int64 b)
const sc_lv_base operator & (const char *b) const
const sc_lv_base operator & (const bool *b) const
const sc_lv_base operator & (const sc_logic *b) const
const sc_lv_base operator & (const sc_unsigned &b) const
const sc_lv_base operator & (const sc_signed &b) const
const sc_lv_base operator & (const sc_uint_base &b) const
const sc_lv_base operator & (const sc_int_base &b) const
const sc_lv_base operator & (unsigned long b) const
const sc_lv_base operator & (long b) const
const sc_lv_base operator & (unsigned int b) const
const sc_lv_base operator & (int b) const
const sc_lv_base operator & (uint64 b) const
const sc_lv_base operator & (int64 b) const
X & operator|= (const char *b)
X & operator|= (const bool *b)
X & operator|= (const sc_logic *b)
X & operator|= (const sc_unsigned &b)
X & operator|= (const sc_signed &b)
X & operator|= (const sc_uint_base &b)
X & operator|= (const sc_int_base &b)
X & operator|= (unsigned long b)
X & operator|= (long b)
X & operator|= (unsigned int b)
X & operator|= (int b)
X & operator|= (uint64 b)
X & operator|= (int64 b)
const sc_lv_base operator| (const char *b) const
const sc_lv_base operator| (const bool *b) const
const sc_lv_base operator| (const sc_logic *b) const
const sc_lv_base operator| (const sc_unsigned &b) const
const sc_lv_base operator| (const sc_signed &b) const
const sc_lv_base operator| (const sc_uint_base &b) const
const sc_lv_base operator| (const sc_int_base &b) const
const sc_lv_base operator| (unsigned long b) const
const sc_lv_base operator| (long b) const
const sc_lv_base operator| (unsigned int b) const
const sc_lv_base operator| (int b) const
const sc_lv_base operator| (uint64 b) const
const sc_lv_base operator| (int64 b) const
X & operator^= (const char *b)
X & operator^= (const bool *b)
X & operator^= (const sc_logic *b)
X & operator^= (const sc_unsigned &b)
X & operator^= (const sc_signed &b)
X & operator^= (const sc_uint_base &b)
X & operator^= (const sc_int_base &b)
X & operator^= (unsigned long b)
X & operator^= (long b)
X & operator^= (unsigned int b)
X & operator^= (int b)
X & operator^= (uint64 b)
X & operator^= (int64 b)
const sc_lv_base operator^ (const char *b) const
const sc_lv_base operator^ (const bool *b) const
const sc_lv_base operator^ (const sc_logic *b) const
const sc_lv_base operator^ (const sc_unsigned &b) const
const sc_lv_base operator^ (const sc_signed &b) const
const sc_lv_base operator^ (const sc_uint_base &b) const
const sc_lv_base operator^ (const sc_int_base &b) const
const sc_lv_base operator^ (unsigned long b) const
const sc_lv_base operator^ (long b) const
const sc_lv_base operator^ (unsigned int b) const
const sc_lv_base operator^ (int b) const
const sc_lv_base operator^ (uint64 b) const
const sc_lv_base operator^ (int64 b) const
X & operator<<= (int n)
const sc_lv_base operator<< (int n) const
X & operator>>= (int n)
const sc_lv_base operator>> (int n) const
X & lrotate (int n)
X & rrotate (int n)
X & reverse ()
sc_bitref< X > operator[] (int i)
sc_bitref_r< X > operator[] (int i) const
sc_bitref< X > bit (int i)
sc_bitref_r< X > bit (int i) const
sc_subref< X > operator() (int hi, int lo)
sc_subref_r< X > operator() (int hi, int lo) const
sc_subref< X > range (int hi, int lo)
sc_subref_r< X > range (int hi, int lo) const
sc_logic_value_t and_reduce () const
sc_logic_value_t nand_reduce () const
sc_logic_value_t or_reduce () const
sc_logic_value_t nor_reduce () const
sc_logic_value_t xor_reduce () const
sc_logic_value_t xnor_reduce () const
bool operator== (const char *b) const
bool operator== (const bool *b) const
bool operator== (const sc_logic *b) const
bool operator== (const sc_unsigned &b) const
bool operator== (const sc_signed &b) const
bool operator== (const sc_uint_base &b) const
bool operator== (const sc_int_base &b) const
bool operator== (unsigned long b) const
bool operator== (long b) const
bool operator== (unsigned int b) const
bool operator== (int b) const
bool operator== (uint64 b) const
bool operator== (int64 b) const
const std::string to_string () const
const std::string to_string (sc_numrep) const
const std::string to_string (sc_numrep, bool) const
int64 to_int64 () const
uint64 to_uint64 () const
int to_int () const
unsigned int to_uint () const
long to_long () const
unsigned long to_ulong () const
void print (::std::ostream &os=::std::cout) const
void scan (::std::istream &is=::std::cin)

Protected メソッド

void check_bounds (int n) const
void check_wbounds (int n) const
sc_digit to_anything_unsigned () const
int64 to_anything_signed () const


説明

template<class X>
class sc_dt::sc_proxy< X >

sc_proxy.h124 行で定義されています。


コンストラクタとデストラクタ

template<class X>
virtual sc_dt::sc_proxy< X >::~sc_proxy (  )  [inline, virtual]

sc_proxy.h130 行で定義されています。

00130 {}


関数

template<class X>
X& sc_dt::sc_proxy< X >::back_cast (  )  [inline]

sc_proxy.h135 行で定義されています。

00136         { return SCAST<X&>( *this ); }

template<class X>
const X& sc_dt::sc_proxy< X >::back_cast (  )  const [inline]

sc_proxy.h138 行で定義されています。

00139         { return SCAST<const X&>( *this ); }

template<class X>
template<class Y>
X& sc_dt::sc_proxy< X >::assign_ ( const sc_proxy< Y > &  a  )  [inline]

sc_proxy.h145 行で定義されています。

00146         { assign_p_( *this, a ); return back_cast(); }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( const char *  a  )  [inline]

sc_proxy.h790 行で定義されています。

00791 {
00792     X& x = back_cast();
00793     std::string s = convert_to_bin( a );
00794     int len = x.length();
00795     int s_len = s.length() - 1;
00796     int min_len = sc_min( len, s_len );
00797     int i = 0;
00798     for( ; i < min_len; ++ i ) {
00799         char c = s[s_len - i - 1];
00800         x.set_bit( i, sc_logic::char_to_logic[(int)c] );
00801     }
00802     // if formatted, fill the rest with sign(s), otherwise fill with zeros
00803     sc_logic_value_t fill = (s[s_len] == 'F' ? sc_logic_value_t( s[0] - '0' )
00804                                              : sc_logic_value_t( 0 ));
00805     for( ; i < len; ++ i ) {
00806         x.set_bit( i, fill );
00807     }
00808     return x;
00809 }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( const bool *  a  )  [inline]

sc_proxy.h814 行で定義されています。

00815 {
00816     // the length of 'a' must be larger than or equal to the length of 'this'
00817     X& x = back_cast();
00818     int len = x.length();
00819     for( int i = 0; i < len; ++ i ) {
00820         x.set_bit( i, sc_logic_value_t( a[i] ) );
00821     }
00822     return x;
00823 }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( const sc_logic a  )  [inline]

sc_proxy.h828 行で定義されています。

00829 {
00830     // the length of 'a' must be larger than or equal to the length of 'this'
00831     X& x = back_cast();
00832     int len = x.length();
00833     for( int i = 0; i < len; ++ i ) {
00834         x.set_bit( i, a[i].value() );
00835     }
00836     return x;
00837 }

template<class X>
X& sc_dt::sc_proxy< X >::assign_ ( const sc_unsigned a  )  [inline]

sc_proxy.h152 行で定義されています。

00153         { assign_v_( *this, a ); return back_cast(); }

template<class X>
X& sc_dt::sc_proxy< X >::assign_ ( const sc_signed a  )  [inline]

sc_proxy.h155 行で定義されています。

00156         { assign_v_( *this, a ); return back_cast(); }

template<class X>
X& sc_dt::sc_proxy< X >::assign_ ( const sc_uint_base a  )  [inline]

sc_proxy.h158 行で定義されています。

00159         { return assign_( (uint64) a ); }

template<class X>
X& sc_dt::sc_proxy< X >::assign_ ( const sc_int_base a  )  [inline]

sc_proxy.h161 行で定義されています。

00162         { return assign_( (int64) a ); }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( unsigned int  a  )  [inline]

sc_proxy.h842 行で定義されています。

00843 {
00844     X& x = back_cast();
00845     set_words_( x, 0, (sc_digit)a, SC_DIGIT_ZERO );
00846     // extend with zeros
00847     extend_sign_w_( x, 1, false );
00848     x.clean_tail();
00849     return x;
00850 }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( int  a  )  [inline]

sc_proxy.h855 行で定義されています。

00856 {
00857     X& x = back_cast();
00858     set_words_( x, 0, (sc_digit) a, SC_DIGIT_ZERO );
00859     // extend with sign(a)
00860     extend_sign_w_( x, 1, (a < 0) );
00861     x.clean_tail();
00862     return x;
00863 }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( unsigned long  a  )  [inline]

sc_proxy.h906 行で定義されています。

00907     {
00908         X& x = back_cast();
00909         set_words_( x, 0, (sc_digit)a, SC_DIGIT_ZERO );
00910         // extend with zeros
00911         extend_sign_w_( x, 1, false );
00912         x.clean_tail();
00913         return x;
00914     }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( long  a  )  [inline]

sc_proxy.h919 行で定義されています。

00920     {
00921         X& x = back_cast();
00922         set_words_( x, 0, (sc_digit) a, SC_DIGIT_ZERO );
00923         // extend with sign(a)
00924         extend_sign_w_( x, 1, (a < 0) );
00925         x.clean_tail();
00926         return x;
00927     }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( uint64  a  )  [inline]

sc_proxy.h932 行で定義されています。

00933 {
00934     X& x = back_cast();
00935     set_words_( x, 0, ((sc_digit) a & ~SC_DIGIT_ZERO), SC_DIGIT_ZERO );
00936     if( x.size() > 1 ) {
00937         set_words_( x, 1,
00938                     ((sc_digit) (a >> SC_DIGIT_SIZE) & ~SC_DIGIT_ZERO),
00939                     SC_DIGIT_ZERO );
00940         // extend with zeros
00941         extend_sign_w_( x, 2, false );
00942     }
00943     x.clean_tail();
00944     return x;
00945 }

template<class X>
X & sc_dt::sc_proxy< X >::assign_ ( int64  a  )  [inline]

sc_proxy.h950 行で定義されています。

00951 {
00952     X& x = back_cast();
00953     set_words_( x, 0, ((sc_digit) a & ~SC_DIGIT_ZERO), SC_DIGIT_ZERO );
00954     if( x.size() > 1 ) {
00955         set_words_( x, 1,
00956                     ((sc_digit) ((uint64) a >> SC_DIGIT_SIZE) & ~SC_DIGIT_ZERO),
00957                     SC_DIGIT_ZERO );
00958         // extend with sign(a)
00959         extend_sign_w_( x, 2, (a < 0) );
00960     }
00961     x.clean_tail();
00962     return x;
00963 }

template<class X>
X & sc_dt::sc_proxy< X >::b_not (  )  [inline]

sc_proxy.h973 行で定義されています。

00974 {
00975     X& x = back_cast();
00976     int sz = x.size();
00977     for( int i = 0; i < sz; ++ i ) {
00978         sc_digit x_dw, x_cw;
00979         get_words_( x, i, x_dw, x_cw );
00980         x.set_word( i, x_cw | ~x_dw );
00981     }
00982     x.clean_tail();
00983     return x;
00984 }

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator~ (  )  const [inline]

sc_lv_base.h356 行で定義されています。

00357 {
00358     sc_lv_base a( back_cast() );
00359     return a.b_not();
00360 }

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const char *  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const bool *  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const sc_logic b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const sc_unsigned b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const sc_signed b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const sc_uint_base b  )  [inline]

sc_proxy.h192 行で定義されています。

00193         { return operator &= ( (uint64) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( const sc_int_base b  )  [inline]

sc_proxy.h195 行で定義されています。

00196         { return operator &= ( (int64) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( unsigned long  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( long  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( unsigned int  b  )  [inline]

sc_proxy.h201 行で定義されています。

00202         { return operator &= ( (unsigned long) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( int  b  )  [inline]

sc_proxy.h204 行で定義されています。

00205         { return operator &= ( (long) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( uint64  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator &= ( int64  b  ) 

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const char *  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const bool *  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const sc_logic b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const sc_unsigned b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const sc_signed b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const sc_uint_base b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( const sc_int_base b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( unsigned long  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( long  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( unsigned int  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( int  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( uint64  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator & ( int64  b  )  const

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const char *  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const bool *  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const sc_logic b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const sc_unsigned b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const sc_signed b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const sc_uint_base b  )  [inline]

sc_proxy.h234 行で定義されています。

00235         { return operator |= ( (uint64) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( const sc_int_base b  )  [inline]

sc_proxy.h237 行で定義されています。

00238         { return operator |= ( (int64) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( unsigned long  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( long  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( unsigned int  b  )  [inline]

sc_proxy.h243 行で定義されています。

00244         { return operator |= ( (unsigned long) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( int  b  )  [inline]

sc_proxy.h246 行で定義されています。

00247         { return operator |= ( (long) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( uint64  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator|= ( int64  b  ) 

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const char *  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const bool *  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const sc_logic b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const sc_unsigned b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const sc_signed b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const sc_uint_base b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( const sc_int_base b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( unsigned long  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( long  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( unsigned int  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( int  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( uint64  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator| ( int64  b  )  const

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const char *  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const bool *  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const sc_logic b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const sc_unsigned b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const sc_signed b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const sc_uint_base b  )  [inline]

sc_proxy.h276 行で定義されています。

00277         { return operator ^= ( (uint64) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( const sc_int_base b  )  [inline]

sc_proxy.h279 行で定義されています。

00280         { return operator ^= ( (int64) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( unsigned long  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( long  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( unsigned int  b  )  [inline]

sc_proxy.h285 行で定義されています。

00286         { return operator ^= ( (unsigned long) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( int  b  )  [inline]

sc_proxy.h288 行で定義されています。

00289         { return operator ^= ( (long) b ); }

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( uint64  b  ) 

template<class X>
X& sc_dt::sc_proxy< X >::operator^= ( int64  b  ) 

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const char *  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const bool *  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const sc_logic b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const sc_unsigned b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const sc_signed b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const sc_uint_base b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( const sc_int_base b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( unsigned long  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( long  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( unsigned int  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( int  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( uint64  b  )  const

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator^ ( int64  b  )  const

template<class X>
X & sc_dt::sc_proxy< X >::operator<<= ( int  n  )  [inline]

sc_proxy.h1064 行で定義されています。

01065 {
01066     X& x = back_cast();
01067     if( n < 0 ) {
01068         char msg[BUFSIZ];
01069         std::sprintf( msg,
01070                  "left shift operation is only allowed with positive "
01071                  "shift values, shift value = %d", n );
01072         SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
01073     }
01074     if( n >= x.length() ) {
01075         extend_sign_w_( x, 0, false );
01076         // no tail cleaning needed
01077         return x;
01078     }
01079     int sz = x.size();
01080     int wn = n / SC_DIGIT_SIZE;
01081     int bn = n % SC_DIGIT_SIZE;
01082     if( wn != 0 ) {
01083         // shift words
01084         int i = sz - 1;
01085         for( ; i >= wn; -- i ) {
01086             set_words_( x, i, x.get_word( i - wn ), x.get_cword( i - wn ) );
01087         }
01088         for( ; i >= 0; -- i ) {
01089             set_words_( x, i, SC_DIGIT_ZERO, SC_DIGIT_ZERO );
01090         }
01091     }
01092     if( bn != 0 ) {
01093         // shift bits
01094         for( int i = sz - 1; i >= 1; -- i ) {
01095             sc_digit x_dw, x_cw;
01096             get_words_( x, i, x_dw, x_cw );
01097             x_dw <<= bn;
01098             x_dw |= x.get_word( i - 1 ) >> (SC_DIGIT_SIZE - bn);
01099             x_cw <<= bn;
01100             x_cw |= x.get_cword( i - 1 ) >> (SC_DIGIT_SIZE - bn);
01101             set_words_( x, i, x_dw, x_cw );
01102         }
01103         sc_digit x_dw, x_cw;
01104         get_words_( x, 0, x_dw, x_cw );
01105         x_dw <<= bn;
01106         x_cw <<= bn;
01107         set_words_( x, 0, x_dw, x_cw );
01108     }
01109     x.clean_tail();
01110     return x;
01111 }

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator<< ( int  n  )  const [inline]

sc_lv_base.h674 行で定義されています。

00675 {
00676     sc_lv_base a( back_cast().length()+n );
00677         a = back_cast();
00678     return ( a <<= n );
00679 }

template<class X>
X & sc_dt::sc_proxy< X >::operator>>= ( int  n  )  [inline]

sc_proxy.h1120 行で定義されています。

01121 {
01122     X& x = back_cast();
01123     if( n < 0 ) {
01124         char msg[BUFSIZ];
01125         std::sprintf( msg,
01126                  "right shift operation is only allowed with positive "
01127                  "shift values, shift value = %d", n );
01128         SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
01129     }
01130     if( n >= x.length() ) {
01131         extend_sign_w_( x, 0, false );
01132         // no tail cleaning needed
01133         return x;
01134     }
01135     int sz = x.size();
01136     int wn = n / SC_DIGIT_SIZE;
01137     int bn = n % SC_DIGIT_SIZE;
01138     if( wn != 0 ) {
01139         // shift words
01140         int i = 0;
01141         for( ; i < (sz - wn); ++ i ) {
01142             set_words_( x, i, x.get_word( i + wn ), x.get_cword( i + wn ) );
01143         }
01144         for( ; i < sz; ++ i ) {
01145             set_words_( x, i, SC_DIGIT_ZERO, SC_DIGIT_ZERO );
01146         }
01147     }
01148     if( bn != 0 ) {
01149         // shift bits
01150         for( int i = 0; i < (sz - 1); ++ i ) {
01151             sc_digit x_dw, x_cw;
01152             get_words_( x, i, x_dw, x_cw );
01153             x_dw >>= bn;
01154             x_dw |= x.get_word( i + 1 ) << (SC_DIGIT_SIZE - bn);
01155             x_cw >>= bn;
01156             x_cw |= x.get_cword( i + 1 ) << (SC_DIGIT_SIZE - bn);
01157             set_words_( x, i, x_dw, x_cw );
01158         }
01159         sc_digit x_dw, x_cw;
01160         get_words_( x, sz - 1, x_dw, x_cw );
01161         x_dw >>= bn;
01162         x_cw >>= bn;
01163         set_words_( x, sz - 1, x_dw, x_cw );
01164     }
01165     x.clean_tail();
01166     return x;
01167 }

template<class X>
const sc_lv_base sc_dt::sc_proxy< X >::operator>> ( int  n  )  const [inline]

sc_lv_base.h687 行で定義されています。

00688 {
00689     sc_lv_base a( back_cast() );
00690     return ( a >>= n );
00691 }

template<class X>
X & sc_dt::sc_proxy< X >::lrotate ( int  n  )  [inline]

sc_lv_base.h699 行で定義されています。

00700 {
00701     X& x = back_cast();
00702     if( n < 0 ) {
00703         char msg[BUFSIZ];
00704         std::sprintf( msg,
00705                  "left rotate operation is only allowed with positive "
00706                  "rotate values, rotate value = %d", n );
00707         SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
00708     }
00709     int len = x.length();
00710     n %= len;
00711     // x = (x << n) | (x >> (len - n));
00712     sc_lv_base a( x << n );
00713     sc_lv_base b( x >> (len - n) );
00714     int sz = x.size();
00715     for( int i = 0; i < sz; ++ i ) {
00716         x.set_word( i, a.get_word( i ) | b.get_word( i ) );
00717         x.set_cword( i, a.get_cword( i ) | b.get_cword( i ) );
00718     }
00719     x.clean_tail();
00720     return x;
00721 }

template<class X>
X & sc_dt::sc_proxy< X >::rrotate ( int  n  )  [inline]

sc_lv_base.h738 行で定義されています。

00739 {
00740     X& x = back_cast();
00741     if( n < 0 ) {
00742         char msg[BUFSIZ];
00743         std::sprintf( msg,
00744                  "right rotate operation is only allowed with positive "
00745                  "rotate values, rotate value = %d", n );
00746         SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
00747     }
00748     int len = x.length();
00749     n %= len;
00750     // x = (x >> n) | (x << (len - n));
00751     sc_lv_base a( x >> n );
00752     sc_lv_base b( x << (len - n) );
00753     int sz = x.size();
00754     for( int i = 0; i < sz; ++ i ) {
00755         x.set_word( i, a.get_word( i ) | b.get_word( i ) );
00756         x.set_cword( i, a.get_cword( i ) | b.get_cword( i ) );
00757     }
00758     x.clean_tail();
00759     return x;
00760 }

template<class X>
X & sc_dt::sc_proxy< X >::reverse (  )  [inline]

sc_proxy.h1191 行で定義されています。

01192 {
01193     X& x = back_cast();
01194     int len = x.length();
01195     int half_len = len / 2;
01196     for( int i = 0, j = len - 1; i < half_len; ++ i, --j ) {
01197         sc_logic_value_t t = x.get_bit( i );
01198         x.set_bit( i, x.get_bit( j ) );
01199         x.set_bit( j, t );
01200     }
01201     return x;
01202 }

template<class X>
sc_bitref<X> sc_dt::sc_proxy< X >::operator[] ( int  i  )  [inline]

sc_proxy.h341 行で定義されています。

00342         { return sc_bitref<X>( back_cast(), i ); }

template<class X>
sc_bitref_r<X> sc_dt::sc_proxy< X >::operator[] ( int  i  )  const [inline]

sc_proxy.h344 行で定義されています。

00345         { return sc_bitref_r<X>( back_cast(), i ); }

template<class X>
sc_bitref<X> sc_dt::sc_proxy< X >::bit ( int  i  )  [inline]

sc_proxy.h347 行で定義されています。

00348         { return sc_bitref<X>( back_cast(), i ); }

template<class X>
sc_bitref_r<X> sc_dt::sc_proxy< X >::bit ( int  i  )  const [inline]

sc_proxy.h350 行で定義されています。

00351         { return sc_bitref_r<X>( back_cast(), i ); }

template<class X>
sc_subref<X> sc_dt::sc_proxy< X >::operator() ( int  hi,
int  lo 
) [inline]

sc_proxy.h356 行で定義されています。

00357         { return sc_subref<X>( back_cast(), hi, lo ); }

template<class X>
sc_subref_r<X> sc_dt::sc_proxy< X >::operator() ( int  hi,
int  lo 
) const [inline]

sc_proxy.h359 行で定義されています。

00360         { return sc_subref_r<X>( back_cast(), hi, lo ); }

template<class X>
sc_subref<X> sc_dt::sc_proxy< X >::range ( int  hi,
int  lo 
) [inline]

sc_proxy.h362 行で定義されています。

00363         { return sc_subref<X>( back_cast(), hi, lo ); }

template<class X>
sc_subref_r<X> sc_dt::sc_proxy< X >::range ( int  hi,
int  lo 
) const [inline]

sc_proxy.h365 行で定義されています。

00366         { return sc_subref_r<X>( back_cast(), hi, lo ); }

template<class X>
sc_logic_value_t sc_dt::sc_proxy< X >::and_reduce (  )  const [inline]

sc_proxy.h1215 行で定義されています。

01216 {
01217     const X& x = back_cast();
01218     sc_logic_value_t result = sc_logic_value_t( 1 );
01219     int len = x.length();
01220     for( int i = 0; i < len; ++ i ) {
01221         result = sc_logic::and_table[result][x.get_bit( i )];
01222     }
01223     return result;
01224 }

template<class X>
sc_logic_value_t sc_dt::sc_proxy< X >::nand_reduce (  )  const [inline]

sc_proxy.h373 行で定義されています。

00374         { return sc_logic::not_table[and_reduce()]; }

template<class X>
sc_logic_value_t sc_dt::sc_proxy< X >::or_reduce (  )  const [inline]

sc_proxy.h1229 行で定義されています。

01230 {
01231     const X& x = back_cast();
01232     sc_logic_value_t result = sc_logic_value_t( 0 );
01233     int len = x.length();
01234     for( int i = 0; i < len; ++ i ) {
01235         result = sc_logic::or_table[result][x.get_bit( i )];
01236     }
01237     return result;
01238 }

template<class X>
sc_logic_value_t sc_dt::sc_proxy< X >::nor_reduce (  )  const [inline]

sc_proxy.h378 行で定義されています。

00379         { return sc_logic::not_table[or_reduce()]; }

template<class X>
sc_logic_value_t sc_dt::sc_proxy< X >::xor_reduce (  )  const [inline]

sc_proxy.h1243 行で定義されています。

01244 {
01245     const X& x = back_cast();
01246     sc_logic_value_t result = sc_logic_value_t( 0 );
01247     int len = x.length();
01248     for( int i = 0; i < len; ++ i ) {
01249         result = sc_logic::xor_table[result][x.get_bit( i )];
01250     }
01251     return result;
01252 }

template<class X>
sc_logic_value_t sc_dt::sc_proxy< X >::xnor_reduce (  )  const [inline]

sc_proxy.h383 行で定義されています。

00384         { return sc_logic::not_table[xor_reduce()]; }

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const char *  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const bool *  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const sc_logic b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const sc_unsigned b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const sc_signed b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const sc_uint_base b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( const sc_int_base b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( unsigned long  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( long  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( unsigned int  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( int  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( uint64  b  )  const

template<class X>
bool sc_dt::sc_proxy< X >::operator== ( int64  b  )  const

template<class X>
const std::string sc_dt::sc_proxy< X >::to_string (  )  const [inline]

sc_proxy.h1313 行で定義されています。

01314 {
01315     const X& x = back_cast();
01316     int len = x.length();
01317     std::string s; // ( len + 1 );
01318     for( int i = 0; i < len; ++ i ) {
01319         s += sc_logic::logic_to_char[x.get_bit( len - i - 1 )];
01320     }
01321     return s;
01322 }

template<class X>
const std::string sc_dt::sc_proxy< X >::to_string ( sc_numrep  numrep  )  const [inline]

sc_proxy.h1327 行で定義されています。

01328 {
01329     return convert_to_fmt( to_string(), numrep, true );
01330 }

template<class X>
const std::string sc_dt::sc_proxy< X >::to_string ( sc_numrep  numrep,
bool  w_prefix 
) const [inline]

sc_proxy.h1335 行で定義されています。

01336 {
01337     return convert_to_fmt( to_string(), numrep, w_prefix );
01338 }

template<class X>
int64 sc_dt::sc_proxy< X >::to_int64 (  )  const [inline]

sc_proxy.h413 行で定義されています。

00414         { return to_anything_signed(); }

template<class X>
uint64 sc_dt::sc_proxy< X >::to_uint64 (  )  const [inline]

sc_proxy.h1397 行で定義されています。

01398 {
01399     // words 1 and 0 returned.
01400     // can't convert logic values other than 0 and 1
01401     const X& x = back_cast();
01402     int len = x.length();
01403     if( x.get_cword( 0 ) != SC_DIGIT_ZERO ) {
01404         SC_REPORT_WARNING( sc_core::SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_, 0 );
01405     }
01406     uint64 w = x.get_word( 0 );
01407     if( len > SC_DIGIT_SIZE ) 
01408     {
01409         if( x.get_cword( 1 ) != SC_DIGIT_ZERO ) {
01410             SC_REPORT_WARNING( sc_core::SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_, 0 );
01411         }
01412         uint64 w1 = x.get_word( 1 );
01413         w = w | (w1 << SC_DIGIT_SIZE);  
01414         return w;
01415     }
01416     else if( len == SC_DIGIT_SIZE ) 
01417     {
01418         return w;
01419     }
01420     else
01421     {
01422         return ( w & (~SC_DIGIT_ZERO >> (SC_DIGIT_SIZE - len)) );
01423     }
01424 }

template<class X>
int sc_dt::sc_proxy< X >::to_int (  )  const [inline]

sc_proxy.h416 行で定義されています。

00417         { return (int)to_anything_signed(); }

template<class X>
unsigned int sc_dt::sc_proxy< X >::to_uint (  )  const [inline]

sc_proxy.h419 行で定義されています。

00420         { return (unsigned int)to_anything_unsigned(); }

template<class X>
long sc_dt::sc_proxy< X >::to_long (  )  const [inline]

sc_proxy.h422 行で定義されています。

00423         { return (long)to_anything_signed(); }

template<class X>
unsigned long sc_dt::sc_proxy< X >::to_ulong (  )  const [inline]

sc_proxy.h425 行で定義されています。

00426         { return (unsigned long)to_anything_unsigned(); }

template<class X>
void sc_dt::sc_proxy< X >::print ( ::std::ostream &  os = ::std::cout  )  const [inline]

sc_proxy.h441 行で定義されています。

00442         { 
00443             // the test below will force printing in binary if decimal is 
00444             // specified.
00445             if ( sc_io_base(os, SC_DEC) == SC_DEC )
00446                 os << to_string();
00447             else
00448                 os << to_string(sc_io_base(os,SC_BIN),sc_io_show_base(os)); 
00449         }

template<class X>
void sc_dt::sc_proxy< X >::scan ( ::std::istream &  is = ::std::cin  )  [inline]

sc_dt::sc_subref< X >, と sc_dt::sc_concref< X, Y >で再定義されています。

sc_proxy.h1346 行で定義されています。

01347 {
01348     std::string s;
01349     is >> s;
01350     back_cast() = s.c_str();
01351 }

template<class X>
void sc_dt::sc_proxy< X >::check_bounds ( int  n  )  const [inline, protected]

sc_proxy.h1357 行で定義されています。

01358 {
01359     if( n < 0 || n >= back_cast().length() ) {
01360         SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, 0 );
01361     }
01362 }

template<class X>
void sc_dt::sc_proxy< X >::check_wbounds ( int  n  )  const [inline, protected]

sc_proxy.h1367 行で定義されています。

01368 {
01369     if( n < 0 || n >= back_cast().size() ) {
01370         SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, 0 );
01371     }
01372 }

template<class X>
sc_digit sc_dt::sc_proxy< X >::to_anything_unsigned (  )  const [inline, protected]

sc_proxy.h1378 行で定義されています。

01379 {
01380     // only 0 word is returned
01381     // can't convert logic values other than 0 and 1
01382     const X& x = back_cast();
01383     int len = x.length();
01384     if( x.get_cword( 0 ) != SC_DIGIT_ZERO ) {
01385         SC_REPORT_WARNING( sc_core::SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_, 0 );
01386     }
01387     sc_digit w = x.get_word( 0 );
01388     if( len >= SC_DIGIT_SIZE ) {
01389         return w;
01390     }
01391     return ( w & (~SC_DIGIT_ZERO >> (SC_DIGIT_SIZE - len)) );
01392 }

template<class X>
int64 sc_dt::sc_proxy< X >::to_anything_signed (  )  const [inline, protected]

sc_proxy.h1429 行で定義されています。

01430 {
01431     // only 0 word is returned
01432     // can't convert logic values other than 0 and 1
01433     const X& x = back_cast();
01434     int len = x.length();
01435     if( x.get_cword( 0 ) != SC_DIGIT_ZERO ) {
01436         SC_REPORT_WARNING( sc_core::SC_ID_VECTOR_CONTAINS_LOGIC_VALUE_, 0 );
01437     }
01438     int64 w = x.get_word( 0 );
01439     uint64 zero = 0;
01440     if( len >= 64 ) {
01441         return (uint64) w;
01442     }
01443     sc_logic_value_t sgn = x.get_bit( len - 1 );
01444     if( sgn == 0 ) {
01445         return ( w & (~zero >> (64 - len)) );
01446     } else {
01447         return ( w | (~zero << len) );
01448     }
01449 }


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:40 2008に生成されました。  doxygen 1.5.6