Public メソッド | |
wif_unsigned_int_trace (const unsigned &object_, const std::string &name_, const std::string &wif_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const unsigned & | object |
unsigned | old_value |
unsigned | mask |
sc_wif_trace.cpp の 842 行で定義されています。
sc_core::wif_unsigned_int_trace::wif_unsigned_int_trace | ( | const unsigned & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
int | width_ | |||
) |
void sc_core::wif_unsigned_int_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 881 行で定義されています。
00882 { 00883 char buf[1000]; 00884 int bitindex; 00885 00886 // Check for overflow 00887 if ((object & mask) != object) { 00888 for (bitindex = 0; bitindex < bit_width; bitindex++){ 00889 buf[bitindex] = '0'; 00890 } 00891 } 00892 else{ 00893 unsigned bit_mask = 1 << (bit_width-1); 00894 for (bitindex = 0; bitindex < bit_width; bitindex++) { 00895 buf[bitindex] = (object & bit_mask)? '1' : '0'; 00896 bit_mask = bit_mask >> 1; 00897 } 00898 } 00899 buf[bitindex] = '\0'; 00900 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 00901 old_value = object; 00902 }
bool sc_core::wif_unsigned_int_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 875 行で定義されています。
00876 { 00877 return object != old_value; 00878 }
const unsigned& sc_core::wif_unsigned_int_trace::object [protected] |
sc_wif_trace.cpp の 851 行で定義されています。
unsigned sc_core::wif_unsigned_int_trace::old_value [protected] |
sc_wif_trace.cpp の 852 行で定義されています。
unsigned sc_core::wif_unsigned_int_trace::mask [protected] |
sc_wif_trace.cpp の 853 行で定義されています。