Public メソッド | |
vcd_unsigned_int_trace (const unsigned &object, const std::string &name_, const std::string &vcd_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const unsigned & | object |
unsigned | old_value |
unsigned | mask |
sc_vcd_trace.cpp の 873 行で定義されています。
sc_core::vcd_unsigned_int_trace::vcd_unsigned_int_trace | ( | const unsigned & | object, | |
const std::string & | name_, | |||
const std::string & | vcd_name_, | |||
int | width_ | |||
) |
sc_vcd_trace.cpp の 889 行で定義されています。
00894 : vcd_trace(name_, vcd_name_), object(object_) 00895 { 00896 bit_width = width_; 00897 if (bit_width < 32) { 00898 mask = ~(-1 << bit_width); 00899 } else { 00900 mask = 0xffffffff; 00901 } 00902 00903 vcd_var_typ_name = "wire"; 00904 old_value = object; 00905 }
void sc_core::vcd_unsigned_int_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 916 行で定義されています。
00917 { 00918 char rawdata[1000]; 00919 char compdata[1000]; 00920 int bitindex; 00921 00922 // Check for overflow 00923 if ((object & mask) != object) { 00924 for (bitindex = 0; bitindex < bit_width; bitindex++){ 00925 rawdata[bitindex] = 'x'; 00926 } 00927 } 00928 else{ 00929 unsigned bit_mask = 1 << (bit_width-1); 00930 for (bitindex = 0; bitindex < bit_width; bitindex++) { 00931 rawdata[bitindex] = (object & bit_mask)? '1' : '0'; 00932 bit_mask = bit_mask >> 1; 00933 } 00934 } 00935 rawdata[bitindex] = '\0'; 00936 compose_data_line(rawdata, compdata); 00937 std::fputs(compdata, f); 00938 old_value = object; 00939 }
bool sc_core::vcd_unsigned_int_trace::changed | ( | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 909 行で定義されています。
00910 { 00911 return object != old_value; 00912 }
const unsigned& sc_core::vcd_unsigned_int_trace::object [protected] |
sc_vcd_trace.cpp の 883 行で定義されています。
unsigned sc_core::vcd_unsigned_int_trace::old_value [protected] |
sc_vcd_trace.cpp の 884 行で定義されています。
unsigned sc_core::vcd_unsigned_int_trace::mask [protected] |
sc_vcd_trace.cpp の 885 行で定義されています。