Public メソッド | |
wif_signed_short_trace (const short &object_, const std::string &name_, const std::string &wif_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const short & | object |
short | old_value |
unsigned short | mask |
sc_wif_trace.cpp の 1168 行で定義されています。
sc_core::wif_signed_short_trace::wif_signed_short_trace | ( | const short & | object_, | |
const std::string & | name_, | |||
const std::string & | wif_name_, | |||
int | width_ | |||
) |
void sc_core::wif_signed_short_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1208 行で定義されています。
01209 { 01210 char buf[1000]; 01211 int bitindex; 01212 01213 // Check for overflow 01214 if (((unsigned short) object & mask) != (unsigned short) object) { 01215 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01216 buf[bitindex]='0'; 01217 } 01218 } 01219 else{ 01220 unsigned bit_mask = 1 << (bit_width-1); 01221 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01222 buf[bitindex] = (object & bit_mask)? '1' : '0'; 01223 bit_mask = bit_mask >> 1; 01224 } 01225 } 01226 buf[bitindex] = '\0'; 01227 std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 01228 old_value = object; 01229 }
bool sc_core::wif_signed_short_trace::changed | ( | ) | [virtual] |
sc_core::wif_traceを実装しています。
sc_wif_trace.cpp の 1202 行で定義されています。
01203 { 01204 return object != old_value; 01205 }
const short& sc_core::wif_signed_short_trace::object [protected] |
sc_wif_trace.cpp の 1178 行で定義されています。
short sc_core::wif_signed_short_trace::old_value [protected] |
sc_wif_trace.cpp の 1179 行で定義されています。
unsigned short sc_core::wif_signed_short_trace::mask [protected] |
sc_wif_trace.cpp の 1180 行で定義されています。