クラス sc_core::vcd_unsigned_char_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const unsigned char & object
unsigned char old_value
unsigned char mask


説明

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


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

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

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

01034 : vcd_trace(name_, vcd_name_), object(object_)
01035 {
01036     bit_width = width_;
01037     if (bit_width < 8) {
01038         mask = ~(-1 << bit_width);
01039     } else {
01040         mask = 0xff;
01041     }
01042 
01043     vcd_var_typ_name = "wire";
01044     old_value = object;
01045 }


関数

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

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

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

01055 {
01056     char rawdata[1000];
01057     char compdata[1000];
01058     int bitindex;
01059 
01060     // Check for overflow
01061     if ((object & mask) != object) {
01062         for (bitindex = 0; bitindex < bit_width; bitindex++){
01063             rawdata[bitindex] = 'x';
01064         }
01065     }
01066     else{
01067         unsigned bit_mask = 1 << (bit_width-1);
01068         for (bitindex = 0; bitindex < bit_width; bitindex++) {
01069             rawdata[bitindex] = (object & bit_mask)? '1' : '0';
01070             bit_mask = bit_mask >> 1;
01071         }
01072     }
01073     rawdata[bitindex] = '\0';
01074     compose_data_line(rawdata, compdata);
01075     std::fputs(compdata, f);
01076     old_value = object;
01077 }

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

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

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

01049 {
01050     return object != old_value;
01051 }


変数

const unsigned char& sc_core::vcd_unsigned_char_trace::object [protected]

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

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

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

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


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

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