Public メソッド | |
wif_enum_trace (const unsigned &object_, const std::string &name_, const std::string &wif_name_, const char **enum_literals) | |
void | write (FILE *f) |
bool | changed () |
void | print_variable_declaration_line (FILE *f) |
Protected メソッド | |
~wif_enum_trace () | |
Protected 変数 | |
const unsigned & | object |
unsigned | old_value |
const char ** | literals |
unsigned | nliterals |
std::string | type_name |
sc_wif_trace.cpp の 1436 行で定義されています。
sc_core::wif_enum_trace::wif_enum_trace | ( | const unsigned & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
const char ** | enum_literals | |||
) |
sc_wif_trace.cpp の 1459 行で定義されています。
01463 : wif_trace(name_, wif_name_), object(object_), literals(enum_literals_) 01464 { 01465 // find number of enumeration literals - counting loop 01466 for (nliterals = 0; enum_literals_[nliterals]; nliterals++); 01467 01468 bit_width = 0; 01469 old_value = object; 01470 type_name = name_ + "__type__"; 01471 wif_type = type_name.c_str(); 01472 }
sc_core::wif_enum_trace::~wif_enum_trace | ( | ) | [protected] |
void sc_core::wif_enum_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1493 行で定義されています。
01494 { 01495 char buf[2000]; 01496 static bool warning_issued = false; 01497 01498 if (object >= nliterals) { // Note unsigned value is always greater than 0 01499 if (!warning_issued) { 01500 std::sprintf(buf, "Tracing error: Value of enumerated type undefined"); 01501 put_error_message(buf, false); 01502 warning_issued = true; 01503 } 01504 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), 01505 "SC_WIF_UNDEF"); 01506 } 01507 else 01508 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), 01509 literals[object]); 01510 old_value = object; 01511 }
bool sc_core::wif_enum_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1488 行で定義されています。
01489 { 01490 return object != old_value; 01491 }
void sc_core::wif_enum_trace::print_variable_declaration_line | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを再定義しています。
sc_wif_trace.cpp の 1474 行で定義されています。
01475 { 01476 std::fprintf(f, "type scalar \"%s\" enum ", wif_type); 01477 01478 for (unsigned i = 0; i < nliterals; i++) 01479 std::fprintf(f, "\"%s\", ", literals[i]); 01480 std::fprintf(f, "\"SC_WIF_UNDEF\" ;\n"); 01481 01482 std::fprintf(f, "declare %s \"%s\" \"%s\" ", 01483 wif_name.c_str(), name.c_str(), wif_type); 01484 std::fprintf(f, "variable ;\n"); 01485 std::fprintf(f, "start_trace %s ;\n", wif_name.c_str()); 01486 }
const unsigned& sc_core::wif_enum_trace::object [protected] |
sc_wif_trace.cpp の 1448 行で定義されています。
unsigned sc_core::wif_enum_trace::old_value [protected] |
sc_wif_trace.cpp の 1449 行で定義されています。
const char** sc_core::wif_enum_trace::literals [protected] |
sc_wif_trace.cpp の 1451 行で定義されています。
unsigned sc_core::wif_enum_trace::nliterals [protected] |
sc_wif_trace.cpp の 1452 行で定義されています。
std::string sc_core::wif_enum_trace::type_name [protected] |
sc_wif_trace.cpp の 1453 行で定義されています。