Public メソッド | |
vcd_int64_trace (const sc_dt::int64 &object, const std::string &name_, const std::string &vcd_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const sc_dt::int64 & | object |
sc_dt::int64 | old_value |
sc_dt::uint64 | mask |
sc_vcd_trace.cpp の 1351 行で定義されています。
sc_core::vcd_int64_trace::vcd_int64_trace | ( | const sc_dt::int64 & | object, | |
const std::string & | name_, | |||
const std::string & | vcd_name_, | |||
int | width_ | |||
) |
sc_vcd_trace.cpp の 1367 行で定義されています。
01371 : vcd_trace(name_, vcd_name_), object(object_) 01372 { 01373 bit_width = width_; 01374 mask = (sc_dt::uint64)-1; 01375 if (bit_width < 64) mask = ~(mask << bit_width); 01376 01377 vcd_var_typ_name = "wire"; 01378 old_value = object; 01379 }
void sc_core::vcd_int64_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1388 行で定義されています。
01389 { 01390 char rawdata[1000]; 01391 char compdata[1000]; 01392 int bitindex; 01393 01394 // Check for overflow 01395 if (((sc_dt::uint64) object & mask) != (sc_dt::uint64) object) 01396 { 01397 for (bitindex = 0; bitindex < bit_width; bitindex++) 01398 { 01399 rawdata[bitindex] = 'x'; 01400 } 01401 } 01402 else 01403 { 01404 sc_dt::uint64 bit_mask = 1; 01405 bit_mask = bit_mask << (bit_width-1); 01406 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01407 rawdata[bitindex] = (object & bit_mask)? '1' : '0'; 01408 bit_mask = bit_mask >> 1; 01409 } 01410 } 01411 rawdata[bitindex] = '\0'; 01412 compose_data_line(rawdata, compdata); 01413 std::fputs(compdata, f); 01414 old_value = object; 01415 }
bool sc_core::vcd_int64_trace::changed | ( | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1382 行で定義されています。
01383 { 01384 return object != old_value; 01385 }
const sc_dt::int64& sc_core::vcd_int64_trace::object [protected] |
sc_vcd_trace.cpp の 1361 行で定義されています。
sc_dt::int64 sc_core::vcd_int64_trace::old_value [protected] |
sc_vcd_trace.cpp の 1362 行で定義されています。
sc_dt::uint64 sc_core::vcd_int64_trace::mask [protected] |
sc_vcd_trace.cpp の 1363 行で定義されています。