diff options
Diffstat (limited to 'src/systemc/tests/systemc/bugs/bug_70')
-rw-r--r-- | src/systemc/tests/systemc/bugs/bug_70/bug_70.cpp | 29 | ||||
-rw-r--r-- | src/systemc/tests/systemc/bugs/bug_70/golden/bug_70.log | 9 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/bugs/bug_70/bug_70.cpp b/src/systemc/tests/systemc/bugs/bug_70/bug_70.cpp new file mode 100644 index 000000000..e36a1e57b --- /dev/null +++ b/src/systemc/tests/systemc/bugs/bug_70/bug_70.cpp @@ -0,0 +1,29 @@ +// Bug 70 - Problems with part selections on sc_biguint. + +#include "systemc.h" +//#include "iomanip.h" + +int sc_main(int argc, char* argv[]) +{ + sc_biguint< 16 > a, b, c; + //sc_uint< 16 > a, b ; + + a = 0x5A6C ; + b = 0 ; + c = 0 ; + + cout << "a: " << a.to_string(SC_HEX) << endl ; + cout << "b: " << b.to_string(SC_HEX) << " - So far so good" << endl ; + cout << "c: " << c.to_string(SC_HEX) << " - So far so good" << endl ; + + b(7,0) = a(15,8) ; // Now b should be "0x005A" or ??? + c = a(15,8) ; // Now c should be "0x005A" or ??? + + cout << "a: " << a.to_string(SC_HEX) << endl ; + cout << "b: " << b.to_string(SC_HEX) << endl ; + cout << "c: " << c.to_string(SC_HEX) << endl ; + + sc_stop() ; + return 0; +} + diff --git a/src/systemc/tests/systemc/bugs/bug_70/golden/bug_70.log b/src/systemc/tests/systemc/bugs/bug_70/golden/bug_70.log new file mode 100644 index 000000000..d8a7be7f2 --- /dev/null +++ b/src/systemc/tests/systemc/bugs/bug_70/golden/bug_70.log @@ -0,0 +1,9 @@ +SystemC Simulation +a: 0x05a6c +b: 0x00000 - So far so good +c: 0x00000 - So far so good +a: 0x05a6c +b: 0x0005a +c: 0x0005a + +Info: /OSCI/SystemC: Simulation stopped by user. |