Public メソッド | |
vcd_trace (const std::string &name_, const std::string &vcd_name_) | |
virtual void | write (FILE *f)=0 |
virtual void | set_width () |
virtual bool | changed ()=0 |
virtual void | print_variable_declaration_line (FILE *f) |
void | compose_data_line (char *rawdata, char *compdata) |
std::string | compose_line (const std::string data) |
virtual | ~vcd_trace () |
Static Public メソッド | |
static const char * | strip_leading_bits (const char *originalbuf) |
Public 変数 | |
const std::string | name |
const std::string | vcd_name |
const char * | vcd_var_typ_name |
int | bit_width |
sc_vcd_trace.cpp の 88 行で定義されています。
sc_core::vcd_trace::vcd_trace | ( | const std::string & | name_, | |
const std::string & | vcd_name_ | |||
) |
sc_vcd_trace.cpp の 120 行で定義されています。
00122 : name(name_), 00123 vcd_name(vcd_name_), 00124 bit_width(0) 00125 { 00126 /* Intentionally blank */ 00127 }
sc_core::vcd_trace::~vcd_trace | ( | ) | [virtual] |
virtual void sc_core::vcd_trace::write | ( | FILE * | f | ) | [pure virtual] |
sc_core::vcd_T_trace< T >, sc_core::vcd_bool_trace, sc_core::vcd_sc_bit_trace, sc_core::vcd_sc_logic_trace, sc_core::vcd_sc_unsigned_trace, sc_core::vcd_sc_signed_trace, sc_core::vcd_sc_uint_base_trace, sc_core::vcd_sc_int_base_trace, sc_core::vcd_sc_fxval_trace, sc_core::vcd_sc_fxval_fast_trace, sc_core::vcd_sc_fxnum_trace, sc_core::vcd_sc_fxnum_fast_trace, sc_core::vcd_unsigned_int_trace, sc_core::vcd_unsigned_short_trace, sc_core::vcd_unsigned_char_trace, sc_core::vcd_unsigned_long_trace, sc_core::vcd_signed_int_trace, sc_core::vcd_signed_short_trace, sc_core::vcd_signed_char_trace, sc_core::vcd_int64_trace, sc_core::vcd_uint64_trace, sc_core::vcd_signed_long_trace, sc_core::vcd_float_trace, sc_core::vcd_double_trace, と sc_core::vcd_enum_traceで実装されています。
void sc_core::vcd_trace::set_width | ( | ) | [virtual] |
const char * sc_core::vcd_trace::strip_leading_bits | ( | const char * | originalbuf | ) | [static] |
sc_vcd_trace.cpp の 207 行で定義されています。
00208 { 00209 //********************************************************************* 00210 // - Remove multiple leading 0,z,x, and replace by only one 00211 // - For example, 00212 // b000z100 -> b0z100 00213 // b00000xxx -> b0xxx 00214 // b000 -> b0 00215 // bzzzzz1 -> bz1 00216 // bxxxz10 -> xz10 00217 // - For leading 0's followed by 1, remove all leading 0's 00218 // b0000010101 -> b10101 00219 00220 const char* position = originalbuf; 00221 00222 if( strlen(originalbuf) < 2 || 00223 (originalbuf[0] != 'z' && originalbuf[0] != 'x' && 00224 originalbuf[0] != '0' )) 00225 return originalbuf; 00226 00227 char first_char = *position; 00228 while(*position == first_char) 00229 { 00230 position++; 00231 } 00232 00233 if(first_char == '0' && *position == '1') 00234 return position; 00235 // else 00236 return position-1; 00237 }
virtual bool sc_core::vcd_trace::changed | ( | ) | [pure virtual] |
sc_core::vcd_T_trace< T >, sc_core::vcd_bool_trace, sc_core::vcd_sc_bit_trace, sc_core::vcd_sc_logic_trace, sc_core::vcd_sc_unsigned_trace, sc_core::vcd_sc_signed_trace, sc_core::vcd_sc_uint_base_trace, sc_core::vcd_sc_int_base_trace, sc_core::vcd_sc_fxval_trace, sc_core::vcd_sc_fxval_fast_trace, sc_core::vcd_sc_fxnum_trace, sc_core::vcd_sc_fxnum_fast_trace, sc_core::vcd_unsigned_int_trace, sc_core::vcd_unsigned_short_trace, sc_core::vcd_unsigned_char_trace, sc_core::vcd_unsigned_long_trace, sc_core::vcd_signed_int_trace, sc_core::vcd_signed_short_trace, sc_core::vcd_signed_char_trace, sc_core::vcd_int64_trace, sc_core::vcd_uint64_trace, sc_core::vcd_signed_long_trace, sc_core::vcd_float_trace, sc_core::vcd_double_trace, と sc_core::vcd_enum_traceで実装されています。
void sc_core::vcd_trace::print_variable_declaration_line | ( | FILE * | f | ) | [virtual] |
sc_vcd_trace.cpp の 165 行で定義されています。
00166 { 00167 char buf[2000]; 00168 00169 if ( bit_width <= 0 ) 00170 { 00171 std::sprintf(buf, "Traced object \"%s\" has 0 Bits, cannot be traced.", 00172 name.c_str()); 00173 put_error_message(buf, false); 00174 } 00175 else 00176 { 00177 std::string namecopy = name; 00178 remove_vcd_name_problems(namecopy); 00179 if ( bit_width == 1 ) 00180 { 00181 std::sprintf(buf, "$var %s % 3d %s %s $end\n", 00182 vcd_var_typ_name, 00183 bit_width, 00184 vcd_name.c_str(), 00185 namecopy.c_str()); 00186 } 00187 else 00188 { 00189 std::sprintf(buf, "$var %s % 3d %s %s [%d:0] $end\n", 00190 vcd_var_typ_name, 00191 bit_width, 00192 vcd_name.c_str(), 00193 namecopy.c_str(), 00194 bit_width-1); 00195 } 00196 std::fputs(buf, f); 00197 } 00198 }
void sc_core::vcd_trace::compose_data_line | ( | char * | rawdata, | |
char * | compdata | |||
) |
sc_vcd_trace.cpp の 130 行で定義されています。
00131 { 00132 assert(rawdata != compdata); 00133 00134 if(bit_width == 0) 00135 { 00136 compdata[0] = '\0'; 00137 } 00138 else 00139 { 00140 if(bit_width == 1) 00141 { 00142 compdata[0] = rawdata[0]; 00143 strcpy(&(compdata[1]), vcd_name.c_str()); 00144 } 00145 else 00146 { 00147 const char* effective_begin = strip_leading_bits(rawdata); 00148 std::sprintf(compdata, "b%s %s", effective_begin, vcd_name.c_str()); 00149 } 00150 } 00151 }
std::string sc_core::vcd_trace::compose_line | ( | const std::string | data | ) |
sc_vcd_trace.cpp の 155 行で定義されています。
00156 { 00157 if(bit_width == 0) 00158 return ""; 00159 if(bit_width == 1) 00160 return data + vcd_name; 00161 return std::string("b")+strip_leading_bits(data.c_str())+" "+vcd_name; 00162 }
const std::string sc_core::vcd_trace::name |
sc_vcd_trace.cpp の 113 行で定義されています。
const std::string sc_core::vcd_trace::vcd_name |
sc_vcd_trace.cpp の 114 行で定義されています。
const char* sc_core::vcd_trace::vcd_var_typ_name |
sc_vcd_trace.cpp の 115 行で定義されています。
sc_vcd_trace.cpp の 116 行で定義されています。