クラス sc_dt::sc_concatref

#include <sc_concatref.h>

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public 型

enum  concat_flags { cf_none = 0, cf_xz_present = 1 }

Public メソッド

void initialize (sc_value_base &left, sc_value_base &right)
void initialize (const sc_value_base &left, const sc_value_base &right)
virtual ~sc_concatref ()
unsigned int length () const
virtual int concat_length (bool *xz_present_p) const
virtual void concat_clear_data (bool to_ones)
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)
uint64 to_uint64 () const
const sc_unsignedvalue () const
int64 to_int64 () const
int to_int () const
unsigned int to_uint () const
long to_long () const
unsigned long to_ulong () const
double to_double () const
void to_sc_signed (sc_signed &target) const
void to_sc_unsigned (sc_unsigned &target) const
 operator uint64 () const
 operator const sc_unsigned & () const
sc_unsigned operator+ () const
sc_signed operator- () const
sc_unsigned operator~ () const
const std::string to_string (sc_numrep numrep=SC_DEC) const
const std::string to_string (sc_numrep numrep, bool w_prefix) const
const sc_concatrefoperator= (int v)
const sc_concatrefoperator= (long v)
const sc_concatrefoperator= (int64 v)
const sc_concatrefoperator= (unsigned int v)
const sc_concatrefoperator= (unsigned long v)
const sc_concatrefoperator= (uint64 v)
const sc_concatrefoperator= (const sc_concatref &v)
const sc_concatrefoperator= (const sc_signed &v)
const sc_concatrefoperator= (const sc_unsigned &v)
const sc_concatrefoperator= (const char *v_p)
const sc_concatrefoperator= (const sc_bv_base &v)
const sc_concatrefoperator= (const sc_lv_base &v)
bool and_reduce () const
bool nand_reduce () const
bool or_reduce () const
bool nor_reduce () const
bool xor_reduce () const
bool xnor_reduce () const
void print (::std::ostream &os=::std::cout) const
void scan (::std::istream &is)

Static Public 変数

static sc_core::sc_vpool
< sc_concatref
m_pool

Protected 変数

sc_value_basem_left_p
sc_value_basem_right_p
int m_len
int m_len_r
concat_flags m_flags

Private メソッド

 sc_concatref (const sc_concatref &)
 sc_concatref ()

フレンド

class sc_core::sc_vpool< sc_concatref >


説明

sc_concatref.h79 行で定義されています。


列挙型

列挙型の値:
cf_none 
cf_xz_present 

sc_concatref.h415 行で定義されています。

00415                       {
00416         cf_none = 0,        // Normal value. 
00417         cf_xz_present = 1   // X and/or Z values present.
00418     };


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

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

sc_concatref.h113 行で定義されています。

00114     {}

sc_dt::sc_concatref::sc_concatref ( const sc_concatref  )  [private]

sc_dt::sc_concatref::sc_concatref (  )  [inline, private]

sc_concatref.h429 行で定義されています。

00429 { }


関数

void sc_dt::sc_concatref::initialize ( sc_value_base left,
sc_value_base right 
) [inline]

sc_concatref.h84 行で定義されています。

00086         {    
00087             bool left_xz;   // True if x's and/or z's found in left.
00088             bool right_xz;  // True if x's and/or z's found in right.
00089             
00090             m_left_p = (sc_value_base*)&left;
00091             m_right_p = (sc_value_base*)&right;
00092             m_len_r = right.concat_length(&right_xz);
00093             m_len = left.concat_length(&left_xz) + m_len_r;
00094             m_flags = ( left_xz || right_xz ) ? cf_xz_present : cf_none;
00095         }

void sc_dt::sc_concatref::initialize ( const sc_value_base left,
const sc_value_base right 
) [inline]

sc_concatref.h98 行で定義されています。

