Public メソッド | |
vcd_signed_short_trace (const short &object, const std::string &name_, const std::string &vcd_name_, int width_) | |
void | write (FILE *f) |
bool | changed () |
Protected 変数 | |
const short & | object |
short | old_value |
unsigned short | mask |
sc_vcd_trace.cpp の 1216 行で定義されています。
sc_core::vcd_signed_short_trace::vcd_signed_short_trace | ( | const short & | object, | |
const std::string & | name_, | |||
const std::string & | vcd_name_, | |||
int | width_ | |||
) |
sc_vcd_trace.cpp の 1232 行で定義されています。
01237 : vcd_trace(name_, vcd_name_), object(object_) 01238 { 01239 bit_width = width_; 01240 if (bit_width < 16) { 01241 mask = ~(-1 << bit_width); 01242 } else { 01243 mask = 0xffff; 01244 } 01245 01246 vcd_var_typ_name = "wire"; 01247 old_value = object; 01248 }
void sc_core::vcd_signed_short_trace::write | ( | FILE * | f | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1257 行で定義されています。
01258 { 01259 char rawdata[1000]; 01260 char compdata[1000]; 01261 int bitindex; 01262 01263 // Check for overflow 01264 if (((unsigned short) object & mask) != (unsigned short) object) { 01265 for (bitindex = 0; bitindex < bit_width; bitindex++){ 01266 rawdata[bitindex] = 'x'; 01267 } 01268 } 01269 else{ 01270 unsigned bit_mask = 1 << (bit_width-1); 01271 for (bitindex = 0; bitindex < bit_width; bitindex++) { 01272 rawdata[bitindex] = (object & bit_mask)? '1' : '0'; 01273 bit_mask = bit_mask >> 1; 01274 } 01275 } 01276 rawdata[bitindex] = '\0'; 01277 compose_data_line(rawdata, compdata); 01278 std::fputs(compdata, f); 01279 old_value = object; 01280 }
bool sc_core::vcd_signed_short_trace::changed | ( | ) | [virtual] |
sc_core::vcd_traceを実装しています。
sc_vcd_trace.cpp の 1251 行で定義されています。
01252 { 01253 return object != old_value; 01254 }
const short& sc_core::vcd_signed_short_trace::object [protected] |
sc_vcd_trace.cpp の 1226 行で定義されています。
short sc_core::vcd_signed_short_trace::old_value [protected] |
sc_vcd_trace.cpp の 1227 行で定義されています。
unsigned short sc_core::vcd_signed_short_trace::mask [protected] |
sc_vcd_trace.cpp の 1228 行で定義されています。