クラス sc_core::wif_signed_short_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const shortobject
short old_value
unsigned short mask


説明

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


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

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

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

01188 : wif_trace(name_, wif_name_), object(object_)
01189 {
01190     bit_width = width_;
01191     if (bit_width < 16) {
01192         mask = ~(-1 << bit_width);
01193     } else {
01194         mask = 0xffff;
01195     }
01196 
01197     old_value = object;
01198     wif_type = "BIT";
01199 }


関数

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

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

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

01209 {
01210     char buf[1000];
01211     int bitindex;
01212 
01213     // Check for overflow
01214     if (((unsigned short) object & mask) != (unsigned short) object) {
01215         for (bitindex = 0; bitindex < bit_width; bitindex++){
01216             buf[bitindex]='0';
01217         }
01218     }
01219     else{
01220         unsigned bit_mask = 1 << (bit_width-1);
01221         for (bitindex = 0; bitindex < bit_width; bitindex++) {
01222             buf[bitindex] = (object & bit_mask)? '1' : '0';
01223             bit_mask = bit_mask >> 1;
01224         }
01225     }
01226     buf[bitindex] = '\0';
01227     std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 
01228     old_value = object;
01229 }

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

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

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

01203 {
01204     return object != old_value;
01205 }


変数

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

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

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


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

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