00100         {    
00101             bool left_xz;   // True if x's and/or z's found in left.
00102             bool right_xz;  // True if x's and/or z's found in right.
00103 
00104             m_left_p = (sc_value_base*)&left;
00105             m_right_p = (sc_value_base*)&right;
00106             m_len_r = right.concat_length(&right_xz);
00107             m_len = left.concat_length(&left_xz) + m_len_r;
00108             m_flags = ( left_xz || right_xz ) ? cf_xz_present : cf_none;
00109         }

unsigned int sc_dt::sc_concatref::length (  )  const [inline]

sc_concatref.h119 行で定義されています。

00120         { return m_len; }

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

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

sc_concatref.h129 行で定義されています。

00130     { 
00131         if ( xz_present_p ) 
00132             *xz_present_p = m_flags & cf_xz_present ? true : false;
00133         return m_len; 
00134     }

virtual void sc_dt::sc_concatref::concat_clear_data ( bool  to_ones  )  [inline, virtual]

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

sc_concatref.h136 行で定義されています。

00137     { 
00138         m_left_p->concat_clear_data(to_ones); 
00139         m_right_p->concat_clear_data(to_ones); 
00140     }

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

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

sc_concatref.h142 行で定義されています。

00143     {
00144         bool rnz = m_right_p->concat_get_ctrl( dst_p, low_i );
00145         bool lnz = m_left_p->concat_get_ctrl( dst_p, low_i+m_len_r );
00146         return rnz || lnz;
00147     }

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

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

sc_concatref.h149 行で定義されています。

00150     {
00151         bool rnz = m_right_p->concat_get_data( dst_p, low_i );
00152         bool lnz = m_left_p->concat_get_data( dst_p, low_i+m_len_r );
00153         return rnz || lnz;
00154     }

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

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

sc_concatref.h156 行で定義されています。

00157     {
00158         if ( m_len_r >= 64 )
00159             return m_right_p->concat_get_uint64();
00160         else
00161         {
00162             return (m_left_p->concat_get_uint64() << m_len_r) | 
00163                 m_right_p->concat_get_uint64();
00164         }
00165     }

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

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

sc_concatref.h167 行で定義されています。

00168     { 
00169         m_right_p->concat_set( src, low_i );
00170         m_left_p->concat_set( src, low_i+m_len_r);
00171     }

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

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

sc_concatref.h173 行で定義されています。

00174     {
00175         m_right_p->concat_set( src, low_i );
00176         m_left_p->concat_set( src, low_i+m_len_r);
00177     }

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

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

sc_concatref.h179 行で定義されています。

00180     { 
00181         m_right_p->concat_set( src, low_i );
00182         m_left_p->concat_set( src, low_i+m_len_r);
00183     }

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

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

sc_concatref.h185 行で定義されています。

00186     { 
00187         m_right_p->concat_set( src, low_i );
00188         m_left_p->concat_set( src, low_i+m_len_r);
00189     }

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

sc_concatref.h194 行で定義されています。

00195         {
00196             uint64 mask;
00197             uint64 result;
00198 
00199             result = m_right_p->concat_get_uint64();
00200             if ( m_len_r < 64 )
00201             {
00202                 mask = ~0;
00203                 result = (m_left_p->concat_get_uint64() << m_len_r) | 
00204                             (result & ~(mask << m_len_r));
00205             }
00206             if ( m_len < 64 )
00207             {
00208                 mask = ~0;
00209                 result = result & ~(mask << m_len);
00210             }
00211             return result;
00212         }

const sc_unsigned& sc_dt::sc_concatref::value (  )  const [inline]

sc_concatref.h214 行で定義されています。

00215         {
00216             bool           left_non_zero;
00217             sc_unsigned*   result_p = sc_unsigned::m_pool.allocate();
00218             bool           right_non_zero;
00219 
00220             result_p->nbits = result_p->num_bits(m_len);
00221             result_p->ndigits = (result_p->nbits+BITS_PER_DIGIT-1) / 
00222                 BITS_PER_DIGIT;
00223             result_p->digit = (sc_digit*)sc_core::sc_temp_heap.allocate( 
00224                 sizeof(sc_digit)*result_p->ndigits );
00225             right_non_zero = m_right_p->concat_get_data( result_p->digit, 0 );
00226             left_non_zero = m_left_p->concat_get_data(result_p->digit, m_len_r); 
00227             if ( left_non_zero || right_non_zero ) 
00228                 result_p->sgn = SC_POS;
00229             else
00230                 result_p->sgn = SC_ZERO;
00231             return *result_p;
00232         }

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

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

