#include <sc_int_base.h>
Public メソッド | |
sc_int_subref_r (const sc_int_subref_r &a) | |
virtual | ~sc_int_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_int_subref_r () | |
void | initialize (const sc_int_base *obj_p, int left_i, int right_i) |
Protected 変数 | |
int | m_left |
sc_int_base * | m_obj_p |
int | m_right |
Private メソッド | |
const sc_int_subref_r & | operator= (const sc_int_subref_r &) |
フレンド | |
class | sc_int_base |
class | sc_int_signal |
class | sc_int_subref |
sc_int_base.h の 304 行で定義されています。
sc_dt::sc_int_subref_r::sc_int_subref_r | ( | ) | [inline, protected] |
sc_dt::sc_int_subref_r::sc_int_subref_r | ( | const sc_int_subref_r & | a | ) | [inline] |
virtual sc_dt::sc_int_subref_r::~sc_int_subref_r | ( | ) | [inline, virtual] |
void sc_dt::sc_int_subref_r::initialize | ( | const sc_int_base * | obj_p, | |
int | left_i, | |||
int | right_i | |||
) | [inline, protected] |
sc_int_base.h の 319 行で定義されています。
00320 { 00321 m_obj_p = (sc_int_base*)obj_p; 00322 m_left = left_i; 00323 m_right = right_i; 00324 }
int sc_dt::sc_int_subref_r::length | ( | ) | const [inline] |
virtual int sc_dt::sc_int_subref_r::concat_length | ( | bool * | xz_present_p | ) | const [inline, virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_int_base.h の 351 行で定義されています。
00352 { if ( xz_present_p ) *xz_present_p = false; return length(); }
bool sc_dt::sc_int_subref_r::concat_get_ctrl | ( | sc_digit * | dst_p, | |
int | low_i | |||
) | const [virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_int_base.cpp の 137 行で定義されています。
00138 { 00139 int dst_i; // Word in dst_p now processing. 00140 int end_i; // Highest order word in dst_p to process. 00141 int high_i; // Index of high order bit in dst_p to set. 00142 sc_digit mask; // Mask for bits to extract or keep. 00143 00144 dst_i = low_i / BITS_PER_DIGIT; 00145 high_i = low_i + (m_left-m_right); 00146 end_i = high_i / BITS_PER_DIGIT; 00147 mask = ~mask_int[m_left][m_right]; 00148 00149 00150 // PROCESS THE FIRST WORD: 00151 00152 dst_p[dst_i] = (unsigned long)(dst_p[dst_i] & mask); 00153 switch ( end_i - dst_i ) 00154 { 00155 // BITS ARE ACROSS TWO WORDS: 00156 00157 case 1: 00158 dst_i++; 00159 dst_p[dst_i] = 0; 00160 break; 00161 00162 // BITS ARE ACROSS THREE WORDS: 00163 00164 case 2: 00165 dst_i++; 00166 dst_p[dst_i++] = 0; 00167 dst_p[dst_i] = 0; 00168 break; 00169 00170 // BITS ARE ACROSS FOUR WORDS: 00171 00172 case 3: 00173 dst_i++; 00174 dst_p[dst_i++] = 0; 00175 dst_p[dst_i++] = 0; 00176 dst_p[dst_i] = 0; 00177 break; 00178 } 00179 return false; 00180 }
bool sc_dt::sc_int_subref_r::concat_get_data | ( | sc_digit * | dst_p, | |
int | low_i | |||
) | const [virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_int_base.cpp の 183 行で定義されています。
00184 { 00185 int dst_i; // Word in dst_p now processing. 00186 int end_i; // Highest order word in dst_p to process. 00187 int high_i; // Index of high order bit in dst_p to set. 00188 int left_shift; // Left shift for val. 00189 sc_digit mask; // Mask for bits to extract or keep. 00190 bool non_zero; // True if value inserted is non-zero. 00191 uint_type val; // Selection value extracted from m_obj_p. 00192 00193 dst_i = low_i / BITS_PER_DIGIT; 00194 left_shift = low_i % BITS_PER_DIGIT; 00195 high_i = low_i + (m_left-m_right); 00196 end_i = high_i / BITS_PER_DIGIT; 00197 mask = ~mask_int[m_left][m_right]; 00198 val = (m_obj_p->m_val & mask) >> m_right; 00199 non_zero = val != 0; 00200 00201 00202 // PROCESS THE FIRST WORD: 00203 00204 mask = ~(-1 << left_shift); 00205 dst_p[dst_i] = (unsigned long)((dst_p[dst_i] & mask) | 00206 ((val << left_shift) & DIGIT_MASK)); 00207 switch ( end_i - dst_i ) 00208 { 00209 // BITS ARE ACROSS TWO WORDS: 00210 00211 case 1: 00212 dst_i++; 00213 val >>= (BITS_PER_DIGIT-left_shift); 00214 dst_p[dst_i] = (unsigned long)(val & DIGIT_MASK); 00215 break; 00216 00217 // BITS ARE ACROSS THREE WORDS: 00218 00219 case 2: 00220 dst_i++; 00221 val >>= (BITS_PER_DIGIT-left_shift); 00222 dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK); 00223 val >>= BITS_PER_DIGIT; 00224 dst_p[dst_i] = (unsigned long)val; 00225 break; 00226 00227 // BITS ARE ACROSS FOUR WORDS: 00228 00229 case 3: 00230 dst_i++; 00231 val >>= (BITS_PER_DIGIT-left_shift); 00232 dst_p[dst_i++] = (unsigned long)(val & DIGIT_MASK); 00233 val >>= BITS_PER_DIGIT; 00234 dst_p[dst_i++] = (unsigned long)val; 00235 val >>= BITS_PER_DIGIT; 00236 dst_p[dst_i] = (unsigned long)val; 00237 break; 00238 } 00239 return non_zero; 00240 }
virtual uint64 sc_dt::sc_int_subref_r::concat_get_uint64 | ( | ) | const [inline, virtual] |
sc_dt::sc_value_baseを再定義しています。
sc_int_base.h の 355 行で定義されています。
00356 { 00357 int len = length(); 00358 uint64 val = operator uint_type(); 00359 if ( len < 64 ) 00360 return (uint64)(val & ~((uint_type)-1 << len)); 00361 else 00362 return (uint64)val; 00363 }
bool sc_dt::sc_int_subref_r::and_reduce | ( | ) | const [inline] |
sc_int_base.h の 1015 行で定義されています。
01016 { 01017 sc_int_base a( *this ); 01018 return a.and_reduce(); 01019 }
bool sc_dt::sc_int_subref_r::nand_reduce | ( | ) | const [inline] |
bool sc_dt::sc_int_subref_r::or_reduce | ( | ) | const [inline] |
sc_int_base.h の 1023 行で定義されています。
01024 { 01025 sc_int_base a( *this ); 01026 return a.or_reduce(); 01027 }
bool sc_dt::sc_int_subref_r::nor_reduce | ( | ) | const [inline] |
bool sc_dt::sc_int_subref_r::xor_reduce | ( | ) | const [inline] |
sc_int_base.h の 1031 行で定義されています。
01032 { 01033 sc_int_base a( *this ); 01034 return a.xor_reduce(); 01035 }
bool sc_dt::sc_int_subref_r::xnor_reduce | ( | ) | const [inline] |
sc_dt::sc_int_subref_r::operator uint_type | ( | ) | const [inline] |
sc_int_base.h の 1002 行で定義されています。
01003 { 01004 uint_type /*int_type*/ val = m_obj_p->m_val; 01005 int uleft = SC_INTWIDTH - (m_left + 1); 01006 int uright = uleft + m_right; 01007 return ( val << uleft >> uright ); 01008 }
uint_type sc_dt::sc_int_subref_r::value | ( | ) | const [inline] |
int sc_dt::sc_int_subref_r::to_int | ( | ) | const [inline] |
sc_int_base.h の 1042 行で定義されています。
01043 { 01044 int result = static_cast<int>(operator uint_type()); 01045 return result; 01046 }
unsigned int sc_dt::sc_int_subref_r::to_uint | ( | ) | const [inline] |
sc_int_base.h の 1050 行で定義されています。
01051 { 01052 unsigned int result = static_cast<unsigned int>(operator uint_type()); 01053 return result; 01054 }
long sc_dt::sc_int_subref_r::to_long | ( | ) | const [inline] |
sc_int_base.h の 1058 行で定義されています。
01059 { 01060 long result = static_cast<long>(operator uint_type()); 01061 return result; 01062 }
unsigned long sc_dt::sc_int_subref_r::to_ulong | ( | ) | const [inline] |
sc_int_base.h の 1066 行で定義されています。
01067 { 01068 unsigned long result = static_cast<unsigned long>(operator uint_type()); 01069 return result; 01070 }
int64 sc_dt::sc_int_subref_r::to_int64 | ( | ) | const [inline] |
sc_int_base.h の 1074 行で定義されています。
01075 { 01076 int64 result = operator uint_type(); 01077 return result; 01078 }
uint64 sc_dt::sc_int_subref_r::to_uint64 | ( | ) | const [inline] |
sc_int_base.h の 1082 行で定義されています。
01083 { 01084 uint64 result = operator uint_type(); 01085 return result; 01086 }
double sc_dt::sc_int_subref_r::to_double | ( | ) | const [inline] |
sc_int_base.h の 1090 行で定義されています。
01091 { 01092 double result = static_cast<double>(operator uint_type()); 01093 return result; 01094 }
const std::string sc_dt::sc_int_subref_r::to_string | ( | sc_numrep | numrep = SC_DEC |
) | const [inline] |
sc_int_base.h の 1101 行で定義されています。
01102 { 01103 sc_uint_base a(length()); 01104 a = operator uint_type(); 01105 return a.to_string( numrep ); 01106 }
const std::string sc_dt::sc_int_subref_r::to_string | ( | sc_numrep | numrep, | |
bool | w_prefix | |||
) | const [inline] |
sc_int_base.h の 1110 行で定義されています。
01111 { 01112 sc_uint_base a(length()); 01113 a = operator uint_type(); 01114 return a.to_string( numrep, w_prefix ); 01115 }
void sc_dt::sc_int_subref_r::print | ( | ::std::ostream & | os = ::std::cout |
) | const [inline] |
sc_int_base.h の 411 行で定義されています。
00412 { os << to_string(sc_io_base(os,SC_DEC),sc_io_show_base(os)); }
const sc_int_subref_r& sc_dt::sc_int_subref_r::operator= | ( | const sc_int_subref_r & | ) | [private] |
sc_dt::sc_int_subrefで再定義されています。
friend class sc_int_base [friend] |
friend class sc_int_signal [friend] |
sc_int_base.h の 307 行で定義されています。
friend class sc_int_subref [friend] |
sc_int_base.h の 308 行で定義されています。
int sc_dt::sc_int_subref_r::m_left [protected] |
sc_int_base.h の 416 行で定義されています。
sc_int_base* sc_dt::sc_int_subref_r::m_obj_p [protected] |
sc_int_base.h の 417 行で定義されています。
int sc_dt::sc_int_subref_r::m_right [protected] |
sc_int_base.h の 418 行で定義されています。