クラス sc_core::wif_unsigned_short_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

 wif_unsigned_short_trace (const unsigned short &object_, const std::string &name_, const std::string &wif_name_, int width_)
void write (FILE *f)
bool changed ()

Protected 変数

const unsigned shortobject
unsigned short old_value
unsigned short mask


説明

sc_wif_trace.cpp907 行で定義されています。


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

sc_core::wif_unsigned_short_trace::wif_unsigned_short_trace ( const unsigned short object_,
const std::string &  name_,
const std::string &  wif_name_,
int  width_ 
)

sc_wif_trace.cpp923 行で定義されています。

00928 : wif_trace(name_, wif_name_), object(object_)
00929 {
00930     bit_width = width_;
00931     if (bit_width < 16) {
00932         mask = ~(-1 << bit_width);
00933     } else {
00934         mask = 0xffff;
00935     }
00936 
00937     old_value = object;
00938     wif_type = "BIT";
00939 }


関数

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

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

sc_wif_trace.cpp948 行で定義されています。

00949 {
00950     char buf[1000];
00951     int bitindex;
00952 
00953     // Check for overflow
00954     if ((object & mask) != object) {
00955         for (bitindex = 0; bitindex < bit_width; bitindex++){
00956             buf[bitindex]='0';
00957         }
00958     }
00959     else{
00960         unsigned bit_mask = 1 << (bit_width-1);
00961         for (bitindex = 0; bitindex < bit_width; bitindex++) {
00962             buf[bitindex] = (object & bit_mask)? '1' : '0';
00963             bit_mask = bit_mask >> 1;
00964         }
00965     }
00966     buf[bitindex] = '\0';
00967     std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 
00968     old_value = object;
00969 }

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

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

sc_wif_trace.cpp942 行で定義されています。

00943 {
00944     return object != old_value;
00945 }


変数

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

sc_wif_trace.cpp917 行で定義されています。

sc_wif_trace.cpp918 行で定義されています。

sc_wif_trace.cpp919 行で定義されています。


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

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