00235         { 
00236             return (int64)to_uint64();
00237         }

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

sc_concatref.h238 行で定義されています。

00239         { return (int)to_int64(); }

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

sc_concatref.h240 行で定義されています。

00241         { return (unsigned int)to_uint64(); }

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

sc_concatref.h242 行で定義されています。

00243         { return (long)to_int64(); }

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

sc_concatref.h244 行で定義されています。

00245         { return (unsigned long)to_uint64(); }

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

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

00247         { return value().to_double(); }

void sc_dt::sc_concatref::to_sc_signed ( sc_signed target  )  const [inline]

sc_concatref.h249 行で定義されています。

00250         { target = value(); }

void sc_dt::sc_concatref::to_sc_unsigned ( sc_unsigned target  )  const [inline]

sc_concatref.h252 行で定義されています。

00253         { target = value(); }

sc_dt::sc_concatref::operator uint64 (  )  const [inline]

sc_concatref.h257 行で定義されています。

00258         { return to_uint64(); }

sc_dt::sc_concatref::operator const sc_unsigned & (  )  const [inline]

sc_concatref.h260 行で定義されています。

00261         { return value(); }

sc_unsigned sc_dt::sc_concatref::operator+ (  )  const [inline]

sc_concatref.h265 行で定義されています。

00266         { return value(); } 

sc_signed sc_dt::sc_concatref::operator- (  )  const [inline]

sc_concatref.h268 行で定義されています。

00269         { return -value(); } 

sc_unsigned sc_dt::sc_concatref::operator~ (  )  const [inline]

sc_concatref.h271 行で定義されています。

00272         { return ~value(); } 

const std::string sc_dt::sc_concatref::to_string ( sc_numrep  numrep = SC_DEC  )  const [inline]

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

00277         { return value().to_string(numrep); }

const std::string sc_dt::sc_concatref::to_string ( sc_numrep  numrep,
bool  w_prefix 
) const [inline]

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

00280         { return value().to_string(numrep,w_prefix); }

const sc_concatref& sc_dt::sc_concatref::operator= ( int  v  )  [inline]

sc_concatref.h286 行で定義されています。

00287     {
00288         m_right_p->concat_set((int64)v, 0);
00289         m_left_p->concat_set((int64)v, m_len_r);
00290         return *this;
00291     }

const sc_concatref& sc_dt::sc_concatref::operator= ( long  v  )  [inline]

sc_concatref.h293 行で定義されています。

00294     {
00295         m_right_p->concat_set((int64)v, 0);
00296         m_left_p->concat_set((int64)v, m_len_r);
00297         return *this;
00298     }

const sc_concatref& sc_dt::sc_concatref::operator= ( int64  v  )  [inline]

sc_concatref.h300 行で定義されています。

00301     {
00302         m_right_p->concat_set(v, 0);
00303         m_left_p->concat_set(v, m_len_r);
00304         return *this;
00305     }

const sc_concatref& sc_dt::sc_concatref::operator= ( unsigned int  v  )  [inline]

sc_concatref.h307 行で定義されています。

00308     {
00309         m_right_p->concat_set((uint64)v, 0);
00310         m_left_p->concat_set((uint64)v, m_len_r);
00311         return *this;
00312     }

const sc_concatref& sc_dt::sc_concatref::operator= ( unsigned long  v  )  [inline]

sc_concatref.h314 行で定義されています。

00315     {
00316         m_right_p->concat_set((uint64)v, 0);
00317         m_left_p->concat_set((uint64)v, m_len_r);
00318         return *this;
00319     }

