クラス sc_core::vcd_unsigned_int_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const unsigned & object
unsigned old_value
unsigned mask


説明

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


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

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

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

00894 : vcd_trace(name_, vcd_name_), object(object_)
00895 {
00896     bit_width = width_;
00897     if (bit_width < 32) {
00898         mask = ~(-1 << bit_width);
00899     } else {
00900         mask = 0xffffffff;
00901     }
00902 
00903     vcd_var_typ_name = "wire";
00904     old_value = object;
00905 }


関数

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

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

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

00917 {
00918     char rawdata[1000];
00919     char compdata[1000];
00920     int bitindex;
00921 
00922     // Check for overflow
00923     if ((object & mask) != object) {
00924         for (bitindex = 0; bitindex < bit_width; bitindex++){
00925             rawdata[bitindex] = 'x';
00926         }
00927     }
00928     else{
00929         unsigned bit_mask = 1 << (bit_width-1);
00930         for (bitindex = 0; bitindex < bit_width; bitindex++) {
00931             rawdata[bitindex] = (object & bit_mask)? '1' : '0';
00932             bit_mask = bit_mask >> 1;
00933         }
00934     }
00935     rawdata[bitindex] = '\0';
00936     compose_data_line(rawdata, compdata);
00937     std::fputs(compdata, f);
00938     old_value = object;
00939 }

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

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

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

00910 {
00911     return object != old_value;
00912 }


変数

const unsigned& sc_core::vcd_unsigned_int_trace::object [protected]

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

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

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


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

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