クラス sc_core::wif_unsigned_int_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const unsigned & object
unsigned old_value
unsigned mask


説明

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


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

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

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

00861 : wif_trace(name_, wif_name_), object(object_)
00862 {
00863     bit_width = width_;
00864     if (bit_width < 32) {
00865         mask = ~(-1 << bit_width);
00866     } else {
00867         mask = 0xffffffff;
00868     }
00869 
00870     old_value = object;
00871     wif_type = "BIT";
00872 }


関数

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

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

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

00882 {
00883     char buf[1000];
00884     int bitindex;
00885 
00886     // Check for overflow
00887     if ((object & mask) != object) {
00888         for (bitindex = 0; bitindex < bit_width; bitindex++){
00889             buf[bitindex] = '0';
00890         }
00891     }
00892     else{
00893         unsigned bit_mask = 1 << (bit_width-1);
00894         for (bitindex = 0; bitindex < bit_width; bitindex++) {
00895             buf[bitindex] = (object & bit_mask)? '1' : '0';
00896             bit_mask = bit_mask >> 1;
00897         }
00898     }
00899     buf[bitindex] = '\0';
00900     std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 
00901     old_value = object;
00902 }

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

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

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

00876 {
00877     return object != old_value;
00878 }


変数

const unsigned& sc_core::wif_unsigned_int_trace::object [protected]

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

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

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


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

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