Public メソッド | |
vcd_signed_int_trace (const int &object, const std::string &name_, const std::string &vcd_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const int & | object |
int | old_value |
unsigned | mask |
sc_vcd_trace.cpp の 1149 行で定義されています。
sc_core::vcd_signed_int_trace::vcd_signed_int_trace | ( | const int & | object, | |
const std::string & | name_, | |||
const std::string & | vcd_name_, | |||
int | width_ | |||
) |
void sc_core::vcd_signed_int_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1189 行で定義されています。
01190 { 01191 char rawdata[1000]; 01192 char compdata[1000]; 01193 int bitindex; 01194 01195 // Check for overflow 01196 if (((unsigned) object & mask) != (unsigned) object) { 01197 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01198 rawdata[bitindex] = 'x'; 01199 } 01200 } 01201 else{ 01202 unsigned bit_mask = 1 << (bit_width-1); 01203 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01204 rawdata[bitindex] = (object & bit_mask)? '1' : '0'; 01205 bit_mask = bit_mask >> 1; 01206 } 01207 } 01208 rawdata[bitindex] = '\0'; 01209 compose_data_line(rawdata, compdata); 01210 std::fputs(compdata, f); 01211 old_value = object; 01212 }
bool sc_core::vcd_signed_int_trace::changed | ( | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1183 行で定義されています。
01184 { 01185 return object != old_value; 01186 }
const int& sc_core::vcd_signed_int_trace::object [protected] |
sc_vcd_trace.cpp の 1159 行で定義されています。
int sc_core::vcd_signed_int_trace::old_value [protected] |
sc_vcd_trace.cpp の 1160 行で定義されています。
unsigned sc_core::vcd_signed_int_trace::mask [protected] |
sc_vcd_trace.cpp の 1161 行で定義されています。