クラス sc_core::wif_unsigned_char_trace

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

Inheritance graph
[凡例]

すべてのメンバ一覧

Public メソッド

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

Protected 変数

const unsigned char & object
unsigned char old_value
unsigned char mask


説明

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


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

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

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

00993 : wif_trace(name_, wif_name_), object(object_)
00994 {
00995     bit_width = width_;
00996     if (bit_width < 8) {
00997         mask = ~(-1 << bit_width);
00998     } else {
00999         mask = 0xff;
01000     }
01001 
01002     old_value = object;
01003     wif_type = "BIT";
01004 }


関数

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

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

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

01014 {
01015     char buf[1000];
01016     int bitindex;
01017 
01018     // Check for overflow
01019     if ((object & mask) != object) {
01020         for (bitindex = 0; bitindex < bit_width; bitindex++){
01021             buf[bitindex]='0';
01022         }
01023     }
01024     else{
01025         unsigned bit_mask = 1 << (bit_width-1);
01026         for (bitindex = 0; bitindex < bit_width; bitindex++) {
01027             buf[bitindex] = (object & bit_mask)? '1' : '0';
01028             bit_mask = bit_mask >> 1;
01029         }
01030     }
01031     buf[bitindex] = '\0';
01032     std::fprintf(f, "assign %s \"%s\" ;\n", wif_name.c_str(), buf); 
01033     old_value = object;
01034 }

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

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

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

01008 {
01009     return object != old_value;
01010 }


変数

const unsigned char& sc_core::wif_unsigned_char_trace::object [protected]

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

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

unsigned char sc_core::wif_unsigned_char_trace::mask [protected]

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


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

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