クラス sc_dt::sc_int_base

#include <sc_int_base.h>

sc_dt::sc_int_baseに対する継承グラフ

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

 sc_int_base (int w=sc_length_param().len())
 sc_int_base (int_type v, int w)
 sc_int_base (const sc_int_base &a)
 sc_int_base (const sc_int_subref_r &a)
template<class T>
 sc_int_base (const sc_generic_base< T > &a)
 sc_int_base (const sc_signed &a)
 sc_int_base (const sc_unsigned &a)
 sc_int_base (const sc_bv_base &v)
 sc_int_base (const sc_lv_base &v)
 sc_int_base (const sc_uint_subref_r &v)
 sc_int_base (const sc_signed_subref_r &v)
 sc_int_base (const sc_unsigned_subref_r &v)
virtual ~sc_int_base ()
sc_int_baseoperator= (int_type v)
sc_int_baseoperator= (const sc_int_base &a)
sc_int_baseoperator= (const sc_int_subref_r &a)
template<class T>
sc_int_baseoperator= (const sc_generic_base< T > &a)
sc_int_baseoperator= (const sc_signed &a)
sc_int_baseoperator= (const sc_unsigned &a)
sc_int_baseoperator= (const sc_bv_base &a)
sc_int_baseoperator= (const sc_lv_base &a)
sc_int_baseoperator= (const char *a)
sc_int_baseoperator= (unsigned long a)
sc_int_baseoperator= (long a)
sc_int_baseoperator= (unsigned int a)
sc_int_baseoperator= (int a)
sc_int_baseoperator= (uint64 a)
sc_int_baseoperator= (double a)
sc_int_baseoperator+= (int_type v)
sc_int_baseoperator-= (int_type v)
sc_int_baseoperator*= (int_type v)
sc_int_baseoperator/= (int_type v)
sc_int_baseoperator%= (int_type v)
sc_int_baseoperator &= (int_type v)
sc_int_baseoperator|= (int_type v)
sc_int_baseoperator^= (int_type v)
sc_int_baseoperator<<= (int_type v)
sc_int_baseoperator>>= (int_type v)
sc_int_baseoperator++ ()
const sc_int_base operator++ (int)
sc_int_baseoperator-- ()
const sc_int_base operator-- (int)
sc_int_bitrefoperator[] (int i)
const sc_int_bitref_roperator[] (int i) const
sc_int_bitrefbit (int i)
const sc_int_bitref_rbit (int i) const
sc_int_subrefoperator() (int left, int right)
const sc_int_subref_roperator() (int left, int right) const
sc_int_subrefrange (int left, int right)
const sc_int_subref_rrange (int left, int right) const
bool test (int i) const
void set (int i)
void set (int i, bool v)
int length () const
virtual int concat_length (bool *xz_present_p) const
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
virtual uint64 concat_get_uint64 () const
virtual void concat_set (int64 src, int low_i)
virtual void concat_set (const sc_signed &src, int low_i)
virtual void concat_set (const sc_unsigned &src, int low_i)
virtual void concat_set (uint64 src, int low_i)
bool and_reduce () const
bool nand_reduce () const
bool or_reduce () const
bool nor_reduce () const
bool xor_reduce () const
bool xnor_reduce () const
 operator int_type () const
int_type value () const
int to_int () const
unsigned int to_uint () const
long to_long () const
unsigned long to_ulong () const
int64 to_int64 () const
uint64 to_uint64 () const
double to_double () const
long long_low () const
long long_high () const
const std::string to_string (sc_numrep numrep=SC_DEC) const
const std::string to_string (sc_numrep numrep, bool w_prefix) const
void print (::std::ostream &os=::std::cout) const
void scan (::std::istream &is=::std::cin)

Protected 変数

int_type m_val
int m_len
int m_ulen

Private メソッド

void invalid_length () const
void invalid_index (int i) const
void invalid_range (int l, int r) const
void check_length () const
void check_index (int i) const
void check_range (int l, int r) const
void check_value () const
void extend_sign ()

フレンド

