#include <sc_concatref.h>
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_unsigned & | value () 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_concatref & | operator= (int v) |
const sc_concatref & | operator= (long v) |
const sc_concatref & | operator= (int64 v) |
const sc_concatref & | operator= (unsigned int v) |
const sc_concatref & | operator= (unsigned long v) |
const sc_concatref & | operator= (uint64 v) |
const sc_concatref & | operator= (const sc_concatref &v) |
const sc_concatref & | operator= (const sc_signed &v) |
const sc_concatref & | operator= (const sc_unsigned &v) |
const sc_concatref & | operator= (const char *v_p) |
const sc_concatref & | operator= (const sc_bv_base &v) |
const sc_concatref & | operator= (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_base * | m_left_p |
sc_value_base * | m_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.h の 79 行で定義されています。
sc_concatref.h の 415 行で定義されています。
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_dt::sc_concatref::sc_concatref | ( | const sc_concatref & | ) | [private] |
sc_dt::sc_concatref::sc_concatref | ( | ) | [inline, private] |
void sc_dt::sc_concatref::initialize | ( | sc_value_base & | left, | |
sc_value_base & | right | |||
) | [inline] |
sc_concatref.h の 84 行で定義されています。
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.h の 98 行で定義されています。
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] |
virtual int sc_dt::sc_concatref::concat_length | ( | bool * | xz_present_p | ) | const [inline, virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_concatref.h の 129 行で定義されています。
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.h の 136 行で定義されています。
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.h の 142 行で定義されています。
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.h の 149 行で定義されています。
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.h の 156 行で定義されています。
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.h の 167 行で定義されています。
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.h の 173 行で定義されています。
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.h の 179 行で定義されています。
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.h の 185 行で定義されています。
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.h の 194 行で定義されています。
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.h の 214 行で定義されています。
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] |
int sc_dt::sc_concatref::to_int | ( | ) | const [inline] |
unsigned int sc_dt::sc_concatref::to_uint | ( | ) | const [inline] |
long sc_dt::sc_concatref::to_long | ( | ) | const [inline] |
unsigned long sc_dt::sc_concatref::to_ulong | ( | ) | const [inline] |
double sc_dt::sc_concatref::to_double | ( | ) | const [inline] |
void sc_dt::sc_concatref::to_sc_signed | ( | sc_signed & | target | ) | const [inline] |
void sc_dt::sc_concatref::to_sc_unsigned | ( | sc_unsigned & | target | ) | const [inline] |
sc_dt::sc_concatref::operator uint64 | ( | ) | const [inline] |
sc_dt::sc_concatref::operator const sc_unsigned & | ( | ) | const [inline] |
sc_unsigned sc_dt::sc_concatref::operator+ | ( | ) | const [inline] |
sc_signed sc_dt::sc_concatref::operator- | ( | ) | const [inline] |
sc_unsigned sc_dt::sc_concatref::operator~ | ( | ) | const [inline] |
const std::string sc_dt::sc_concatref::to_string | ( | sc_numrep | numrep = SC_DEC |
) | const [inline] |
const std::string sc_dt::sc_concatref::to_string | ( | sc_numrep | numrep, | |
bool | w_prefix | |||
) | const [inline] |
const sc_concatref& sc_dt::sc_concatref::operator= | ( | int | v | ) | [inline] |
const sc_concatref& sc_dt::sc_concatref::operator= | ( | long | v | ) | [inline] |
const sc_concatref& sc_dt::sc_concatref::operator= | ( | int64 | v | ) | [inline] |
sc_concatref.h の 300 行で定義されています。
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] |
const sc_concatref& sc_dt::sc_concatref::operator= | ( | unsigned long | v | ) | [inline] |
const sc_concatref& sc_dt::sc_concatref::operator= | ( | uint64 | v | ) | [inline] |
sc_concatref.h の 321 行で定義されています。
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.h の 328 行で定義されています。
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.h の 337 行で定義されています。
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.h の 344 行で定義されています。
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.h の 351 行で定義されています。
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.h の 360 行で定義されています。
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.h の 369 行で定義されています。
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] |
bool sc_dt::sc_concatref::nand_reduce | ( | ) | const [inline] |
bool sc_dt::sc_concatref::or_reduce | ( | ) | const [inline] |
bool sc_dt::sc_concatref::nor_reduce | ( | ) | const [inline] |
bool sc_dt::sc_concatref::xor_reduce | ( | ) | const [inline] |
bool sc_dt::sc_concatref::xnor_reduce | ( | ) | const [inline] |
void sc_dt::sc_concatref::print | ( | ::std::ostream & | os = ::std::cout |
) | const [inline] |
void sc_dt::sc_concatref::scan | ( | ::std::istream & | is | ) | [inline] |
friend class sc_core::sc_vpool< sc_concatref > [friend] |
sc_concatref.h の 82 行で定義されています。
sc_core::sc_vpool< sc_concatref > sc_dt::sc_concatref::m_pool [static] |
sc_concatref.h の 412 行で定義されています。
sc_value_base* sc_dt::sc_concatref::m_left_p [protected] |
sc_concatref.h の 421 行で定義されています。
sc_value_base* sc_dt::sc_concatref::m_right_p [protected] |
sc_concatref.h の 422 行で定義されています。
int sc_dt::sc_concatref::m_len [protected] |
sc_concatref.h の 423 行で定義されています。
int sc_dt::sc_concatref::m_len_r [protected] |
sc_concatref.h の 424 行で定義されています。
concat_flags sc_dt::sc_concatref::m_flags [protected] |
sc_concatref.h の 425 行で定義されています。