bug_70.cpp revision 12855:588919e0e4aa
1// Bug 70 - Problems with part selections on sc_biguint. 2 3#include "systemc.h" 4//#include "iomanip.h" 5 6int sc_main(int argc, char* argv[]) 7{ 8 sc_biguint< 16 > a, b, c; 9 //sc_uint< 16 > a, b ; 10 11 a = 0x5A6C ; 12 b = 0 ; 13 c = 0 ; 14 15 cout << "a: " << a.to_string(SC_HEX) << endl ; 16 cout << "b: " << b.to_string(SC_HEX) << " - So far so good" << endl ; 17 cout << "c: " << c.to_string(SC_HEX) << " - So far so good" << endl ; 18 19 b(7,0) = a(15,8) ; // Now b should be "0x005A" or ??? 20 c = a(15,8) ; // Now c should be "0x005A" or ??? 21 22 cout << "a: " << a.to_string(SC_HEX) << endl ; 23 cout << "b: " << b.to_string(SC_HEX) << endl ; 24 cout << "c: " << c.to_string(SC_HEX) << endl ; 25 26 sc_stop() ; 27 return 0; 28} 29 30