Public メソッド | |
vcd_unsigned_long_trace (const unsigned long &object, const std::string &name_, const std::string &vcd_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const unsigned long & | object |
unsigned long | old_value |
unsigned long | mask |
sc_vcd_trace.cpp の 1081 行で定義されています。
sc_core::vcd_unsigned_long_trace::vcd_unsigned_long_trace | ( | const unsigned long & | object, | |
const std::string & | name_, | |||
const std::string & | vcd_name_, | |||
int | width_ | |||
) |
sc_vcd_trace.cpp の 1097 行で定義されています。
01102 : vcd_trace(name_, vcd_name_), object(object_) 01103 { 01104 bit_width = width_; 01105 if (bit_width < 32) { 01106 mask = ~(-1 << bit_width); 01107 } else { 01108 mask = 0xffffffff; 01109 } 01110 01111 vcd_var_typ_name = "wire"; 01112 old_value = object; 01113 }
void sc_core::vcd_unsigned_long_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1122 行で定義されています。
01123 { 01124 char rawdata[1000]; 01125 char compdata[1000]; 01126 int bitindex; 01127 01128 // Check for overflow 01129 if ((object & mask) != object) { 01130 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01131 rawdata[bitindex] = 'x'; 01132 } 01133 } 01134 else{ 01135 unsigned bit_mask = 1 << (bit_width-1); 01136 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01137 rawdata[bitindex] = (object & bit_mask)? '1' : '0'; 01138 bit_mask = bit_mask >> 1; 01139 } 01140 } 01141 rawdata[bitindex] = '\0'; 01142 compose_data_line(rawdata, compdata); 01143 std::fputs(compdata, f); 01144 old_value = object; 01145 }
bool sc_core::vcd_unsigned_long_trace::changed | ( | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1116 行で定義されています。
01117 { 01118 return object != old_value; 01119 }
const unsigned long& sc_core::vcd_unsigned_long_trace::object [protected] |
sc_vcd_trace.cpp の 1091 行で定義されています。
unsigned long sc_core::vcd_unsigned_long_trace::old_value [protected] |
sc_vcd_trace.cpp の 1092 行で定義されています。
unsigned long sc_core::vcd_unsigned_long_trace::mask [protected] |
sc_vcd_trace.cpp の 1093 行で定義されています。