const sc_concatref& sc_dt::sc_concatref::operator= ( uint64  v  )  [inline]

sc_concatref.h321 行で定義されています。

00322     {
00323         m_right_p->concat_set(v, 0);
00324         m_left_p->concat_set(v, m_len_r);
00325         return *this;
00326     }

const sc_concatref& sc_dt::sc_concatref::operator= ( const sc_concatref v  )  [inline]

sc_concatref.h328 行で定義されています。

00329     {
00330         sc_unsigned temp(v.length());
00331         temp = v.value();
00332         m_right_p->concat_set(temp, 0);
00333         m_left_p->concat_set(temp, m_len_r);
00334         return *this;
00335     }

const sc_concatref& sc_dt::sc_concatref::operator= ( const sc_signed v  )  [inline]

sc_concatref.h337 行で定義されています。

00338     {
00339         m_right_p->concat_set(v, 0);
00340         m_left_p->concat_set(v, m_len_r);
00341         return *this;
00342     }

const sc_concatref& sc_dt::sc_concatref::operator= ( const sc_unsigned v  )  [inline]

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

00345     {
00346         m_right_p->concat_set(v, 0);
00347         m_left_p->concat_set(v, m_len_r);
00348         return *this;
00349     }

const sc_concatref& sc_dt::sc_concatref::operator= ( const char *  v_p  )  [inline]

sc_concatref.h351 行で定義されています。

00352     {
00353         sc_unsigned v(strlen(v_p));
00354         v = v_p;
00355         m_right_p->concat_set(v, 0);
00356         m_left_p->concat_set(v, m_len_r);
00357         return *this;
00358     }

const sc_concatref& sc_dt::sc_concatref::operator= ( const sc_bv_base v  )  [inline]

sc_concatref.h360 行で定義されています。

00361     {
00362         sc_unsigned temp(v.length());
00363         temp = v;
00364         m_right_p->concat_set(temp, 0);
00365         m_left_p->concat_set(temp, m_len_r);
00366         return *this;
00367     }

const sc_concatref& sc_dt::sc_concatref::operator= ( const sc_lv_base v  )  [inline]

sc_concatref.h369 行で定義されています。

00370     {
00371         sc_unsigned data(v.length());
00372         data = v;
00373         m_right_p->concat_set(data, 0);
00374         m_left_p->concat_set(data, m_len_r);
00375         return *this;
00376     }

bool sc_dt::sc_concatref::and_reduce (  )  const [inline]

sc_concatref.h381 行で定義されています。

00382         { return value().and_reduce(); }

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

sc_concatref.h384 行で定義されています。

00385         { return value().nand_reduce(); }

bool sc_dt::sc_concatref::or_reduce (  )  const [inline]

sc_concatref.h387 行で定義されています。

00388         { return value().or_reduce(); }

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

sc_concatref.h390 行で定義されています。

00391         { return value().nor_reduce(); }

bool sc_dt::sc_concatref::xor_reduce (  )  const [inline]

sc_concatref.h393 行で定義されています。

00394         { return value().xor_reduce(); }

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

sc_concatref.h396 行で定義されています。

00397         { return value().xnor_reduce(); }

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

sc_concatref.h401 行で定義されています。

00402         { os << this->value(); }

void sc_dt::sc_concatref::scan ( ::std::istream &  is  )  [inline]

sc_concatref.h404 行で定義されています。

00405     { 
00406         std::string s; 
00407         is >> s; 
00408         *this = s.c_str(); 
00409     } 


フレンドと関連する関数

friend class sc_core::sc_vpool< sc_concatref > [friend]

sc_concatref.h82 行で定義されています。


変数

sc_concatref.h412 行で定義されています。

sc_concatref.h421 行で定義されています。

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

int sc_dt::sc_concatref::m_len [protected]

sc_concatref.h423 行で定義されています。

sc_concatref.h424 行で定義されています。

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


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

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