クラス sc_core::vcd_signed_char_trace

sc_core::vcd_signed_char_traceに対する継承グラフ

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

 vcd_signed_char_trace (const char &object, const std::string &name_, const std::string &vcd_name_, int width_)
void write (FILE *f)
bool changed ()

Protected 変数

const char & object
char old_value
unsigned char mask


説明

sc_vcd_trace.cpp1284 行で定義されています。


コンストラクタとデストラクタ

sc_core::vcd_signed_char_trace::vcd_signed_char_trace ( const char &  object,
const std::string &  name_,
const std::string &  vcd_name_,
int  width_ 
)

sc_vcd_trace.cpp1300 行で定義されています。

01304 : vcd_trace(name_, vcd_name_), object(object_)
01305 {
01306     bit_width = width_;
01307     if (bit_width < 8) {
01308         mask = ~(-1 << bit_width);
01309     } else {
01310         mask = 0xff;
01311     }
01312 
01313     vcd_var_typ_name = "wire";
01314     old_value = object;
01315 }


関数

void sc_core::vcd_signed_char_trace::write ( FILE *  f  )  [virtual]

sc_core::vcd_traceを実装しています。

sc_vcd_trace.cpp1324 行で定義されています。

01325 {
01326     char rawdata[1000];
01327     char compdata[1000];
01328     int bitindex;
01329 
01330     // Check for overflow
01331     if (((unsigned char) object & mask) != (unsigned char) object) {
01332         for (bitindex = 0; bitindex < bit_width; bitindex++){
01333             rawdata[bitindex] = 'x';
01334         }
01335     }
01336     else{
01337         unsigned bit_mask = 1 << (bit_width-1);
01338         for (bitindex = 0; bitindex < bit_width; bitindex++) {
01339             rawdata[bitindex] = (object & bit_mask)? '1' : '0';
01340             bit_mask = bit_mask >> 1;
01341         }
01342     }
01343     rawdata[bitindex] = '\0';
01344     compose_data_line(rawdata, compdata);
01345     std::fputs(compdata, f);
01346     old_value = object;
01347 }

bool sc_core::vcd_signed_char_trace::changed (  )  [virtual]

sc_core::vcd_traceを実装しています。

sc_vcd_trace.cpp1318 行で定義されています。

01319 {
01320     return object != old_value;
01321 }


変数

const char& sc_core::vcd_signed_char_trace::object [protected]

sc_vcd_trace.cpp1294 行で定義されています。

sc_vcd_trace.cpp1295 行で定義されています。

unsigned char sc_core::vcd_signed_char_trace::mask [protected]

sc_vcd_trace.cpp1296 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:10 2008に生成されました。  doxygen 1.5.6