bug_185.cpp revision 12855:588919e0e4aa
1// Bug 185 Test - sc_bv(char) constructor. 2// 3// sc_bv<8> a('1') was yielding an all-zero value rather than all ones. 4 5 6#include "systemc.h" 7 8int sc_main(int argc, char* argv[]) 9{ 10 sc_bv<8> a('0'); 11 sc_bv<9> b('1'); 12 sc_bv<11> c(false); 13 sc_bv<11> d(true); 14 sc_bv<11> e(0); 15 sc_bv<11> f(1); 16 17 cout << "a = " << a << endl; 18 cout << "b = " << b << endl; 19 cout << "c = " << c << endl; 20 cout << "d = " << d << endl; 21 cout << "e = " << e << endl; 22 cout << "f = " << f << endl; 23 24 cerr << "Program completed" << endl; 25 return 0; 26} 27