class sc_int_bitref_r
class sc_int_bitref
class sc_int_subref_r
class sc_int_subref
bool operator== (const sc_int_base &a, const sc_int_base &b)
bool operator!= (const sc_int_base &a, const sc_int_base &b)
bool operator< (const sc_int_base &a, const sc_int_base &b)
bool operator<= (const sc_int_base &a, const sc_int_base &b)
bool operator> (const sc_int_base &a, const sc_int_base &b)
bool operator>= (const sc_int_base &a, const sc_int_base &b)


説明

sc_int_base.h526 行で定義されています。


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

sc_dt::sc_int_base::sc_int_base ( int  w = sc_length_param().len()  )  [inline, explicit]

sc_int_base.h563 行で定義されています。

00564         : m_val( 0 ), m_len( w ), m_ulen( SC_INTWIDTH - m_len )
00565         { check_length(); }

sc_dt::sc_int_base::sc_int_base ( int_type  v,
int  w 
) [inline]

sc_int_base.h567 行で定義されています。

00568         : m_val( v ), m_len( w ), m_ulen( SC_INTWIDTH - m_len )
00569         { check_length(); extend_sign(); }

sc_dt::sc_int_base::sc_int_base ( const sc_int_base a  )  [inline]

sc_int_base.h571 行で定義されています。

00572         : m_val( a.m_val ), m_len( a.m_len ), m_ulen( a.m_ulen )
00573         {}

sc_dt::sc_int_base::sc_int_base ( const sc_int_subref_r a  )  [inline, explicit]

sc_int_base.h575 行で定義されています。

00576         : m_val( a ), m_len( a.length() ), m_ulen( SC_INTWIDTH - m_len )
00577         { extend_sign(); }

template<class T>
sc_dt::sc_int_base::sc_int_base ( const sc_generic_base< T > &  a  )  [inline, explicit]

sc_int_base.h580 行で定義されています。

00580                                                         :
00581         m_val( a->to_int64() ), m_len( a->length() ),
00582         m_ulen( SC_INTWIDTH - m_len )
00583         { check_length(); extend_sign(); }

sc_dt::sc_int_base::sc_int_base ( const sc_signed a  )  [explicit]

sc_int_base.cpp425 行で定義されています。

00426     : m_val( 0 ), m_len( a.length() ), m_ulen( SC_INTWIDTH - m_len )
00427 {
00428     check_length();
00429 #if 0
00430     for( int i = m_len - 1; i >= 0; -- i ) {
00431         set( i, a.test( i ) );
00432     }
00433     extend_sign();
00434 #else
00435     *this = a.to_int64();
00436 #endif
00437 }

sc_dt::sc_int_base::sc_int_base ( const sc_unsigned a  )  [explicit]

sc_int_base.cpp439 行で定義されています。

00440     : m_val( 0 ), m_len( a.length() ), m_ulen( SC_INTWIDTH - m_len )
00441 {
00442     check_length();
00443 #if 0
00444     for( int i = m_len - 1; i >= 0; -- i ) {
00445         set( i, a.test( i ) );
00446     }
00447     extend_sign();
00448 #else
00449     *this = a.to_int64();
00450 #endif
00451 }

sc_dt::sc_int_base::sc_int_base ( const sc_bv_base v  )  [explicit]

sc_int_base.cpp394 行で定義されています。

00395     : m_val(0), m_len( v.length() ), m_ulen( SC_INTWIDTH - m_len )
00396 {
00397     check_length();
00398     *this = v;
00399 }

sc_dt::sc_int_base::sc_int_base ( const sc_lv_base v  )  [explicit]

sc_int_base.cpp400 行で定義されています。

00401     : m_val(0), m_len( v.length() ), m_ulen( SC_INTWIDTH - m_len )
00402 {
00403     check_length();
00404     *this = v;
00405 }

sc_dt::sc_int_base::sc_int_base ( const sc_uint_subref_r v  )  [explicit]

sc_int_base.cpp406 行で定義されています。

00407     : m_val(0), m_len( v.length() ), m_ulen( SC_INTWIDTH - m_len )
00408 {
00409     check_length();
00410     *this = v.to_uint64();
00411 }

