#include <sc_uint_base.h>
Public メソッド | |
sc_uint_subref_r (const sc_uint_subref_r &init) | |
virtual | ~sc_uint_subref_r () |
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 |
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 uint_type () const | |
uint_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 |
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 |
Protected メソッド | |
sc_uint_subref_r () | |
void | initialize (const sc_uint_base *obj_p, int left_i, int right_i) |
Protected 変数 | |
int | m_left |
sc_uint_base * | m_obj_p |
int | m_right |
Private メソッド | |
sc_uint_subref_r & | operator= (const sc_uint_subref_r &) |
フレンド | |
class | sc_uint_base |
class | sc_uint_subref |
sc_uint_base.h の 296 行で定義されています。
sc_dt::sc_uint_subref_r::sc_uint_subref_r | ( | const sc_uint_subref_r & | init | ) | [inline] |
sc_dt::sc_uint_subref_r::sc_uint_subref_r | ( | ) | [inline, protected] |
virtual sc_dt::sc_uint_subref_r::~sc_uint_subref_r | ( | ) | [inline, virtual] |
void sc_dt::sc_uint_subref_r::initialize | ( | const sc_uint_base * | obj_p, | |
int | left_i, | |||
int | right_i | |||
) | [inline, protected] |
sc_uint_base.h の 315 行で定義されています。
00316 { 00317 m_obj_p = (sc_uint_base*)obj_p; 00318 m_left = left_i; 00319 m_right = right_i; 00320 }
int sc_dt::sc_uint_subref_r::length | ( | ) | const [inline] |
virtual int sc_dt::sc_uint_subref_r::concat_length | ( | bool * | xz_present_p | ) | const [inline, virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_uint_base.h の 341 行で定義されています。
00342 { if ( xz_present_p ) *xz_present_p = false; return length(); }
bool sc_dt::sc_uint_subref_r::concat_get_ctrl | ( | sc_digit * | dst_p, | |
int | low_i | |||
) | const [virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_uint_base.cpp の 136 行で定義されています。
00137 { 00138 int dst_i; // Word in dst_p now processing. 00139 int end_i; // Highest order word in dst_p to process. 00140 int left_shift; // Left shift for val. 00141 sc_digit mask; // Mask for bits to extract or keep. 00142 00143 dst_i = low_i / BITS_PER_DIGIT; 00144 left_shift = low_i % BITS_PER_DIGIT; 00145 end_i = (low_i + (m_left-m_right)) / BITS_PER_DIGIT; 00146 00147 mask = ~(-1 << left_shift); 00148 dst_p[dst_i] = (unsigned long)((dst_p[dst_i] & mask)); 00149 00150 dst_i++; 00151 for ( ; dst_i <= end_i; dst_i++ ) dst_p[dst_i] = 0; 00152 00153 return false; 00154 }
bool sc_dt::sc_uint_subref_r::concat_get_data | ( | sc_digit * | dst_p, | |
int | low_i | |||
) | const [virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_uint_base.cpp の 156 行で定義されています。
00157 { 00158 int dst_i; // Word in dst_p now processing. 00159 int end_i; // Highest order word in dst_p to process. 00160 int high_i; // Index of high order bit in dst_p to set. 00161 int left_shift; // Left shift for val. 00162 sc_digit mask; // Mask for bits to extract or keep. 00163 bool result; // True if inserting non-zero value. 00164 uint_type val; // Selection value extracted from m_obj_p. 00165 00166 dst_i = low_i / BITS_PER_DIGIT; 00167 left_shift = low_i % BITS_PER_DIGIT; 00168 high_i = low_i + (m_left-m_right); 00169 end_i = high_i / BITS_PER_DIGIT; 00170 mask = ~mask_int[m_left][m_right]; 00171 val = (m_obj_p->m_val & mask) >> m_right; 00172 result = val != 0; 00173 00174 00175 // PROCESS THE FIRST WORD: 00176 00177 mask = ~(-1 << left_shift); 00178 dst_p[dst_i] = (unsigned long)(((dst_p[dst_i] & mask)) | 00179 ((val << left_shift) & DIGIT_MASK)); 00180 00181 switch ( end_i - dst_i ) 00182 { 00183 // BITS ARE ACROSS TWO WORDS: 00184 00185 case 1: 00186 dst_i++; 00187 val >>= (BITS_PER_DIGIT-left_shift); 00188 dst_p[dst_i] = (unsigned long)val; 00189 break; 00190 00191 // BITS ARE ACROSS THREE WORDS: 00192 00193 case 2: 00194 dst_i++; 00195 val >>= (BITS_PER_DIGIT-left_shift); 00196 dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK); 00197 val >>= BITS_PER_DIGIT; 00198 dst_p[dst_i] = (unsigned long)val; 00199 break; 00200 00201 // BITS ARE ACROSS THREE WORDS: 00202 00203 case 3: 00204 dst_i++; 00205 val >>= (BITS_PER_DIGIT-left_shift); 00206 dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK); 00207 val >>= BITS_PER_DIGIT; 00208 dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK); 00209 val >>= BITS_PER_DIGIT; 00210 dst_p[dst_i] = (unsigned long)val; 00211 break; 00212 } 00213 return result; 00214 }
virtual uint64 sc_dt::sc_uint_subref_r::concat_get_uint64 | ( | ) | const [inline, virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_uint_base.h の 345 行で定義されています。
00346 { return (uint64)operator uint_type(); }
bool sc_dt::sc_uint_subref_r::and_reduce | ( | ) | const [inline] |
sc_uint_base.h の 988 行で定義されています。
00989 { 00990 sc_uint_base a( *this ); 00991 return a.and_reduce(); 00992 }
bool sc_dt::sc_uint_subref_r::nand_reduce | ( | ) | const [inline] |
bool sc_dt::sc_uint_subref_r::or_reduce | ( | ) | const [inline] |
sc_uint_base.h の 996 行で定義されています。
00997 { 00998 sc_uint_base a( *this ); 00999 return a.or_reduce(); 01000 }
bool sc_dt::sc_uint_subref_r::nor_reduce | ( | ) | const [inline] |
bool sc_dt::sc_uint_subref_r::xor_reduce | ( | ) | const [inline] |
sc_uint_base.h の 1004 行で定義されています。
01005 { 01006 sc_uint_base a( *this ); 01007 return a.xor_reduce(); 01008 }
bool sc_dt::sc_uint_subref_r::xnor_reduce | ( | ) | const [inline] |
sc_dt::sc_uint_subref_r::operator uint_type | ( | ) | const [inline] |
sc_uint_base.h の 976 行で定義されています。
00977 { 00978 uint_type val = m_obj_p->m_val; 00979 int uleft = SC_INTWIDTH - (m_left + 1); 00980 return ( (val & (~UINT_ZERO >> uleft)) >> m_right ); 00981 }
uint_type sc_dt::sc_uint_subref_r::value | ( | ) | const [inline] |
int sc_dt::sc_uint_subref_r::to_int | ( | ) | const [inline] |
sc_uint_base.h の 1015 行で定義されています。
01016 { 01017 sc_uint_base a( *this ); 01018 return a.to_int(); 01019 }
unsigned int sc_dt::sc_uint_subref_r::to_uint | ( | ) | const [inline] |
sc_uint_base.h の 1023 行で定義されています。
01024 { 01025 sc_uint_base a( *this ); 01026 return a.to_uint(); 01027 }
long sc_dt::sc_uint_subref_r::to_long | ( | ) | const [inline] |
sc_uint_base.h の 1031 行で定義されています。
01032 { 01033 sc_uint_base a( *this ); 01034 return a.to_long(); 01035 }
unsigned long sc_dt::sc_uint_subref_r::to_ulong | ( | ) | const [inline] |
sc_uint_base.h の 1039 行で定義されています。
01040 { 01041 sc_uint_base a( *this ); 01042 return a.to_ulong(); 01043 }
int64 sc_dt::sc_uint_subref_r::to_int64 | ( | ) | const [inline] |
sc_uint_base.h の 1047 行で定義されています。
01048 { 01049 sc_uint_base a( *this ); 01050 return a.to_int64(); 01051 }
uint64 sc_dt::sc_uint_subref_r::to_uint64 | ( | ) | const [inline] |
sc_uint_base.h の 1055 行で定義されています。
01056 { 01057 sc_uint_base a( *this ); 01058 return a.to_uint64(); 01059 }
double sc_dt::sc_uint_subref_r::to_double | ( | ) | const [inline] |
sc_uint_base.h の 1063 行で定義されています。
01064 { 01065 sc_uint_base a( *this ); 01066 return a.to_double(); 01067 }
const std::string sc_dt::sc_uint_subref_r::to_string | ( | sc_numrep | numrep = SC_DEC |
) | const [inline] |
sc_uint_base.h の 1074 行で定義されています。
01075 { 01076 sc_uint_base a( *this ); 01077 return a.to_string( numrep ); 01078 }
const std::string sc_dt::sc_uint_subref_r::to_string | ( | sc_numrep | numrep, | |
bool | w_prefix | |||
) | const [inline] |
sc_uint_base.h の 1082 行で定義されています。
01083 { 01084 sc_uint_base a( *this ); 01085 return a.to_string( numrep, w_prefix ); 01086 }
void sc_dt::sc_uint_subref_r::print | ( | ::std::ostream & | os = ::std::cout |
) | const [inline] |
sc_uint_base.h の 395 行で定義されています。
00396 { os << to_string(sc_io_base(os,SC_DEC),sc_io_show_base(os)); }
sc_uint_subref_r& sc_dt::sc_uint_subref_r::operator= | ( | const sc_uint_subref_r & | ) | [private] |
sc_dt::sc_uint_subrefで再定義されています。
friend class sc_uint_base [friend] |
friend class sc_uint_subref [friend] |
sc_uint_base.h の 299 行で定義されています。
int sc_dt::sc_uint_subref_r::m_left [protected] |
sc_uint_base.h の 400 行で定義されています。
sc_uint_base* sc_dt::sc_uint_subref_r::m_obj_p [protected] |
sc_uint_base.h の 401 行で定義されています。
int sc_dt::sc_uint_subref_r::m_right [protected] |
sc_uint_base.h の 402 行で定義されています。