#include <sc_trace.h>
Public メソッド | |
sc_trace_file () | |
virtual void | trace (const unsigned int &object, const std::string &name, const char **enum_literals)=0 |
virtual void | write_comment (const std::string &comment)=0 |
virtual void | space (int n) |
virtual void | delta_cycles (bool flag) |
virtual void | set_time_unit (int exponent10_seconds) |
virtual void | set_time_unit (double v, sc_time_unit tu) |
Protected メソッド | |
virtual void | cycle (bool delta_cycle)=0 |
virtual | ~sc_trace_file () |
Protected 変数 | |
bool | initialized |
double | timescale_unit |
bool | timescale_set_by_user |
フレンド | |
class | sc_simcontext |
sc_trace.h の 85 行で定義されています。
sc_core::sc_trace_file::sc_trace_file | ( | ) |
virtual sc_core::sc_trace_file::~sc_trace_file | ( | ) | [inline, protected, virtual] |
virtual void sc_core::sc_trace_file::trace | ( | const unsigned int & | object, | |
const std::string & | name, | |||
const char ** | enum_literals | |||
) | [pure virtual] |
virtual void sc_core::sc_trace_file::write_comment | ( | const std::string & | comment | ) | [pure virtual] |
sc_core::vcd_trace_file, と sc_core::wif_trace_fileで実装されています。
void sc_core::sc_trace_file::space | ( | int | n | ) | [virtual] |
void sc_core::sc_trace_file::delta_cycles | ( | bool | flag | ) | [virtual] |
void sc_core::sc_trace_file::set_time_unit | ( | int | exponent10_seconds | ) | [virtual] |
sc_trace.cpp の 116 行で定義されています。
00117 { 00118 sc_time_unit tu; 00119 double v; 00120 00121 if (exponent10_seconds == -15) { v = 1.0; tu = SC_FS; } 00122 else if(exponent10_seconds == -14) { v = 10.0; tu = SC_FS; } 00123 else if(exponent10_seconds == -13) { v = 100.0; tu = SC_FS; } 00124 else if(exponent10_seconds == -12) { v = 1.0; tu = SC_PS; } 00125 else if(exponent10_seconds == -11) { v = 10.0; tu = SC_PS; } 00126 else if(exponent10_seconds == -10) { v = 100.0; tu = SC_PS; } 00127 else if(exponent10_seconds == -9) { v = 1.0; tu = SC_NS; } 00128 else if(exponent10_seconds == -8) { v = 10.0; tu = SC_NS; } 00129 else if(exponent10_seconds == -7) { v = 100.0; tu = SC_NS; } 00130 else if(exponent10_seconds == -6) { v = 1.0; tu = SC_US; } 00131 else if(exponent10_seconds == -5) { v = 10.0; tu = SC_US; } 00132 else if(exponent10_seconds == -4) { v = 100.0; tu = SC_US; } 00133 else if(exponent10_seconds == -3) { v = 1.0; tu = SC_MS; } 00134 else if(exponent10_seconds == -2) { v = 10.0; tu = SC_MS; } 00135 else if(exponent10_seconds == -1) { v = 100.0; tu = SC_MS; } 00136 else if(exponent10_seconds == 0) { v = 1.0; tu = SC_SEC; } 00137 else if(exponent10_seconds == 1) { v = 10.0; tu = SC_SEC; } 00138 else if(exponent10_seconds == 2) { v = 100.0; tu = SC_SEC; } 00139 else 00140 { 00141 put_error_message( 00142 "set_time_unit() has valid exponent range -15...+2.", false); 00143 return; 00144 } 00145 set_time_unit( v, tu ); 00146 }
void sc_core::sc_trace_file::set_time_unit | ( | double | v, | |
sc_time_unit | tu | |||
) | [virtual] |
sc_trace.cpp の 76 行で定義されています。
00077 { 00078 if(initialized) 00079 { 00080 put_error_message( 00081 "Trace timescale unit cannot be changed once tracing has begun.", 00082 false 00083 ); 00084 std::cout << "To change the scale, create a new trace file." 00085 << std::endl; 00086 return; 00087 } 00088 00089 switch ( tu ) 00090 { 00091 case SC_FS: v = v * 1e-15; break; 00092 case SC_PS: v = v * 1e-12; break; 00093 case SC_NS: v = v * 1e-9; break; 00094 case SC_US: v = v * 1e-6; break; 00095 case SC_MS: v = v * 1e-3; break; 00096 case SC_SEC: break; 00097 default: 00098 put_error_message("Unknown time unit specified ",true); 00099 std::cout << tu << std::endl; 00100 break; 00101 }; 00102 00103 timescale_unit = v; 00104 00105 // EMIT ADVISORY MESSAGE ABOUT CHANGE IN TIME SCALE: 00106 00107 char buf[200]; 00108 std::sprintf(buf, 00109 "Note: VCD trace timescale unit is set by user to %e sec.\n", 00110 timescale_unit); 00111 ::std::cout << buf << ::std::flush; 00112 00113 timescale_set_by_user = true; 00114 }
virtual void sc_core::sc_trace_file::cycle | ( | bool | delta_cycle | ) | [protected, pure virtual] |
sc_core::vcd_trace_file, と sc_core::wif_trace_fileで実装されています。
friend class sc_simcontext [friend] |
sc_trace.h の 87 行で定義されています。
bool sc_core::sc_trace_file::initialized [protected] |
sc_trace.h の 170 行で定義されています。
double sc_core::sc_trace_file::timescale_unit [protected] |
sc_trace.h の 174 行で定義されています。
bool sc_core::sc_trace_file::timescale_set_by_user [protected] |
sc_trace.h の 175 行で定義されています。