クラス sc_core::wif_unsigned_long_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const unsigned long & object
unsigned long old_value
unsigned long mask


説明

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


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

sc_core::wif_unsigned_long_trace::wif_unsigned_long_trace ( const unsigned long &  object_,
const std::string &  name_,
const std::string &  wif_name_,
int  width_ 
)

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

01058 : wif_trace(name_, wif_name_), object(object_)
01059 {
01060     bit_width = width_;
01061     if (bit_width < 32) {
01062         mask = ~(-1 << bit_width);
01063     } else {
01064         mask = 0xffffffff;
01065     }
01066 
01067     old_value = object;
01068     wif_type = "BIT";
01069 }


関数

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

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

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

01079 {
01080     char buf[1000];
01081     int bitindex;
01082 
01083     // Check for overflow
01084     if ((object & mask) != object) {
01085         for (bitindex = 0; bitindex < bit_width; bitindex++){
01086             buf[bitindex]='0';
01087         }
01088     }
01089     else{
01090         unsigned bit_mask = 1 << (bit_width-1);
01091         for (bitindex = 0; bitindex < bit_width; bitindex++) {
01092             buf[bitindex] = (object & bit_mask)? '1' : '0';
01093             bit_mask = bit_mask >> 1;
01094         }
01095     }
01096     buf[bitindex] = '\0';
01097     std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 
01098     old_value = object;
01099 }

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

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

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

01073 {
01074     return object != old_value;
01075 }


変数

const unsigned long& sc_core::wif_unsigned_long_trace::object [protected]

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

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

unsigned long sc_core::wif_unsigned_long_trace::mask [protected]

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


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

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