クラス sc_core::vcd_signed_short_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

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 shortobject
short old_value
unsigned short mask


説明

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


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

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.cpp1232 行で定義されています。

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.cpp1257 行で定義されています。

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.cpp1251 行で定義されています。

01252 {
01253     return object != old_value;
01254 }


変数

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

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

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


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

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