sc_dt::sc_int_base::sc_int_base ( const sc_signed_subref_r v  )  [explicit]

sc_int_base.cpp412 行で定義されています。

00413     : m_val(0), m_len( v.length() ), m_ulen( SC_INTWIDTH - m_len )
00414 {
00415     check_length();
00416     *this = v.to_uint64();
00417 }

sc_dt::sc_int_base::sc_int_base ( const sc_unsigned_subref_r v  )  [explicit]

sc_int_base.cpp418 行で定義されています。

00419     : m_val(0), m_len( v.length() ), m_ulen( SC_INTWIDTH - m_len )
00420 {
00421     check_length();
00422     *this = v.to_uint64();
00423 }

virtual sc_dt::sc_int_base::~sc_int_base (  )  [inline, virtual]

sc_int_base.h597 行で定義されています。

00598         {}


関数

void sc_dt::sc_int_base::invalid_length (  )  const [private]

sc_int_base.cpp347 行で定義されています。

00348 {
00349     char msg[BUFSIZ];
00350     std::sprintf( msg,
00351              "sc_int[_base] initialization: length = %d violates "
00352              "1 <= length <= %d",
00353              m_len, SC_INTWIDTH );
00354     SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
00355 }

void sc_dt::sc_int_base::invalid_index ( int  i  )  const [private]

sc_int_base.cpp358 行で定義されています。

00359 {
00360     char msg[BUFSIZ];
00361     std::sprintf( msg,
00362              "sc_int[_base] bit selection: index = %d violates "
00363              "0 <= index <= %d",
00364              i, m_len - 1 );
00365     SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
00366 }

void sc_dt::sc_int_base::invalid_range ( int  l,
int  r 
) const [private]

sc_int_base.cpp369 行で定義されています。

