summaryrefslogtreecommitdiff
path: root/src/systemc/tests/systemc/datatypes/bit
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-05-24 01:37:55 -0700
committerGabe Black <gabeblack@google.com>2018-08-08 10:09:54 +0000
commit16fa8d7cc8c92f5ab879e4cf9c6c0bbb3567860f (patch)
tree7b6faaacb4574a555e561534aa4a8508c0624c32 /src/systemc/tests/systemc/datatypes/bit
parent7235d3b5211d0ba8f528d930a4c1e7ad62eec51a (diff)
downloadgem5-16fa8d7cc8c92f5ab879e4cf9c6c0bbb3567860f.tar.xz
systemc: Import tests from the Accellera systemc distribution.
Change-Id: Iad76b398949a55d768a34d027a2d8e3739953da6 Reviewed-on: https://gem5-review.googlesource.com/10845 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/tests/systemc/datatypes/bit')
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/golden/test01.log59
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/test01.cpp235
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/golden/test_bitref.log19
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/test_bitref.cpp218
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/golden/test01.log2
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/test01.cpp137
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/golden/test01.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/test01.cpp112
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/golden/test02.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/test02.cpp112
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/golden/test03.log35
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/test03.cpp115
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/golden/test01.log498
-rw-r--r--src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/test01.cpp1014
14 files changed, 2622 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/golden/test01.log
new file mode 100644
index 000000000..537dd619b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/golden/test01.log
@@ -0,0 +1,59 @@
+SystemC Simulation
+
+Info: (I804) /IEEE_Std_1666/deprecated: sc_bit is deprecated, use bool instead
+Caught exception for sc_bit(2)
+Caught exception for sc_bit('2')
+
+Warning: (W212) sc_logic value 'X' cannot be converted to bool
+In file: <removed by verify.pl>
+00101010111
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+1011
+0010
+1001
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+0111
+0001
+0110
+
+Info: (I804) /IEEE_Std_1666/deprecated: You can turn off warnings about
+ IEEE 1666 deprecated features by placing this method call
+ as the first statement in your sc_main() function:
+
+ sc_core::sc_report_handler::set_actions( "/IEEE_Std_1666/deprecated",
+ sc_core::SC_DO_NOTHING );
+
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/test01.cpp
new file mode 100644
index 000000000..e96061ac8
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_bit/test01/test01.cpp
@@ -0,0 +1,235 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test01.cpp --
+
+ Original Author: Joe Buck, Synopsys, Inc., 2002-02-15
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+#include "systemc.h"
+
+void cover_sc_bit()
+{
+ sc_bit bdef;
+ sc_bit bf(false);
+ sc_bit bt(true);
+ sc_bit b0(0);
+ sc_bit b1(1);
+ try {
+ sc_bit foo(2);
+ }
+ catch (sc_report) {
+ cout << "Caught exception for sc_bit(2)\n";
+ }
+ sc_bit bc0('0');
+ sc_bit bc1('1');
+ try {
+ sc_bit foo('2');
+ }
+ catch (sc_report) {
+ cout << "Caught exception for sc_bit('2')\n";
+ }
+ sc_bit blc0(sc_logic('0'));
+ sc_bit blc1(sc_logic('1'));
+ sc_bit blcx(sc_logic('X'));
+ sc_bit bcop(bt);
+ cout << bdef << bf << bt << b0 << b1 << bc0 << bc1 << blc0 << blc1
+ << blcx << bcop << endl;
+ sc_bit b;
+ b = bt;
+ sc_assert(b);
+ b = 0;
+ sc_assert(!b);
+ b = true;
+ sc_assert(b.to_bool());
+ b = '0';
+ sc_assert(!b.to_bool());
+ b = sc_logic('1');
+ sc_assert(b.to_char() == '1');
+ b = bf;
+ sc_assert(~b);
+ b |= bt;
+ sc_assert(b);
+ b &= bf;
+ sc_assert(!b);
+ b |= 1;
+ sc_assert(b);
+ b &= 0;
+ sc_assert(!b);
+ b |= '1';
+ sc_assert(b);
+ b &= '0';
+ sc_assert(!b);
+ b |= true;
+ sc_assert(b);
+ b &= false;
+ sc_assert(!b);
+ b ^= bt;
+ sc_assert(b);
+ b ^= 1;
+ sc_assert(!b);
+ b ^= '1';
+ sc_assert(b);
+ b ^= true;
+ sc_assert(!b);
+
+ sc_assert(b == bf);
+ sc_assert(b == 0);
+ sc_assert(b == '0');
+ sc_assert(b == false);
+ b = 1;
+ sc_assert(b == bt);
+ sc_assert(b == 1);
+ sc_assert(b == '1');
+ sc_assert(b == true);
+ sc_assert(1 == b);
+ sc_assert('1' == b);
+ sc_assert(true == b);
+ sc_assert(equal(b, bt));
+ sc_assert(equal(b, 1));
+ sc_assert(equal(b, '1'));
+ sc_assert(equal(b, true));
+ sc_assert(equal(1, b));
+ sc_assert(equal('1', b));
+ sc_assert(equal(true, b));
+ b = 0;
+ sc_assert(b != bt);
+ sc_assert(b != 1);
+ sc_assert(b != '1');
+ sc_assert(b != true);
+ sc_assert(1 != b);
+ sc_assert('1' != b);
+ sc_assert(true != b);
+ sc_assert(not_equal(b, bt));
+ sc_assert(not_equal(b, 1));
+ sc_assert(not_equal(b, '1'));
+ sc_assert(not_equal(b, true));
+ sc_assert(not_equal(1, b));
+ sc_assert(not_equal('1', b));
+ sc_assert(not_equal(true, b));
+
+ // the following assertion is incorrect, because the b_not() method
+ // is destructive, i.e., it implements something like b ~= void.
+ /// sc_assert(b == b_not(b.b_not()));
+ b.b_not();
+ sc_assert(b);
+ sc_bit bx;
+ b_not(bx, b0);
+ sc_assert(bx);
+ b_not(bx, b1);
+ sc_assert(!bx);
+
+ cout << (b0|b0) << (b0|b1) << (b1|b0) << (b1|b1) << endl;
+ cout << (b0&b0) << (b0&b1) << (b1&b0) << (b1&b1) << endl;
+ cout << (b0^b0) << (b0^b1) << (b1^b0) << (b1^b1) << endl;
+
+ cout << (b0|0) << (b0|1) << (b1|0) << (b1|1) << endl;
+ cout << (b0&0) << (b0&1) << (b1&0) << (b1&1) << endl;
+ cout << (b0^0) << (b0^1) << (b1^0) << (b1^1) << endl;
+
+ cout << (b0|'0') << (b0|'1') << (b1|'0') << (b1|'1') << endl;
+ cout << (b0&'0') << (b0&'1') << (b1&'0') << (b1&'1') << endl;
+ cout << (b0^'0') << (b0^'1') << (b1^'0') << (b1^'1') << endl;
+
+ cout << (b0|true) << (b0|false) << (b1|true) << (b1|false) << endl;
+ cout << (b0&true) << (b0&false) << (b1&true) << (b1&false) << endl;
+ cout << (b0^true) << (b0^false) << (b1^true) << (b1^false) << endl;
+
+ cout << (0|b0) << (0|b1) << (1|b0) << (1|b1) << endl;
+ cout << (0&b0) << (0&b1) << (1&b0) << (1&b1) << endl;
+ cout << (0^b0) << (0^b1) << (1^b0) << (1^b1) << endl;
+
+ cout << ('0'|b0) << ('0'|b1) << ('1'|b0) << ('1'|b1) << endl;
+ cout << ('0'&b0) << ('0'&b1) << ('1'&b0) << ('1'&b1) << endl;
+ cout << ('0'^b0) << ('0'^b1) << ('1'^b0) << ('1'^b1) << endl;
+
+ cout << (false|b0) << (false|b1) << (true|b0) << (true|b1) << endl;
+ cout << (false&b0) << (false&b1) << (true&b0) << (true&b1) << endl;
+ cout << (false^b0) << (false^b1) << (true^b0) << (true^b1) << endl;
+
+ cout << b_or(b0,b0) << b_or(b0,b1) << b_or(b1,b0) << b_or(b1,b1) << endl;
+ cout << b_and(b0,b0) << b_and(b0,b1) << b_and(b1,b0) << b_and(b1,b1)
+ << endl;
+ cout << b_xor(b0,b0) << b_xor(b0,b1) << b_xor(b1,b0) << b_xor(b1,b1)
+ << endl;
+
+ cout << b_or(b0,0) << b_or(b0,1) << b_or(b1,0) << b_or(b1,1) << endl;
+ cout << b_and(b0,0) << b_and(b0,1) << b_and(b1,0) << b_and(b1,1) << endl;
+ cout << b_xor(b0,0) << b_xor(b0,1) << b_xor(b1,0) << b_xor(b1,1) << endl;
+
+ cout << b_or(b0,'0') << b_or(b0,'1') << b_or(b1,'0') << b_or(b1,'1')
+ << endl;
+ cout << b_and(b0,'0') << b_and(b0,'1') << b_and(b1,'0') << b_and(b1,'1')
+ << endl;
+ cout << b_xor(b0,'0') << b_xor(b0,'1') << b_xor(b1,'0') << b_xor(b1,'1')
+ << endl;
+
+ cout << b_or(b0,false) << b_or(b0,true) << b_or(b1,false) << b_or(b1,true)
+ << endl;
+ cout << b_and(b0,false) << b_and(b0,true) << b_and(b1,false)
+ << b_and(b1,true) << endl;
+ cout << b_xor(b0,false) << b_xor(b0,true) << b_xor(b1,false)
+ << b_xor(b1,true) << endl;
+
+ cout << b_or(0,b0) << b_or(0,b1) << b_or(1,b0) << b_or(1,b1) << endl;
+ cout << b_and(0,b0) << b_and(0,b1) << b_and(1,b0) << b_and(1,b1) << endl;
+ cout << b_xor(0,b0) << b_xor(0,b1) << b_xor(1,b0) << b_xor(1,b1) << endl;
+
+ cout << b_or('0',b0) << b_or('0',b1) << b_or('1',b0) << b_or('1',b1)
+ << endl;
+ cout << b_and('0',b0) << b_and('0',b1) << b_and('1',b0) << b_and('1',b1)
+ << endl;
+ cout << b_xor('0',b0) << b_xor('0',b1) << b_xor('1',b0) << b_xor('1',b1)
+ << endl;
+
+ cout << b_or(false,b0) << b_or(false,b1) << b_or(true,b0) << b_or(true,b1)
+ << endl;
+ cout << b_and(false,b0) << b_and(false,b1) << b_and(true,b0)
+ << b_and(true,b1) << endl;
+ cout << b_xor(false,b0) << b_xor(false,b1) << b_xor(true,b0)
+ << b_xor(true,b1) << endl;
+
+ b_or(b, b0, b1);
+ sc_assert(b);
+ b_and(b, b0, b1);
+ sc_assert(!b);
+ b_xor(b, b0, b1);
+ sc_assert(b);
+}
+
+int
+sc_main(int, char*[])
+{
+ cover_sc_bit();
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/golden/test_bitref.log b/src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/golden/test_bitref.log
new file mode 100644
index 000000000..1b35a76fa
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/golden/test_bitref.log
@@ -0,0 +1,19 @@
+SystemC Simulation
+
+Warning: (W211) sc_logic value 'Z' cannot be converted to bool
+In file: <removed by verify.pl>
+
+Warning: (W212) sc_logic value 'X' cannot be converted to bool
+In file: <removed by verify.pl>
+
+Warning: (W211) sc_logic value 'Z' cannot be converted to bool
+In file: <removed by verify.pl>
+
+Warning: (W212) sc_logic value 'X' cannot be converted to bool
+In file: <removed by verify.pl>
+
+Warning: (W211) sc_logic value 'Z' cannot be converted to bool
+In file: <removed by verify.pl>
+
+Warning: (W212) sc_logic value 'X' cannot be converted to bool
+In file: <removed by verify.pl>
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/test_bitref.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/test_bitref.cpp
new file mode 100644
index 000000000..5d010dbf4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_bitref/test01/test_bitref.cpp
@@ -0,0 +1,218 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test_bitref.cpp -- Test using bitrefs in boolean contexts
+
+ Original Author: Philipp A. Hartmann, OFFIS, 2013-10-28
+
+*****************************************************************************/
+
+#include <systemc.h>
+
+#define sc_nassert( expr ) \
+ sc_assert( !(expr) )
+
+using sc_dt::sc_bitref;
+using sc_dt::sc_bitref_r;
+using sc_dt::sc_concref;
+using sc_dt::sc_concref_r;
+using sc_dt::sc_subref;
+using sc_dt::sc_subref_r;
+
+int sc_main(int,char*[])
+{
+ sc_bv<8> bv = "00101010";
+ sc_lv<8> lv = "1XZ01010";
+
+ // plain bitrefs
+ {
+ sc_nassert( bv[0] );
+ sc_assert ( !bv[0] );
+ // sc_assert( ~bv[0] ); // could not convert ... to ‘bool’
+ sc_nassert( bv[0].to_bool() );
+ sc_assert ( !bv[0].to_bool() );
+ sc_assert( (~bv[0]).to_bool() );
+
+#if IEEE_1666_CPLUSPLUS >= 201103L
+ sc_assert( bv[1] );
+#endif
+ sc_nassert( !bv[1] );
+ sc_assert ( bv[1].to_bool() );
+ sc_nassert( (~bv[1]).to_bool() );
+
+ sc_nassert( bv[0] == true );
+ sc_assert ( bv[0] != true );
+ sc_assert ( bv[0] == SC_LOGIC_0 );
+ sc_nassert( bv[0].to_bool() );
+ sc_assert( bv[1].to_bool() );
+ sc_nassert( bv[0] != 0 );
+ sc_nassert( bv[0] == bv[1] );
+ sc_nassert( SC_LOGIC_1 != bv[1] );
+
+ sc_assert ( bv[0] == '0' );
+ sc_nassert( bv[1] == '0' );
+ sc_assert ( bv[1] == '1' );
+ sc_nassert( bv[0] == '1' );
+
+ sc_nassert( bv[0] != '0' );
+ sc_assert ( bv[1] != '0' );
+ sc_nassert( bv[1] != '1' );
+ sc_assert ( bv[0] != '1' );
+
+ sc_assert ( '0' == bv[0] );
+ sc_nassert( '0' == bv[1] );
+ sc_assert ( '1' == bv[1] );
+ sc_nassert( '1' == bv[0] );
+
+ sc_nassert( '0' != bv[0] );
+ sc_assert ( '0' != bv[1] );
+ sc_nassert( '1' != bv[1] );
+ sc_assert ( '1' != bv[0] );
+
+ sc_nassert( ~bv[0] == '0' );
+ sc_assert ( ~bv[1] == '0' );
+ sc_nassert( ~bv[1] == '1' );
+ sc_assert ( ~bv[0] == '1' );
+
+ sc_assert ( ~bv[0] != '0' );
+ sc_nassert( ~bv[1] != '0' );
+ sc_assert ( ~bv[1] != '1' );
+ sc_nassert( ~bv[0] != '1' );
+
+ sc_nassert( '0' == ~bv[0] );
+ sc_assert ( '0' == ~bv[1] );
+ sc_nassert( '1' == ~bv[1] );
+ sc_assert ( '1' == ~bv[0] );
+
+ sc_assert ( '0' != ~bv[0] );
+ sc_nassert( '0' != ~bv[1] );
+ sc_assert ( '1' != ~bv[1] );
+ sc_nassert( '1' != ~bv[0] );
+
+
+
+ sc_assert( bv[0] == lv[0] );
+ sc_assert( bv[0] != lv[6] );
+
+ sc_assert( bv.or_reduce() );
+ sc_assert( !bv.nor_reduce() );
+
+ sc_assert ( lv[0] == false );
+ sc_assert ( lv[5] == SC_LOGIC_Z );
+ sc_assert ( lv[6] == SC_LOGIC_X );
+ sc_assert ( lv[6].value() == SC_LOGIC_X );
+
+ // sc_assert( ~lv[0] ); // could not convert ... to ‘bool’
+ // sc_assert( lv[7] ); // could not convert ... to ‘bool’
+ // sc_assert( !lv[0] ); // could not convert ... to ‘bool’
+
+ sc_assert( !lv[0].to_bool() );
+ sc_assert( (~lv[0]).to_bool() );
+
+ // with warnings
+ sc_assert( lv[5].to_bool() );
+ sc_assert( lv[6].to_bool() );
+ }
+
+ // bitrefs to subrefs
+ {
+ /* auto */ sc_subref_r< sc_bv_base > bv_range_r = bv.range(5,1);
+ /* auto */ sc_subref_r< sc_lv_base > lv_range_r = lv.range(6,2);
+
+ /* auto */ sc_subref< sc_bv_base > bv_range = bv.range(5,1);
+ /* auto */ sc_subref< sc_lv_base > lv_range = lv.range(6,2);
+
+#if IEEE_1666_CPLUSPLUS >= 201103L
+ sc_assert( bv_range[0] );
+#endif
+ sc_nassert( !bv_range[0] );
+ sc_assert( !bv_range[1] );
+ sc_assert( (~bv_range[1]).to_bool() );
+
+ sc_assert( bv[1] == bv_range_r[0] );
+
+ bv_range[0] = false;
+ sc_assert( !bv[1] );
+ sc_assert( bv[1] == bv_range_r[0] );
+ sc_assert( bv[1] == bv_range[0] );
+
+ bv_range[0] = SC_LOGIC_1;
+#if IEEE_1666_CPLUSPLUS >= 201103L
+ sc_assert( bv[1] );
+#endif
+ sc_assert( bv[1] == bv_range_r[0] );
+ sc_assert( bv[1] == bv_range[0] );
+
+ // sc_assert( ~lv_range[0] ); // could not convert ... to ‘bool’
+ // sc_assert( lv_range_r[7] ); // could not convert ... to ‘bool’
+
+ sc_assert( !lv_range_r[0].to_bool() );
+ sc_assert( lv_range_r[1].to_bool() );
+ sc_nassert( (~lv_range[1]).to_bool() );
+
+ // with warnings
+ sc_assert( lv_range[3].to_bool() );
+ sc_assert( lv_range_r[4].to_bool() );
+ }
+
+ // bitrefs to concrefs
+ {
+ /* auto */ sc_concref< sc_concref<sc_subref<sc_bv_base>, sc_subref<sc_bv_base> >
+ , sc_bitref<sc_bv_base> >
+ bv_range = ( bv.range(7,6) , bv.range(5,1), bv[1] );
+ /* auto */ sc_concref_r< sc_concref_r<sc_subref<sc_bv_base>, sc_subref<sc_lv_base> >
+ , sc_bv_base >
+ lv_range_r = ( bv.range(7,6) , lv.range(6,2), true );
+
+#if IEEE_1666_CPLUSPLUS >= 201103L
+ sc_assert( bv_range[0] );
+#endif
+ sc_nassert( !bv_range[0] );
+ sc_assert( !bv_range[2] );
+ // sc_assert( ~bv_range[2] ); // could not convert ... to ‘bool’
+
+ sc_assert( bv[1] == bv_range[0] );
+
+ bv_range[0] = false;
+ sc_assert( !bv[1] );
+ sc_assert( bv[1] == bv_range[0] );
+
+ bv_range[0] = SC_LOGIC_1;
+#if IEEE_1666_CPLUSPLUS >= 201103L
+ sc_assert( bv[1] );
+#endif
+ sc_assert( bv[1] == bv_range[0] );
+
+ // sc_assert( ~lv_range_r[0] ); // could not convert ... to ‘bool’
+ // sc_assert( lv_range_r[7] ); // could not convert ... to ‘bool’
+ // sc_assert( !lv_range_r[0] ); // could not convert ... to ‘bool’
+
+ sc_assert( lv_range_r[0].to_bool() );
+ sc_assert( !lv_range_r[1].to_bool() );
+ sc_assert( (~lv_range_r[1]).to_bool() );
+
+ // with warnings
+ sc_assert( lv_range_r[4].to_bool() );
+ sc_assert( lv_range_r[5].to_bool() );
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/golden/test01.log
new file mode 100644
index 000000000..faa9c66e9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/golden/test01.log
@@ -0,0 +1,2 @@
+SystemC Simulation
+OK
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/test01.cpp
new file mode 100644
index 000000000..9ff92df52
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/bitwise_binary/test01/test01.cpp
@@ -0,0 +1,137 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test01.cpp --
+
+ Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+// test of the bitwise binary operators of sc_proxy<X>
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ sc_bv<32> bv = 10;
+ sc_bv<32> lv = 11;
+
+ int I = 12;
+ unsigned U = 12;
+
+ sc_bv<32> bv1;
+ sc_bv<32> bv2;
+ sc_lv<32> lv1;
+ sc_lv<32> lv2;
+
+ // &
+
+ bv1 = bv;
+ bv2 = bv;
+ bv1 &= I;
+ bv2 = bv2 & I;
+ sc_assert( bv1 == bv2 );
+
+ bv1 = bv;
+ bv2 = bv;
+ bv1 &= U;
+ bv2 = bv2 & U;
+ sc_assert( bv1 == bv2 );
+
+ lv1 = lv;
+ lv2 = lv;
+ lv1 &= I;
+ lv2 = lv2 & I;
+ sc_assert( lv1 == lv2 );
+
+ lv1 = lv;
+ lv2 = lv;
+ lv1 &= U;
+ lv2 = lv2 & U;
+ sc_assert( lv1 == lv2 );
+
+ // |
+
+ bv1 = bv;
+ bv2 = bv;
+ bv1 |= I;
+ bv2 = bv2 | I;
+ sc_assert( bv1 == bv2 );
+
+ bv1 = bv;
+ bv2 = bv;
+ bv1 |= U;
+ bv2 = bv2 | U;
+ sc_assert( bv1 == bv2 );
+
+ lv1 = lv;
+ lv2 = lv;
+ lv1 |= I;
+ lv2 = lv2 | I;
+ sc_assert( lv1 == lv2 );
+
+ lv1 = lv;
+ lv2 = lv;
+ lv1 |= U;
+ lv2 = lv2 | U;
+ sc_assert( lv1 == lv2 );
+
+ // ^
+
+ bv1 = bv;
+ bv2 = bv;
+ bv1 ^= I;
+ bv2 = bv2 ^ I;
+ sc_assert( bv1 == bv2 );
+
+ bv1 = bv;
+ bv2 = bv;
+ bv1 ^= U;
+ bv2 = bv2 ^ U;
+ sc_assert( bv1 == bv2 );
+
+ lv1 = lv;
+ lv2 = lv;
+ lv1 ^= I;
+ lv2 = lv2 ^ I;
+ sc_assert( lv1 == lv2 );
+
+ lv1 = lv;
+ lv2 = lv;
+ lv1 ^= U;
+ lv2 = lv2 ^ U;
+ sc_assert( lv1 == lv2 );
+
+ cout << "OK" << endl;
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/golden/test01.log
new file mode 100644
index 000000000..c57396dc4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/golden/test01.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+bv2a = 01
+bv2b = 10
+bv4a = 0110
+bv4a = 1001
+bv4a = 1011
+bv2a = 10
+bv4a = 1101
+bv2a = 01
+bv4a = 1111
+bv4b = 1001
+bv2a = 00
+bv2b = 11
+bv4a = 0011
+bv4a = 1100
+bv2a = 11
+bv2b = 00
+bv2a = 01
+bv2b = 10
+bv4a = 0000
+bv4b = 1111
+bv2a = 00
+bv2b = 11
+bv4a = 0110
+bv4a = 0000
+bv2a = 11
+bv2b = 00
+11111010
+10101111
+00001
+10000
+00001
+10000
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/test01.cpp
new file mode 100644
index 000000000..9028946e7
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test01/test01.cpp
@@ -0,0 +1,112 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test01.cpp --
+
+ Original Author: Andy Goodrich, Forte Design Systemc, 2003-01-17
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+// test of r-value and l-value concatenation -- use operator , ()
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ sc_bv<2> bv2a;
+ sc_bv<2> bv2b;
+ const sc_bv<2> bv2c( "10" );
+ const sc_bv<2> bv2d( "01" );
+ sc_bv<4> bv4a;
+ sc_bv<4> bv4b( "1111" );
+
+ ( bv2a, bv2b ) = "0110";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+
+ bv4a = ( bv2a, bv2b );
+ cout << "bv4a = " << bv4a << endl;
+
+ bv4a = ( bv2c, bv2d );
+ cout << "bv4a = " << bv4a << endl;
+
+ ( bv4a.range( 2, 1 ), bv2a ) = "0110";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+
+ ( bv2a, bv4a.range( 1, 2 ) ) = "0101";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+
+ ( bv4a.range( 2, 1 ), bv4b.range( 2, 1 ) ) = "1100";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv4b = " << bv4b << endl;
+
+ ( ( bv2a, bv2b ), bv4a ) = "00110011";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+ cout << "bv4a = " << bv4a << endl;
+
+ ( bv4a, ( bv2a, bv2b ) ) = "11001100";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+
+ ( ( bv2a, bv2b ), ( bv4a, bv4b ) ) = "011000001111";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv4b = " << bv4b << endl;
+
+ ( ( bv2a, bv2b ), bv4a.range( 2, 1 ) ) = "001111";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+ cout << "bv4a = " << bv4a << endl;
+
+ ( bv4a.range( 2, 1 ), ( bv2a, bv2b ) ) = "001100";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+
+ const char* s = "1010";
+ sc_logic l = SC_LOGIC_1;
+ bool b = true;
+
+ cout << ( bv4b, s ) << endl;
+ cout << ( s, bv4b ) << endl;
+ cout << ( bv4a, l ) << endl;
+ cout << ( l, bv4a ) << endl;
+ cout << ( bv4a, b ) << endl;
+ cout << ( b, bv4a ) << endl;
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/golden/test02.log
new file mode 100644
index 000000000..c57396dc4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/golden/test02.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+bv2a = 01
+bv2b = 10
+bv4a = 0110
+bv4a = 1001
+bv4a = 1011
+bv2a = 10
+bv4a = 1101
+bv2a = 01
+bv4a = 1111
+bv4b = 1001
+bv2a = 00
+bv2b = 11
+bv4a = 0011
+bv4a = 1100
+bv2a = 11
+bv2b = 00
+bv2a = 01
+bv2b = 10
+bv4a = 0000
+bv4b = 1111
+bv2a = 00
+bv2b = 11
+bv4a = 0110
+bv4a = 0000
+bv2a = 11
+bv2b = 00
+11111010
+10101111
+00001
+10000
+00001
+10000
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/test02.cpp
new file mode 100644
index 000000000..35e83cf6a
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test02/test02.cpp
@@ -0,0 +1,112 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test02.cpp --
+
+ Original Author: Andy Goodrich, Forte Design Systems, 2003-01-17
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+// test of r-value and l-value concatenation -- use concat()
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ sc_bv<2> bv2a;
+ sc_bv<2> bv2b;
+ const sc_bv<2> bv2c( "10" );
+ const sc_bv<2> bv2d( "01" );
+ sc_bv<4> bv4a;
+ sc_bv<4> bv4b( "1111" );
+
+ concat( bv2a, bv2b ) = "0110";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+
+ bv4a = concat( bv2a, bv2b );
+ cout << "bv4a = " << bv4a << endl;
+
+ bv4a = concat( bv2c, bv2d );
+ cout << "bv4a = " << bv4a << endl;
+
+ concat( bv4a.range( 2, 1 ), bv2a ) = "0110";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+
+ concat( bv2a, bv4a.range( 1, 2 ) ) = "0101";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+
+ concat( bv4a.range( 2, 1 ), bv4b.range( 2, 1 ) ) = "1100";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv4b = " << bv4b << endl;
+
+ concat( concat( bv2a, bv2b ), bv4a ) = "00110011";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+ cout << "bv4a = " << bv4a << endl;
+
+ concat( bv4a, concat( bv2a, bv2b ) ) = "11001100";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+
+ concat( concat( bv2a, bv2b ), concat( bv4a, bv4b ) ) = "011000001111";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv4b = " << bv4b << endl;
+
+ concat( concat( bv2a, bv2b ), bv4a.range( 2, 1 ) ) = "001111";
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+ cout << "bv4a = " << bv4a << endl;
+
+ concat( bv4a.range( 2, 1 ), concat( bv2a, bv2b ) ) = "001100";
+ cout << "bv4a = " << bv4a << endl;
+ cout << "bv2a = " << bv2a << endl;
+ cout << "bv2b = " << bv2b << endl;
+
+ const char* s = "1010";
+ sc_logic l = SC_LOGIC_1;
+ bool b = true;
+
+ cout << concat( bv4b, s ) << endl;
+ cout << concat( s, bv4b ) << endl;
+ cout << concat( bv4a, l ) << endl;
+ cout << concat( l, bv4a ) << endl;
+ cout << concat( bv4a, b ) << endl;
+ cout << concat( b, bv4a ) << endl;
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/golden/test03.log
new file mode 100644
index 000000000..a46c785ff
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/golden/test03.log
@@ -0,0 +1,35 @@
+SystemC Simulation
+
+6666555555555544444444443333333333222222222211111111110000000000
+3210987654321098765432109876543210987654321098765432109876543210
+----------------------------------------------------------------
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX lv1
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX lv2
+ (lv1[33], lv2[34]) = 0
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX lv1
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXX0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX lv2
+lv1[43].set_cword(0, 0)
+XXXXXXXXXXXXXXXXXXXX1XXXXXXXXX0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX lv1
+lv2[44].set_word(0, 0)
+XXXXXXXXXXXXXXXXXXXZXXXXXXXXX0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX lv2
+(lv1,lv2[9]) = 0
+0000000000000000000000000000000000000000000000000000000000000000 lv1
+XXXXXXXXXXXXXXXXXXXZXXXXXXXXX0XXXXXXXXXXXXXXXXXXXXXXXX0XXXXXXXXX lv2
+(lv2[9], lv1) = -1ll
+1111111111111111111111111111111111111111111111111111111111111111 lv1
+XXXXXXXXXXXXXXXXXXXZXXXXXXXXX0XXXXXXXXXXXXXXXXXXXXXXXX1XXXXXXXXX lv2
+
+0000000000000000000000000000000000000000000000000000000000000000 bv1
+0000000000000000000000000000000000000000000000000000000000000000 bv2
+(bv1[33], bv2[34]) = 3
+0000000000000000000000000000001000000000000000000000000000000000 bv1
+0000000000000000000000000000010000000000000000000000000000000000 bv2
+bv1[43].set_word(0, 1)
+0000000000000000000010000000001000000000000000000000000000000000 bv1
+(bv1,bv2[9]) = 0
+0000000000000000000000000000000000000000000000000000000000000000 bv1
+0000000000000000000000000000010000000000000000000000000000000000 bv2
+(bv2[9], bv1) = -1ll
+1111111111111111111111111111111111111111111111111111111111111111 bv1
+0000000000000000000000000000010000000000000000000000001000000000 bv2
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/test03.cpp
new file mode 100644
index 000000000..1c30c19d9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/concat/test03/test03.cpp
@@ -0,0 +1,115 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test03.cpp --
+
+ Original Author: Andy Goodrich, Forte Design Systems, 2003-01-17
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+// test and l-value bit selection concatenation on sc_lv and sc_bv
+// also test set_word() and set_cword on bit selections
+
+#include "systemc.h"
+
+int sc_main(int argc, char* argv[])
+{
+ sc_bv<64> bv1;
+ sc_bv<64> bv2;
+ sc_lv<64> lv1;
+ sc_lv<64> lv2;
+
+ cout << endl;
+ cout << "6666555555555544444444443333333333222222222211111111110000000000"
+ << endl;
+ cout << "3210987654321098765432109876543210987654321098765432109876543210"
+ << endl;
+ cout << "----------------------------------------------------------------"
+ << endl;
+
+ // LV SUPPORT:
+
+ cout << lv1 << " lv1" << endl;
+ cout << lv2 << " lv2 " << endl;
+
+ cout << " (lv1[33], lv2[34]) = 0 " << endl;
+ (lv1[33], lv2[34]) = 0;
+ cout << lv1 << " lv1" << endl;
+ cout << lv2 << " lv2 " << endl;
+
+ cout << "lv1[43].set_cword(0, 0) " << endl;
+ lv1[43].set_cword(0, 0);
+ cout << lv1 << " lv1" << endl;
+
+ cout << "lv2[44].set_word(0, 0)" << endl;
+ lv2[44].set_word(0, 0);
+ cout << lv2 << " lv2" << endl;
+
+ cout << "(lv1,lv2[9]) = 0" << endl;
+ (lv1,lv2[9]) = 0;
+ cout << lv1 << " lv1 " << endl;
+ cout << lv2 << " lv2 " << endl;
+
+ cout << "(lv2[9], lv1) = -1ll" << endl;
+ (lv2[9], lv1) = -1ll;
+ cout << lv1 << " lv1 " << endl;
+ cout << lv2 << " lv2 " << endl;
+
+
+ // BV SUPPORT:
+
+ cout << endl;
+ cout << bv1 << " bv1" << endl;
+ cout << bv2 << " bv2" << endl;
+
+ cout << "(bv1[33], bv2[34]) = 3" << endl;
+ (bv1[33], bv2[34]) = 3;
+ cout << bv1 << " bv1" << endl;
+ cout << bv2 << " bv2" << endl;
+
+ cout << "bv1[43].set_word(0, 1)" << endl;
+ bv1[43].set_word(0, 1);
+ cout << bv1 << " bv1" << endl;
+
+
+ cout << "(bv1,bv2[9]) = 0" << endl;
+ (bv1,bv2[9]) = 0;
+ cout << bv1 << " bv1" << endl;
+ cout << bv2 << " bv2 " << endl;
+
+ cout << "(bv2[9], bv1) = -1ll" << endl;
+ (bv2[9], bv1) = -1ll;
+ cout << bv1 << " bv1" << endl;
+ cout << bv2 << " bv2 " << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/golden/test01.log
new file mode 100644
index 000000000..1d06f278b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/golden/test01.log
@@ -0,0 +1,498 @@
+SystemC Simulation
+*** test_ctors
+sc_bv_base()
+32
+00000000000000000000000000000000
+sc_bv_base( int )
+3
+000
+sc_bv_base( bool )
+32
+11111111111111111111111111111111
+sc_bv_base( bool, int )
+3
+111
+sc_bv_base( const char* )
+4
+0101
+4
+1010
+4
+0101
+4
+1010
+sc_bv_base( const char*, int )
+3
+101
+4
+0101
+5
+00101
+3
+010
+4
+1010
+5
+01010
+3
+101
+4
+0101
+5
+00101
+3
+010
+4
+1010
+5
+11010
+sc_bv_base( const sc_proxy<X>& )
+
+Warning: (W207) sc_bv cannot contain values X and Z
+In file: <removed by verify.pl>
+4
+0101
+sc_bv_base( const sc_bv_base& )
+4
+0110
+*** test_bitwise_complement
+sc_bv_base::b_not()
+4
+0110
+4
+1001
+sc_bv_base::operator ~ () const
+4
+0110
+4
+1001
+sc_lv_base::b_not()
+4
+01ZX
+4
+10XX
+sc_lv_base::operator ~ () const
+4
+01ZX
+4
+10XX
+sc_proxy<X>::b_not()
+4
+01ZX
+4
+10XX
+sc_proxy<X>::operator ~ () const
+4
+01ZX
+4
+10XX
+*** test_bitwise_and
+*** test_bitwise_or
+*** test_bitwise_xor
+*** test_bitwise_left_shift
+sc_bv_base::operator <<= ( int )
+70
+1111111111111111111111111111111111111111111111111111111111111111111110
+
+caught exception
+Error: (E5) out of bounds: left shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+1111111111111111111111111111111111111111111111111111111111111111110000
+70
+1111111111111111111111111111111110000000000000000000000000000000000000
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_bv_base::operator << ( int ) const
+70
+1111111111111111111111111111111111111111111111111111111111111111111110
+
+caught exception
+Error: (E5) out of bounds: left shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+1111111111111111111111111111111111111111111111111111111111111111110000
+70
+1111111111111111111111111111111111110000000000000000000000000000000000
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_lv_base::operator <<= ( int )
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000000000000000000000000000000000000
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_lv_base::operator << ( int ) const
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000000000000000000000000000000000
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_proxy<X>::operator <<= ( int )
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000000000000000000000000000000000000
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_proxy<X>::operator << ( int ) const
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ000000000000000000000000000000000
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+*** test_bitwise_right_shift
+sc_bv_base::operator >>= ( int )
+70
+0111111111111111111111111111111111111111111111111111111111111111111111
+
+caught exception
+Error: (E5) out of bounds: right shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+0000111111111111111111111111111111111111111111111111111111111111111111
+70
+0000000000000000000000000000000000000111111111111111111111111111111111
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_bv_base::operator >> ( int ) const
+70
+0111111111111111111111111111111111111111111111111111111111111111111111
+
+caught exception
+Error: (E5) out of bounds: right shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+0000111111111111111111111111111111111111111111111111111111111111111111
+70
+0000000000000000000000000000000000111111111111111111111111111111111111
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_lv_base::operator >>= ( int )
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+000000000000000000000000000000000000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_lv_base::operator >> ( int ) const
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+000000000000000000000000000000000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_proxy<X>::operator >>= ( int )
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+000000000000000000000000000000000000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+sc_proxy<X>::operator >> ( int ) const
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right shift operation is only allowed with positive shift values, shift value = -1
+In file: <removed by verify.pl>
+70
+000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+000000000000000000000000000000000ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+0000000000000000000000000000000000000000000000000000000000000000000000
+*** test_bitwise_left_rotate
+sc_bv_base::lrotate( int )
+70
+1111111111111111111111111111111111111111111111111111111111111111111110
+
+caught exception
+Error: (E5) out of bounds: left rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+1111111111111111111111111111111111111111111111111111111111111111110111
+70
+1111111111111111111111111111111110111111111111111111111111111111111111
+70
+1111111111111111111111111111111011111111111111111111111111111111111111
+lrotate( const sc_bv_base&, int )
+70
+1111111111111111111111111111111111111111111111111111111111111111111110
+
+caught exception
+Error: (E5) out of bounds: left rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+1111111111111111111111111111111111111111111111111111111111111111110111
+70
+1111111111111111111111111111111111110111111111111111111111111111111111
+70
+1111111111111111111111111111111111111111111111111111111111111111111011
+sc_lv_base::lrotate( int )
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+lrotate( const sc_lv_base&, int )
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXX
+sc_proxy<X>::lrotate( int )
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+lrotate( const sc_proxy<X>&, int )
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ
+
+caught exception
+Error: (E5) out of bounds: left rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXX
+*** test_bitwise_right_rotate
+sc_bv_base::rrotate( int )
+70
+0111111111111111111111111111111111111111111111111111111111111111111111
+
+caught exception
+Error: (E5) out of bounds: right rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+1110111111111111111111111111111111111111111111111111111111111111111111
+70
+1111111111111111111111111111111111110111111111111111111111111111111111
+70
+1111111111111111111111111111111111111101111111111111111111111111111111
+rrotate( const sc_bv_base&, int )
+70
+0111111111111111111111111111111111111111111111111111111111111111111111
+
+caught exception
+Error: (E5) out of bounds: right rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+1110111111111111111111111111111111111111111111111111111111111111111111
+70
+1111111111111111111111111111111110111111111111111111111111111111111111
+70
+1101111111111111111111111111111111111111111111111111111111111111111111
+sc_lv_base::rrotate( int )
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+rrotate( const sc_lv_base&, int )
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+sc_proxy<X>::rrotate( int )
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+rrotate( const sc_proxy<X>&, int )
+70
+ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+
+caught exception
+Error: (E5) out of bounds: right rotate operation is only allowed with positive rotate values, rotate value = -1
+In file: <removed by verify.pl>
+70
+XXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+70
+XXZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+*** test_bitwise_reverse
+sc_bv_base::reverse()
+7
+1111000
+7
+0001111
+8
+11110000
+8
+00001111
+reverse( const sc_bv_base& )
+7
+1111000
+7
+0001111
+8
+11110000
+8
+00001111
+sc_lv_base::reverse()
+7
+01ZX01Z
+7
+Z10XZ10
+8
+01ZX01ZX
+8
+XZ10XZ10
+reverse( const sc_lv_base& )
+7
+01ZX01Z
+7
+Z10XZ10
+8
+01ZX01ZX
+8
+XZ10XZ10
+sc_proxy<X>::reverse()
+8
+01ZX01ZX
+8
+XZ10XZ10
+8
+01ZX01ZX
+reverse( const sc_proxy<X>& )
+8
+01ZX01ZX
+8
+XZ10XZ10
+8
+01ZX01ZX
+*** test_string_conversions
+sc_bv_base
+11111111
+0b011111111
+0bus11111111
+0bsm11111111
+0o377
+0ous377
+0osm377
+0x0ff
+0xusff
+0xsmff
+0d255
+0csd10000000-
+sc_lv_base
+11111111
+0b011111111
+0bus11111111
+0bsm11111111
+0o377
+0ous377
+0osm377
+0x0ff
+0xusff
+0xsmff
+0d255
+0csd10000000-
+sc_proxy<X>
+11111111
+0b011111111
+0bus11111111
+0bsm11111111
+0o377
+0ous377
+0osm377
+0x0ff
+0xusff
+0xsmff
+0d255
+0csd10000000-
diff --git a/src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/test01.cpp
new file mode 100644
index 000000000..12941d7ae
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/bit/sc_proxy/test01/test01.cpp
@@ -0,0 +1,1014 @@
+/*****************************************************************************
+
+ Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
+ more contributor license agreements. See the NOTICE file distributed
+ with this work for additional information regarding copyright ownership.
+ Accellera licenses this file to you under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test01.cpp --
+
+ Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+#include "systemc.h"
+
+#define WRITE(a) \
+ cout << a.length() << endl; \
+ cout << a << endl
+
+void
+test_ctors()
+{
+ cout << "*** test_ctors" << endl;
+ {
+ cout << "sc_bv_base()" << endl;
+
+ sc_bv_base a;
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base( int )" << endl;
+
+ sc_bv_base a( 3 );
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base( bool )" << endl;
+
+ sc_bv_base a( true );
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base( bool, int )" << endl;
+
+ sc_bv_base a( true, 3 );
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base( const char* )" << endl;
+
+ sc_bv_base a( "0101" );
+ WRITE( a );
+ sc_bv_base b( "1010" );
+ WRITE( b );
+ sc_bv_base c( "0b0101" );
+ WRITE( c );
+ sc_bv_base d( "0b1010" );
+ WRITE( d );
+ }
+ {
+ cout << "sc_bv_base( const char*, int )" << endl;
+
+ sc_bv_base a3( "0101", 3 );
+ WRITE( a3 );
+ sc_bv_base a4( "0101", 4 );
+ WRITE( a4 );
+ sc_bv_base a5( "0101", 5 );
+ WRITE( a5 );
+
+ sc_bv_base b3( "1010", 3 );
+ WRITE( b3 );
+ sc_bv_base b4( "1010", 4 );
+ WRITE( b4 );
+ sc_bv_base b5( "1010", 5 );
+ WRITE( b5 );
+
+ sc_bv_base c3( "0b0101", 3 );
+ WRITE( c3 );
+ sc_bv_base c4( "0b0101", 4 );
+ WRITE( c4 );
+ sc_bv_base c5( "0b0101", 5 );
+ WRITE( c5 );
+
+ sc_bv_base d3( "0b1010", 3 );
+ WRITE( d3 );
+ sc_bv_base d4( "0b1010", 4 );
+ WRITE( d4 );
+ sc_bv_base d5( "0b1010", 5 );
+ WRITE( d5 );
+ }
+ {
+ cout << "sc_bv_base( const sc_proxy<X>& )" << endl;
+
+ sc_lv<4> x( "01ZX" );
+ sc_bv_base a( x );
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base( const sc_bv_base& )" << endl;
+
+ sc_bv<4> x( "0110" );
+ sc_bv_base a( x );
+ WRITE( a );
+ }
+}
+
+void
+test_bitwise_complement()
+{
+ cout << "*** test_bitwise_complement" << endl;
+ {
+ cout << "sc_bv_base::b_not()" << endl;
+
+ sc_bv_base a( "0110", 4 );
+ WRITE( a );
+ a.b_not();
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base::operator ~ () const" << endl;
+
+ sc_bv_base a( "0110", 4 );
+ WRITE( a );
+ sc_bv_base b( 4 );
+ b = ~a;
+ WRITE( b );
+ }
+ {
+ cout << "sc_lv_base::b_not()" << endl;
+
+ sc_lv_base a( "01ZX", 4 );
+ WRITE( a );
+ a.b_not();
+ WRITE( a );
+ }
+ {
+ cout << "sc_lv_base::operator ~ () const" << endl;
+
+ sc_lv_base a( "01ZX", 4 );
+ WRITE( a );
+ sc_lv_base b( 4 );
+ b = ~a;
+ WRITE( b );
+ }
+ {
+ cout << "sc_proxy<X>::b_not()" << endl;
+
+ sc_lv_base a( "01ZX", 4 );
+ WRITE( a );
+ (a( 3, 2 ), a( 1, 0 )).b_not();
+ WRITE( a );
+ }
+ {
+ cout << "sc_proxy<X>::operator ~ () const" << endl;
+
+ sc_lv_base a( "01ZX", 4 );
+ WRITE( a );
+ sc_lv_base b( 4 );
+ b = ~(a( 3, 2 ), a( 1, 0 ));
+ WRITE( b );
+ }
+}
+
+void
+test_bitwise_and()
+{
+ cout << "*** test_bitwise_and" << endl;
+}
+
+void
+test_bitwise_or()
+{
+ cout << "*** test_bitwise_or" << endl;
+}
+
+void
+test_bitwise_xor()
+{
+ cout << "*** test_bitwise_xor" << endl;
+}
+
+void
+test_bitwise_left_shift()
+{
+ cout << "*** test_bitwise_left_shift" << endl;
+ {
+ cout << "sc_bv_base::operator <<= ( int )" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[0] = 0;
+ WRITE( a );
+ try {
+ a <<= -1;
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a <<= 3;
+ WRITE( a );
+ a <<= 33;
+ WRITE( a );
+ a <<= 72;
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base::operator << ( int ) const" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[0] = 0;
+ WRITE( a );
+ sc_bv_base b( 70 );
+ try {
+ b = a << -1;
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = a << 3;
+ WRITE( b );
+ b = a << 33;
+ WRITE( b );
+ b = a << 72;
+ WRITE( b );
+ }
+ {
+ cout << "sc_lv_base::operator <<= ( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ a <<= -1;
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a <<= 3;
+ WRITE( a );
+ a <<= 33;
+ WRITE( a );
+ a <<= 72;
+ WRITE( a );
+ }
+ {
+ cout << "sc_lv_base::operator << ( int ) const" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = a << -1;
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = a << 3;
+ WRITE( b );
+ b = a << 33;
+ WRITE( b );
+ b = a << 72;
+ WRITE( b );
+ }
+ {
+ cout << "sc_proxy<X>::operator <<= ( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ (a( 69, 20 ), a( 19, 0 )) <<= -1;
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ // FIX ME: BUG, the following two operations result in 0XX..
+ (a( 69, 20 ), a( 19, 0 )) <<= 3;
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )) <<= 33;
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )) <<= 72;
+ WRITE( a );
+ }
+ {
+ cout << "sc_proxy<X>::operator << ( int ) const" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = (a( 69, 20 ), a( 19, 0 )) << -1;
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = (a( 69, 20 ), a( 19, 0 )) << 3;
+ WRITE( b );
+ b = (a( 69, 20 ), a( 19, 0 )) << 33;
+ WRITE( b );
+ b = (a( 69, 20 ), a( 19, 0 )) << 72;
+ WRITE( b );
+ }
+}
+
+void
+test_bitwise_right_shift()
+{
+ cout << "*** test_bitwise_right_shift" << endl;
+ {
+ cout << "sc_bv_base::operator >>= ( int )" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[69] = 0;
+ WRITE( a );
+ try {
+ a >>= -1;
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a >>= 3;
+ WRITE( a );
+ a >>= 33;
+ WRITE( a );
+ a >>= 72;
+ WRITE( a );
+ }
+ {
+ cout << "sc_bv_base::operator >> ( int ) const" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[69] = 0;
+ WRITE( a );
+ sc_bv_base b( 70 );
+ try {
+ b = a >> -1;
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = a >> 3;
+ WRITE( b );
+ b = a >> 33;
+ WRITE( b );
+ b = a >> 72;
+ WRITE( b );
+ }
+ {
+ cout << "sc_lv_base::operator >>= ( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ a >>= -1;
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a >>= 3;
+ WRITE( a );
+ a >>= 33;
+ WRITE( a );
+ a >>= 72;
+ WRITE( a );
+ }
+ {
+ cout << "sc_lv_base::operator >> ( int ) const" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = a >> -1;
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = a >> 3;
+ WRITE( b );
+ b = a >> 33;
+ WRITE( b );
+ b = a >> 72;
+ WRITE( b );
+ }
+ {
+ cout << "sc_proxy<X>::operator >>= ( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ (a( 69, 20 ), a( 19, 0 )) >>= -1;
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ (a( 69, 20 ), a( 19, 0 )) >>= 3;
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )) >>= 33;
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )) >>= 72;
+ WRITE( a );
+ }
+ {
+ cout << "sc_proxy<X>::operator >> ( int ) const" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = (a( 69, 20 ), a( 19, 0 )) >> -1;
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = (a( 69, 20 ), a( 19, 0 )) >> 3;
+ WRITE( b );
+ b = (a( 69, 20 ), a( 19, 0 )) >> 33;
+ WRITE( b );
+ b = (a( 69, 20 ), a( 19, 0 )) >> 72;
+ WRITE( b );
+ }
+}
+
+void
+test_bitwise_left_rotate()
+{
+ cout << "*** test_bitwise_left_rotate" << endl;
+ {
+ cout << "sc_bv_base::lrotate( int )" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[0] = 0;
+ WRITE( a );
+ try {
+ a.lrotate( -1 );
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a.lrotate( 3 );
+ WRITE( a );
+ a.lrotate( 33 );
+ WRITE( a );
+ a.lrotate( 72 );
+ WRITE( a );
+ }
+ {
+ cout << "lrotate( const sc_bv_base&, int )" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[0] = 0;
+ WRITE( a );
+ sc_bv_base b( 70 );
+ try {
+ b = lrotate( a, -1 );
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = lrotate( a, 3 );
+ WRITE( b );
+ b = lrotate( a, 33 );
+ WRITE( b );
+ b = lrotate( a, 72 );
+ WRITE( b );
+ }
+ {
+ cout << "sc_lv_base::lrotate( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ a.lrotate( -1 );
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a.lrotate( 3 );
+ WRITE( a );
+ a.lrotate( 33 );
+ WRITE( a );
+ a.lrotate( 72 );
+ WRITE( a );
+ }
+ {
+ cout << "lrotate( const sc_lv_base&, int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = lrotate( a, -1 );
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = lrotate( a, 3 );
+ WRITE( b );
+ b = lrotate( a, 33 );
+ WRITE( b );
+ b = lrotate( a, 72 );
+ WRITE( b );
+ }
+ {
+ cout << "sc_proxy<X>::lrotate( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ (a( 69, 20 ), a( 19, 0 )).lrotate( -1 );
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ (a( 69, 20 ), a( 19, 0 )).lrotate( 3 );
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )).lrotate( 33 );
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )).lrotate( 72 );
+ WRITE( a );
+ }
+ {
+ cout << "lrotate( const sc_proxy<X>&, int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[0] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = lrotate( (a( 69, 20 ), a( 19, 0 )), -1 );
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = lrotate( (a( 69, 20 ), a( 19, 0 )), 3 );
+ WRITE( b );
+ b = lrotate( (a( 69, 20 ), a( 19, 0 )), 33 );
+ WRITE( b );
+ b = lrotate( (a( 69, 20 ), a( 19, 0 )), 72 );
+ WRITE( b );
+ }
+}
+
+void
+test_bitwise_right_rotate()
+{
+ cout << "*** test_bitwise_right_rotate" << endl;
+ {
+ cout << "sc_bv_base::rrotate( int )" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[69] = 0;
+ WRITE( a );
+ try {
+ a.rrotate( -1 );
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a.rrotate( 3 );
+ WRITE( a );
+ a.rrotate( 33 );
+ WRITE( a );
+ a.rrotate( 72 );
+ WRITE( a );
+ }
+ {
+ cout << "rrotate( const sc_bv_base&, int )" << endl;
+
+ sc_bv_base a( 1, 70 );
+ a[69] = 0;
+ WRITE( a );
+ sc_bv_base b( 70 );
+ try {
+ b = rrotate( a, -1 );
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = rrotate( a, 3 );
+ WRITE( b );
+ b = rrotate( a, 33 );
+ WRITE( b );
+ b = rrotate( a, 72 );
+ WRITE( b );
+ }
+ {
+ cout << "sc_lv_base::rrotate( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ a.rrotate( -1 );
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ a.rrotate( 3 );
+ WRITE( a );
+ a.rrotate( 33 );
+ WRITE( a );
+ a.rrotate( 72 );
+ WRITE( a );
+ }
+ {
+ cout << "rrotate( const sc_lv_base&, int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = rrotate( a, -1 );
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = rrotate( a, 3 );
+ WRITE( b );
+ b = rrotate( a, 33 );
+ WRITE( b );
+ b = rrotate( a, 72 );
+ WRITE( b );
+ }
+ {
+ cout << "sc_proxy<X>::rrotate( int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ try {
+ (a( 69, 20 ), a( 19, 0 )).rrotate( -1 );
+ WRITE( a );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ // FIX ME: BUG, the following three operations result in 0XX..
+ (a( 69, 20 ), a( 19, 0 )).rrotate( 3 );
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )).rrotate( 33 );
+ WRITE( a );
+ (a( 69, 20 ), a( 19, 0 )).rrotate( 72 );
+ WRITE( a );
+ }
+ {
+ cout << "rrotate( const sc_proxy<X>&, int )" << endl;
+
+ sc_lv_base a( SC_LOGIC_X, 70 );
+ a[69] = SC_LOGIC_Z;
+ WRITE( a );
+ sc_lv_base b( 70 );
+ try {
+ b = rrotate( (a( 69, 20 ), a( 19, 0 )), -1 );
+ WRITE( b );
+ }
+ catch( sc_report x ) {
+ cout << "\ncaught exception" << endl;
+ cout << x.what() << endl;
+ }
+ b = rrotate( (a( 69, 20 ), a( 19, 0 )), 3 );
+ WRITE( b );
+ b = rrotate( (a( 69, 20 ), a( 19, 0 )), 33 );
+ WRITE( b );
+ b = rrotate( (a( 69, 20 ), a( 19, 0 )), 72 );
+ WRITE( b );
+ }
+}
+
+void
+test_bitwise_reverse()
+{
+ cout << "*** test_bitwise_reverse" << endl;
+ {
+ cout << "sc_bv_base::reverse()" << endl;
+
+ sc_bv_base a( "1111000", 7 );
+ WRITE( a );
+ a.reverse();
+ WRITE( a );
+ sc_bv_base b( "11110000", 8 );
+ WRITE( b );
+ b.reverse();
+ WRITE( b );
+ }
+ {
+ cout << "reverse( const sc_bv_base& )" << endl;
+
+ sc_bv_base a( "1111000", 7 );
+ WRITE( a );
+ sc_bv_base b( 7 );
+ b = reverse( a );
+ WRITE( b );
+ sc_bv_base c( "11110000", 8 );
+ WRITE( c );
+ sc_bv_base d( 8 );
+ d = reverse( c );
+ WRITE( d );
+ }
+ {
+ cout << "sc_lv_base::reverse()" << endl;
+
+ sc_lv_base a( "01ZX01Z", 7 );
+ WRITE( a );
+ a.reverse();
+ WRITE( a );
+ sc_lv_base b( "01ZX01ZX", 8 );
+ WRITE( b );
+ b.reverse();
+ WRITE( b );
+ }
+ {
+ cout << "reverse( const sc_lv_base& )" << endl;
+
+ sc_lv_base a( "01ZX01Z", 7 );
+ WRITE( a );
+ sc_lv_base b( 7 );
+ b = reverse( a );
+ WRITE( b );
+ sc_lv_base c( "01ZX01ZX", 8 );
+ WRITE( c );
+ sc_lv_base d( 8 );
+ d = reverse( c );
+ WRITE( d );
+ }
+ {
+ cout << "sc_proxy<X>::reverse()" << endl;
+
+ sc_lv_base a( "01ZX01ZX", 8 );
+ WRITE( a );
+ (a( 7, 4 ), a( 3, 0 )).reverse();
+ WRITE( a );
+ (a( 0, 3 ), a( 4, 7 )).reverse();
+ WRITE( a );
+ }
+ {
+ cout << "reverse( const sc_proxy<X>& )" << endl;
+
+ sc_lv_base a( "01ZX01ZX", 8 );
+ WRITE( a );
+ sc_lv_base b( 8 );
+ b = reverse( (a( 7, 4 ), a( 3, 0 )) );
+ WRITE( b );
+ b = reverse( (a( 0, 3 ), a( 4, 7 )) );
+ WRITE( b );
+ }
+}
+
+void
+test_string_conversions()
+{
+ cout << "*** test_string_conversions" << endl;
+ {
+ cout << "sc_bv_base" << endl;
+
+ sc_bv_base a( 1, 8 );
+ sc_bv_base b( 8 );
+ std::string s;
+ s = a.to_string();
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_BIN );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_BIN_US );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_BIN_SM );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_OCT );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_OCT_US );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_OCT_SM );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_HEX );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_HEX_US );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_HEX_SM );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_DEC );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_CSD );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ }
+ {
+ cout << "sc_lv_base" << endl;
+
+ sc_lv_base a( SC_LOGIC_1, 8 );
+ sc_lv_base b( 8 );
+ std::string s;
+ s = a.to_string();
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_BIN );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_BIN_US );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_BIN_SM );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_OCT );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_OCT_US );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_OCT_SM );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_HEX );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_HEX_US );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_HEX_SM );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_DEC );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ s = a.to_string( SC_CSD );
+ cout << s << endl;
+ b = s.c_str();
+ sc_assert( b == a );
+ }
+ {
+ cout << "sc_proxy<X>" << endl;
+
+ sc_lv_base a( SC_LOGIC_1, 8 );
+ sc_lv_base b( 8 );
+ std::string s;
+ s = (a( 7, 4 ), a( 3, 0 )).to_string();
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_BIN );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_BIN_US );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_BIN_SM );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_OCT );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_OCT_US );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_OCT_SM );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_HEX );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_HEX_US );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_HEX_SM );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_DEC );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ s = (a( 7, 4 ), a( 3, 0 )).to_string( SC_CSD );
+ cout << s << endl;
+ (b( 7, 4 ), b( 3, 0 )) = s.c_str();
+ sc_assert( b == a );
+ }
+}
+
+int
+sc_main( int, char*[] )
+{
+ test_ctors();
+ test_bitwise_complement();
+ test_bitwise_and();
+ test_bitwise_or();
+ test_bitwise_xor();
+ test_bitwise_left_shift();
+ test_bitwise_right_shift();
+ test_bitwise_left_rotate();
+ test_bitwise_right_rotate();
+ test_bitwise_reverse();
+ test_string_conversions();
+
+ return 0;
+}