Public メソッド | |
wif_signed_long_trace (const long &object_, const std::string &name_, const std::string &wif_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const long & | object |
long | old_value |
unsigned long | mask |
sc_wif_trace.cpp の 1298 行で定義されています。
sc_core::wif_signed_long_trace::wif_signed_long_trace | ( | const long & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
int | width_ | |||
) |
void sc_core::wif_signed_long_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1338 行で定義されています。
01339 { 01340 char buf[1000]; 01341 int bitindex; 01342 01343 // Check for overflow 01344 if (((unsigned long) object & mask) != (unsigned long) object) { 01345 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01346 buf[bitindex]='0'; 01347 } 01348 } else { 01349 unsigned bit_mask = 1 << (bit_width-1); 01350 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01351 buf[bitindex] = (object & bit_mask)? '1' : '0'; 01352 bit_mask = bit_mask >> 1; 01353 } 01354 } 01355 buf[bitindex] = '\0'; 01356 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 01357 old_value = object; 01358 }
bool sc_core::wif_signed_long_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1332 行で定義されています。
01333 { 01334 return object != old_value; 01335 }
const long& sc_core::wif_signed_long_trace::object [protected] |
sc_wif_trace.cpp の 1308 行で定義されています。
long sc_core::wif_signed_long_trace::old_value [protected] |
sc_wif_trace.cpp の 1309 行で定義されています。
unsigned long sc_core::wif_signed_long_trace::mask [protected] |
sc_wif_trace.cpp の 1310 行で定義されています。