Public メソッド | |
wif_unsigned_char_trace (const unsigned char &object_, const std::string &name_, const std::string &wif_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const unsigned char & | object |
unsigned char | old_value |
unsigned char | mask |
sc_wif_trace.cpp の 973 行で定義されています。
sc_core::wif_unsigned_char_trace::wif_unsigned_char_trace | ( | const unsigned char & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
int | width_ | |||
) |
void sc_core::wif_unsigned_char_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1013 行で定義されています。
01014 { 01015 char buf[1000]; 01016 int bitindex; 01017 01018 // Check for overflow 01019 if ((object & mask) != object) { 01020 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01021 buf[bitindex]='0'; 01022 } 01023 } 01024 else{ 01025 unsigned bit_mask = 1 << (bit_width-1); 01026 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01027 buf[bitindex] = (object & bit_mask)? '1' : '0'; 01028 bit_mask = bit_mask >> 1; 01029 } 01030 } 01031 buf[bitindex] = '\0'; 01032 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 01033 old_value = object; 01034 }
bool sc_core::wif_unsigned_char_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1007 行で定義されています。
01008 { 01009 return object != old_value; 01010 }
const unsigned char& sc_core::wif_unsigned_char_trace::object [protected] |
sc_wif_trace.cpp の 983 行で定義されています。
unsigned char sc_core::wif_unsigned_char_trace::old_value [protected] |
sc_wif_trace.cpp の 984 行で定義されています。
unsigned char sc_core::wif_unsigned_char_trace::mask [protected] |
sc_wif_trace.cpp の 985 行で定義されています。