Public メソッド | |
wif_signed_int_trace (const int &object_, const std::string &name_, const std::string &wif_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const int & | object |
int | old_value |
unsigned | mask |
sc_wif_trace.cpp の 1103 行で定義されています。
sc_core::wif_signed_int_trace::wif_signed_int_trace | ( | const int & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
int | width_ | |||
) |
void sc_core::wif_signed_int_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1143 行で定義されています。
01144 { 01145 char buf[1000]; 01146 int bitindex; 01147 01148 // Check for overflow 01149 if (((unsigned) object & mask) != (unsigned) object) { 01150 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01151 buf[bitindex]='0'; 01152 } 01153 } 01154 else{ 01155 unsigned bit_mask = 1 << (bit_width-1); 01156 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01157 buf[bitindex] = (object & bit_mask)? '1' : '0'; 01158 bit_mask = bit_mask >> 1; 01159 } 01160 } 01161 buf[bitindex] = '\0'; 01162 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 01163 old_value = object; 01164 }
bool sc_core::wif_signed_int_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1137 行で定義されています。
01138 { 01139 return object != old_value; 01140 }
const int& sc_core::wif_signed_int_trace::object [protected] |
sc_wif_trace.cpp の 1113 行で定義されています。
int sc_core::wif_signed_int_trace::old_value [protected] |
sc_wif_trace.cpp の 1114 行で定義されています。
unsigned sc_core::wif_signed_int_trace::mask [protected] |
sc_wif_trace.cpp の 1115 行で定義されています。