クラス sc_core::vcd_unsigned_short_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const unsigned shortobject
unsigned short old_value
unsigned short mask


説明

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


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

sc_core::vcd_unsigned_short_trace::vcd_unsigned_short_trace ( const unsigned short object,
const std::string &  name_,
const std::string &  vcd_name_,
int  width_ 
)

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

00964 : vcd_trace(name_, vcd_name_), object(object_)
00965 {
00966     bit_width = width_;
00967     if (bit_width < 16) {
00968         mask = ~(-1 << bit_width);
00969     } else {
00970         mask = 0xffff;
00971     }
00972 
00973     vcd_var_typ_name = "wire";
00974     old_value = object;
00975 }


関数

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

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

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

00987 {
00988     char rawdata[1000];
00989     char compdata[1000];
00990     int bitindex;
00991 
00992     // Check for overflow
00993     if ((object & mask) != object) {
00994         for (bitindex = 0; bitindex < bit_width; bitindex++){
00995             rawdata[bitindex] = 'x';
00996         }
00997     }
00998     else{
00999         unsigned bit_mask = 1 << (bit_width-1);
01000         for (bitindex = 0; bitindex < bit_width; bitindex++) {
01001             rawdata[bitindex] = (object & bit_mask)? '1' : '0';
01002             bit_mask = bit_mask >> 1;
01003         }
01004     }
01005     rawdata[bitindex] = '\0';
01006     compose_data_line(rawdata, compdata);
01007     std::fputs(compdata, f);
01008     old_value = object;
01009 }

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

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

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

00980 {
00981     return object != old_value;
00982 }


変数

const unsigned short& sc_core::vcd_unsigned_short_trace::object [protected]

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

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

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


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

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