2012-12-13から1日間の記事一覧

bool型と「!」と「~」演算子

SystemC(C/C++)を使う上での常識的なネタを。 まずは 以下のサンプルコードを見てください。 - サンプルコード #include <systemc.h> SC_MODULE( hoge ){ sc_in <bool > clk; sc_in <bool > xrst; sc_in <sc_uint<32> > indata1; sc_in <sc_uint<32> > indata2; sc_out <sc_uint<64> > outdata; void process(); SC_CTOR( h</sc_uint<64></sc_uint<32></sc_uint<32></bool></bool></systemc.h>…