00370 {
00371     char msg[BUFSIZ];
00372     std::sprintf( msg,
00373              "sc_int[_base] part selection: left = %d, right = %d violates "
00374              "0 <= right <= left <= %d",
00375              l, r, m_len - 1 );
00376     SC_REPORT_ERROR( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
00377 }

void sc_dt::sc_int_base::check_length (  )  const [inline, private]

sc_int_base.h540 行で定義されています。

00541         { if( m_len <= 0 || m_len > SC_INTWIDTH ) { invalid_length(); } }

void sc_dt::sc_int_base::check_index ( int  i  )  const [inline, private]

sc_int_base.h543 行で定義されています。

00544         { if( i < 0 || i >= m_len ) { invalid_index( i ); } }

void sc_dt::sc_int_base::check_range ( int  l,
int  r 
) const [inline, private]

sc_int_base.h546 行で定義されています。

00547         { if( r < 0 || l >= m_len || l < r ) { invalid_range( l, r ); } }

void sc_dt::sc_int_base::check_value (  )  const [private]

sc_int_base.cpp381 行で定義されています。

00382 {
00383     int_type limit = (int_type) 1 << ( m_len - 1 );
00384     if( m_val < -limit || m_val >= limit ) {
00385         char msg[BUFSIZ];
00386         std::sprintf( msg, "sc_int[_base]: value does not fit into a length of %d",
00387                  m_len );
00388         SC_REPORT_WARNING( sc_core::SC_ID_OUT_OF_BOUNDS_, msg );
00389     }
00390 }

void sc_dt::sc_int_base::extend_sign (  )  [inline, private]

sc_int_base.h551 行で定義されています。

00552         {
00553 #ifdef DEBUG_SYSTEMC
00554             check_value();
00555 #endif
00556             m_val = ( m_val << m_ulen >> m_ulen );
00557         }

sc_int_base& sc_dt::sc_int_base::operator= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h602 行で定義されています。

00603         { m_val = v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( const sc_int_base a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h605 行で定義されています。

00606         { m_val = a.m_val; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( const sc_int_subref_r a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h608 行で定義されています。

00609         { m_val = a; extend_sign(); return *this; }

template<class T>
sc_int_base& sc_dt::sc_int_base::operator= ( const sc_generic_base< T > &  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h612 行で定義されています。

00613         { m_val = a->to_int64(); extend_sign(); return *this; }

sc_int_base & sc_dt::sc_int_base::operator= ( const sc_signed a  ) 

sc_dt::sc_int< W >で再定義されています。

sc_int_base.cpp457 行で定義されています。

00458 {
00459     int minlen = sc_min( m_len, a.length() );
00460     int i = 0;
00461     for( ; i < minlen; ++ i ) {
00462         set( i, a.test( i ) );
00463     }
00464     bool sgn = a.sign();
00465     for( ; i < m_len; ++ i ) {
00466         // sign extension
00467         set( i, sgn );
00468     }
00469     extend_sign();
00470     return *this;
00471 }

sc_int_base & sc_dt::sc_int_base::operator= ( const sc_unsigned a  ) 

sc_dt::sc_int< W >で再定義されています。

sc_int_base.cpp474 行で定義されています。

00475 {
00476     int minlen = sc_min( m_len, a.length() );
00477     int i = 0;
00478     for( ; i < minlen; ++ i ) {
00479         set( i, a.test( i ) );
00480     }
00481     for( ; i < m_len; ++ i ) {
00482         // zero extension
00483         set( i, 0 );
00484     }
00485     extend_sign();
00486     return *this;
00487 }

sc_int_base & sc_dt::sc_int_base::operator= ( const sc_bv_base a  ) 

sc_dt::sc_int< W >で再定義されています。

sc_int_base.cpp491 行で定義されています。

00492 {
00493     int minlen = sc_min( m_len, a.length() );
00494     int i = 0;
00495     for( ; i < minlen; ++ i ) {
00496         set( i, a.get_bit( i ) );
00497     }
00498     for( ; i < m_len; ++ i ) {
00499         // zero extension
00500         set( i, 0 );
00501     }
00502     extend_sign();
00503     return *this;
00504 }

sc_int_base & sc_dt::sc_int_base::operator= ( const sc_lv_base a  ) 

sc_dt::sc_int< W >で再定義されています。

sc_int_base.cpp507 行で定義されています。

00508 {
00509     int minlen = sc_min( m_len, a.length() );
00510     int i = 0;
00511     for( ; i < minlen; ++ i ) {
00512         set( i, sc_logic( a.get_bit( i ) ).to_bool() );
00513     }
00514     for( ; i < m_len; ++ i ) {
00515         // zero extension
00516         set( i, 0 );
00517     }
00518     extend_sign();
00519     return *this;
00520 }

sc_int_base & sc_dt::sc_int_base::operator= ( const char *  a  ) 

sc_dt::sc_int< W >で再定義されています。

sc_int_base.cpp523 行で定義されています。

00524 {
00525     if( a == 0 ) {
00526         SC_REPORT_ERROR( sc_core::SC_ID_CONVERSION_FAILED_,
00527                          "character string is zero" );
00528     }
00529     if( *a == 0 ) {
00530         SC_REPORT_ERROR( sc_core::SC_ID_CONVERSION_FAILED_,
00531                          "character string is empty" );
00532     }
00533     try {
00534         int len = m_len;
00535         sc_fix aa( a, len, len, SC_TRN, SC_WRAP, 0, SC_ON );
00536         return this->operator = ( aa );
00537     } catch( sc_core::sc_report ) {
00538         char msg[BUFSIZ];
00539         std::sprintf( msg, "character string '%s' is not valid", a );
00540         SC_REPORT_ERROR( sc_core::SC_ID_CONVERSION_FAILED_, msg );
00541         // never reached
00542         return *this;
00543     }
00544 }

sc_int_base& sc_dt::sc_int_base::operator= ( unsigned long  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h630 行で定義されています。

00631         { m_val = a; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( long  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h633 行で定義されています。

00634         { m_val = a; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( unsigned int  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h636 行で定義されています。

00637         { m_val = a; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( int  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h639 行で定義されています。

00640         { m_val = a; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( uint64  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h642 行で定義されています。

00643         { m_val = a; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator= ( double  a  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h645 行で定義されています。

00646         { m_val = (int_type) a; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator+= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h651 行で定義されています。

00652         { m_val += v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator-= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h654 行で定義されています。

00655         { m_val -= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator*= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h657 行で定義されています。

00658         { m_val *= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator/= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h660 行で定義されています。

00661         { m_val /= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator%= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h663 行で定義されています。

00664         { m_val %= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator &= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h669 行で定義されています。

00670         { m_val &= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator|= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h672 行で定義されています。

00673         { m_val |= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator^= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h675 行で定義されています。

00676         { m_val ^= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator<<= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h679 行で定義されています。

00680         { m_val <<= v; extend_sign(); return *this; }

sc_int_base& sc_dt::sc_int_base::operator>>= ( int_type  v  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h682 行で定義されています。

00683         { m_val >>= v; /* no sign extension needed */ return *this; }

sc_int_base& sc_dt::sc_int_base::operator++ (  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h688 行で定義されています。

00689         { ++ m_val; extend_sign(); return *this; }

const sc_int_base sc_dt::sc_int_base::operator++ ( int   )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h691 行で定義されています。

00692         { sc_int_base tmp( *this ); ++ m_val; extend_sign(); return tmp; }

sc_int_base& sc_dt::sc_int_base::operator-- (  )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h694 行で定義されています。

00695         { -- m_val; extend_sign(); return *this; }

const sc_int_base sc_dt::sc_int_base::operator-- ( int   )  [inline]

sc_dt::sc_int< W >で再定義されています。

sc_int_base.h697 行で定義されています。

00698         { sc_int_base tmp( *this ); -- m_val; extend_sign(); return tmp; }

sc_int_bitref & sc_dt::sc_int_base::operator[] ( int  i  )  [inline]

sc_int_base.h1217 行で定義されています。

01218 {
01219     check_index( i );
01220     sc_int_bitref* result_p = sc_int_bitref::m_pool.allocate();
01221     result_p->initialize(this, i);
01222     return *result_p;
01223 }

const sc_int_bitref_r & sc_dt::sc_int_base::operator[] ( int  i  )  const [inline]

sc_int_base.h1227 行で定義されています。

01228 {
01229     check_index( i );
01230     sc_int_bitref* result_p = sc_int_bitref::m_pool.allocate();
01231     result_p->initialize(this, i);
01232     return *result_p;
01233 }

sc_int_bitref & sc_dt::sc_int_base::bit ( int  i  )  [inline]

sc_int_base.h1238 行で定義されています。

01239 {
01240     check_index( i );
01241     sc_int_bitref* result_p = sc_int_bitref::m_pool.allocate();
01242     result_p->initialize(this, i);
01243     return *result_p;
01244 }

const sc_int_bitref_r & sc_dt::sc_int_base::bit ( int  i  )  const [inline]

sc_int_base.h1248 行で定義されています。

01249 {
01250     check_index( i );
01251     sc_int_bitref* result_p = sc_int_bitref::m_pool.allocate();
01252     result_p->initialize(this, i);
01253     return *result_p;
01254 }

sc_int_subref & sc_dt::sc_int_base::operator() ( int  left,
int  right 
) [inline]

sc_int_base.h1261 行で定義されています。

01262 {
01263     check_range( left, right );
01264     sc_int_subref* result_p = sc_int_subref::m_pool.allocate();
01265     result_p->initialize(this, left, right);
01266     return *result_p;
01267 }

const sc_int_subref_r & sc_dt::sc_int_base::operator() ( int  left,
int  right 
) const [inline]

sc_int_base.h1271 行で定義されています。

01272 {
01273     check_range( left, right );
01274     sc_int_subref* result_p = sc_int_subref::m_pool.allocate();
01275     result_p->initialize(this, left, right);
01276     return *result_p;
01277 }

sc_int_subref & sc_dt::sc_int_base::range ( int  left,
int  right 
) [inline]

sc_int_base.h1282 行で定義されています。

01283 {
01284     check_range( left, right );
01285     sc_int_subref* result_p = sc_int_subref::m_pool.allocate();
01286     result_p->initialize(this, left, right);
01287     return *result_p;
01288 }

const sc_int_subref_r & sc_dt::sc_int_base::range ( int  left,
int  right 
) const [inline]

sc_int_base.h1292 行で定義されています。

01293 {
01294     check_range( left, right );
01295     sc_int_subref* result_p = sc_int_subref::m_pool.allocate();
01296     result_p->initialize(this, left, right);
01297     return *result_p;
01298 }

bool sc_dt::sc_int_base::test ( int  i  )  const [inline]

sc_int_base.h742 行で定義されています。

00743         { return ( 0 != (m_val & (UINT_ONE << i)) ); }

void sc_dt::sc_int_base::set ( int  i  )  [inline]

sc_int_base.h745 行で定義されています。

00746         { m_val |= (UINT_ONE << i); }

void sc_dt::sc_int_base::set ( int  i,
bool  v 
) [inline]

sc_int_base.h748 行で定義されています。

00749         { v ? m_val |= (UINT_ONE << i) : m_val &= ~(UINT_ONE << i); }

int sc_dt::sc_int_base::length (  )  const [inline]

sc_int_base.h754 行で定義されています。

00755         { return m_len; }

virtual int sc_dt::sc_int_base::concat_length ( bool *  xz_present_p  )  const [inline, virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.h764 行で定義されています。

00765         { if ( xz_present_p ) *xz_present_p = false; return length(); }

bool sc_dt::sc_int_base::concat_get_ctrl ( sc_digit dst_p,
int  low_i 
) const [virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.cpp594 行で定義されています。

00595 {    
00596     int        dst_i;       // Word in dst_p now processing.
00597     int        end_i;       // Highest order word in dst_p to process.
00598     int        left_shift;  // Left shift for val.
00599      uint_type mask;        // Mask for bits to extract or keep.
00600 
00601     dst_i = low_i / BITS_PER_DIGIT;
00602     left_shift = low_i % BITS_PER_DIGIT;
00603     end_i = (low_i + (m_len-1)) / BITS_PER_DIGIT;
00604 
00605     mask = ~(-1 << left_shift);
00606     dst_p[dst_i] = (unsigned long)(dst_p[dst_i] & mask);
00607         dst_i++;
00608         for ( ; dst_i <= end_i; dst_i++ ) dst_p[dst_i] = 0;
00609         return false;
00610 }

bool sc_dt::sc_int_base::concat_get_data ( sc_digit dst_p,
int  low_i 
) const [virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.cpp612 行で定義されています。

00613 {    
00614     int       dst_i;       // Word in dst_p now processing.
00615     int       end_i;       // Highest order word in dst_p to process.
00616     int       high_i;      // Index of high order bit in dst_p to set.
00617     int       left_shift;  // Left shift for val.
00618     sc_digit  mask;        // Mask for bits to extract or keep.
00619     bool      non_zero;    // True if value inserted is non-zero.
00620     uint_type val;         // Value for this object.
00621 
00622     dst_i = low_i / BITS_PER_DIGIT;
00623     left_shift = low_i % BITS_PER_DIGIT;
00624     high_i = low_i + (m_len-1);
00625     end_i = high_i / BITS_PER_DIGIT;
00626     val = m_val;
00627     non_zero = val != 0;
00628     if ( m_len < 64 )
00629     {
00630         mask = ~((uint_type)-1 << m_len);
00631         val &=  mask;
00632     }
00633     // PROCESS THE FIRST WORD:
00634 
00635     mask = ~(-1 << left_shift);
00636     dst_p[dst_i] = (unsigned long)((dst_p[dst_i] & mask) | 
00637                 ((val <<left_shift) & DIGIT_MASK));
00638     switch ( end_i - dst_i )
00639     {
00640      // BITS ARE ACROSS TWO WORDS:
00641 
00642      case 1:
00643         dst_i++;
00644         val >>= (BITS_PER_DIGIT-left_shift);
00645         dst_p[dst_i] = (unsigned long)val;
00646         break;
00647 
00648      // BITS ARE ACROSS THREE WORDS:
00649 
00650      case 2:
00651         dst_i++;
00652         val >>= (BITS_PER_DIGIT-left_shift);
00653         dst_p[dst_i++] = ((unsigned long)val) & DIGIT_MASK;
00654         val >>= BITS_PER_DIGIT;
00655         dst_p[dst_i] = (unsigned long)val;
00656         break;
00657 
00658      // BITS ARE ACROSS THREE WORDS:
00659 
00660      case 3:
00661         dst_i++;
00662         val >>= (BITS_PER_DIGIT-left_shift);
00663         dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK);
00664         val >>= BITS_PER_DIGIT;
00665         dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK);
00666         val >>= BITS_PER_DIGIT;
00667         dst_p[dst_i] = (unsigned long)val;
00668         break;
00669     }
00670     return non_zero;
00671 }

virtual uint64 sc_dt::sc_int_base::concat_get_uint64 (  )  const [inline, virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.h768 行で定義されています。

00769         {
00770             if ( m_len < 64 )
00771                 return (uint64)(m_val & ~((uint_type)-1 << m_len));
00772             else
00773                 return (uint64)m_val;
00774         }

void sc_dt::sc_int_base::concat_set ( int64  src,
int  low_i 
) [virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.cpp674 行で定義されています。

00675 {
00676     *this = (low_i < 64) ? src >> low_i : src >> 63;
00677 }

void sc_dt::sc_int_base::concat_set ( const sc_signed src,
int  low_i 
) [virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.cpp679 行で定義されています。

00680 {
00681     if ( low_i < src.length() )
00682         *this = src >> low_i;
00683     else
00684         *this = (src < 0) ? (int_type)-1 : 0;
00685 }

void sc_dt::sc_int_base::concat_set ( const sc_unsigned src,
int  low_i 
) [virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.cpp687 行で定義されています。

00688 {
00689     if ( low_i < src.length() )
00690         *this = src >> low_i;
00691     else
00692         *this = 0;
00693 }

void sc_dt::sc_int_base::concat_set ( uint64  src,
int  low_i 
) [virtual]

sc_dt::sc_value_baseを再定義しています。

sc_int_base.cpp695 行で定義されています。

00696 {
00697     *this = (low_i < 64) ? src >> low_i : 0;
00698 }

bool sc_dt::sc_int_base::and_reduce (  )  const

sc_int_base.cpp568 行で定義されています。

00569 {
00570     return ( m_val == int_type( -1 ) );
00571 }

bool sc_dt::sc_int_base::nand_reduce (  )  const [inline]

sc_int_base.h785 行で定義されています。

00786         { return ( ! and_reduce() ); }

bool sc_dt::sc_int_base::or_reduce (  )  const

sc_int_base.cpp574 行で定義されています。

00575 {
00576     return ( m_val != int_type( 0 ) );
00577 }

bool sc_dt::sc_int_base::nor_reduce (  )  const [inline]

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

00791         { return ( ! or_reduce() ); }

bool sc_dt::sc_int_base::xor_reduce (  )  const

sc_int_base.cpp580 行で定義されています。

00581 {
00582     uint_type mask = ~UINT_ZERO;
00583     uint_type val = m_val & (mask >> m_ulen);
00584     int n = SC_INTWIDTH;
00585     do {
00586         n >>= 1;
00587         mask >>= n;
00588         val = ((val & (mask << n)) >> n) ^ (val & mask);
00589     } while( n != 1 );
00590     return ( val != uint_type( 0 ) );
00591 }

bool sc_dt::sc_int_base::xnor_reduce (  )  const [inline]

sc_int_base.h795 行で定義されています。

00796         { return ( ! xor_reduce() ); }

sc_dt::sc_int_base::operator int_type (  )  const [inline]

sc_int_base.h801 行で定義されています。

00802         { return m_val; }

int_type sc_dt::sc_int_base::value (  )  const [inline]

sc_int_base.h807 行で定義されています。

00808         { return operator int_type(); }

int sc_dt::sc_int_base::to_int (  )  const [inline]

sc_int_base.h811 行で定義されています。

00812         { return (int) m_val; }

unsigned int sc_dt::sc_int_base::to_uint (  )  const [inline]

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

00815         { return (unsigned int) m_val; }

long sc_dt::sc_int_base::to_long (  )  const [inline]

sc_int_base.h817 行で定義されています。

00818         { return (long) m_val; }

unsigned long sc_dt::sc_int_base::to_ulong (  )  const [inline]

sc_int_base.h820 行で定義されています。

00821         { return (unsigned long) m_val; }

int64 sc_dt::sc_int_base::to_int64 (  )  const [inline]

sc_int_base.h823 行で定義されています。

00824         { return (int64) m_val; }

uint64 sc_dt::sc_int_base::to_uint64 (  )  const [inline]

sc_int_base.h826 行で定義されています。

00827         { return (uint64) m_val; }

double sc_dt::sc_int_base::to_double (  )  const [inline]

sc_int_base.h829 行で定義されています。

00830         { return (double) m_val; }

long sc_dt::sc_int_base::long_low (  )  const [inline]

sc_int_base.h834 行で定義されています。

00835         { return (long) (m_val & UINT64_32ONES); }

long sc_dt::sc_int_base::long_high (  )  const [inline]

sc_int_base.h837 行で定義されています。

00838         { return (long) ((m_val >> 32) & UINT64_32ONES); }

const std::string sc_dt::sc_int_base::to_string ( sc_numrep  numrep = SC_DEC  )  const

sc_int_base.cpp549 行で定義されています。

00550 {
00551     int len = m_len;
00552     sc_fix aa( *this, len, len, SC_TRN, SC_WRAP, 0, SC_ON );
00553     return aa.to_string( numrep );
00554 }

const std::string sc_dt::sc_int_base::to_string ( sc_numrep  numrep,
bool  w_prefix 
) const

sc_int_base.cpp557 行で定義されています。

00558 {
00559     int len = m_len;
00560     sc_fix aa( *this, len, len, SC_TRN, SC_WRAP, 0, SC_ON );
00561     return aa.to_string( numrep, w_prefix );
00562 }

void sc_dt::sc_int_base::print ( ::std::ostream &  os = ::std::cout  )  const [inline]

sc_int_base.h850 行で定義されています。

00851         { os << to_string(sc_io_base(os,SC_DEC),sc_io_show_base(os)); }

void sc_dt::sc_int_base::scan ( ::std::istream &  is = ::std::cin  ) 

sc_int_base.cpp703 行で定義されています。

00704 {
00705     std::string s;
00706     is >> s;
00707     *this = s.c_str();
00708 }


フレンドと関連する関数

friend class sc_int_bitref_r [friend]

sc_int_base.h528 行で定義されています。

friend class sc_int_bitref [friend]

sc_int_base.h529 行で定義されています。

friend class sc_int_subref_r [friend]

sc_int_base.h530 行で定義されています。

friend class sc_int_subref [friend]

sc_int_base.h531 行で定義されています。

bool operator== ( const sc_int_base a,
const sc_int_base b 
) [friend]

sc_int_base.h703 行で定義されています。

00704         { return a.m_val == b.m_val; }

bool operator!= ( const sc_int_base a,
const sc_int_base b 
) [friend]

sc_int_base.h706 行で定義されています。

00707         { return a.m_val != b.m_val; }

bool operator< ( const sc_int_base a,
const sc_int_base b 
) [friend]

sc_int_base.h709 行で定義されています。

00710         { return a.m_val < b.m_val; }

bool operator<= ( const sc_int_base a,
const sc_int_base b 
) [friend]

sc_int_base.h712 行で定義されています。

00713         { return a.m_val <= b.m_val; }

bool operator> ( const sc_int_base a,
const sc_int_base b 
) [friend]

sc_int_base.h715 行で定義されています。

00716         { return a.m_val > b.m_val; }

bool operator>= ( const sc_int_base a,
const sc_int_base b 
) [friend]

sc_int_base.h718 行で定義されています。

00719         { return a.m_val >= b.m_val; }


変数

sc_int_base.h857 行で定義されています。

int sc_dt::sc_int_base::m_len [protected]

sc_int_base.h858 行で定義されています。

int sc_dt::sc_int_base::m_ulen [protected]

sc_int_base.h859 行で定義されています。


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

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