Public メソッド | |
wif_signed_char_trace (const char &object_, const std::string &name_, const std::string &wif_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const char & | object |
char | old_value |
unsigned char | mask |
sc_wif_trace.cpp の 1233 行で定義されています。
sc_core::wif_signed_char_trace::wif_signed_char_trace | ( | const char & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
int | width_ | |||
) |
void sc_core::wif_signed_char_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1273 行で定義されています。
01274 { 01275 char buf[1000]; 01276 int bitindex; 01277 01278 // Check for overflow 01279 if (((unsigned char) object & mask) != (unsigned char) object) { 01280 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01281 buf[bitindex]='0'; 01282 } 01283 } 01284 else{ 01285 unsigned bit_mask = 1 << (bit_width-1); 01286 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01287 buf[bitindex] = (object & bit_mask)? '1' : '0'; 01288 bit_mask = bit_mask >> 1; 01289 } 01290 } 01291 buf[bitindex] = '\0'; 01292 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 01293 old_value = object; 01294 }
bool sc_core::wif_signed_char_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1267 行で定義されています。
01268 { 01269 return object != old_value; 01270 }
const char& sc_core::wif_signed_char_trace::object [protected] |
sc_wif_trace.cpp の 1243 行で定義されています。
char sc_core::wif_signed_char_trace::old_value [protected] |
sc_wif_trace.cpp の 1244 行で定義されています。
unsigned char sc_core::wif_signed_char_trace::mask [protected] |
sc_wif_trace.cpp の 1245 行で定義されています。