summaryrefslogtreecommitdiff
path: root/src/systemc/tests/systemc/datatypes/int
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/int
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/int')
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith01/arith01.cpp141
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log4002
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log.hpux114001
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith02/arith02.cpp157
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith02/golden/arith02.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith02/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith03/arith03.cpp127
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith03/golden/arith03.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith03/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith04/arith04.cpp182
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith04/golden/arith04.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith04/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith05/arith05.cpp182
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith05/golden/arith05.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith05/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith06/arith06.cpp147
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith06/golden/arith06.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith06/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith07/arith07.cpp137
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith07/golden/arith07.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith07/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith08/arith08.cpp123
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith08/golden/arith08.log730
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith08/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith09/arith09.cpp122
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith09/golden/arith09.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith09/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith10/arith10.cpp119
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith10/golden/arith10.log842
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith10/isaac.h272
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith11/arith11.cpp57
-rw-r--r--src/systemc/tests/systemc/datatypes/int/arith/arith11/golden/arith11.log8
-rw-r--r--src/systemc/tests/systemc/datatypes/int/check/test01/golden/test01.log19
-rw-r--r--src/systemc/tests/systemc/datatypes/int/check/test01/test01.cpp207
-rw-r--r--src/systemc/tests/systemc/datatypes/int/compare/compare.cpp77
-rw-r--r--src/systemc/tests/systemc/datatypes/int/compare/golden/compare.log1
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test01/golden/test01.log63
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test01/test01.cpp201
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test02/golden/test02.log63
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test02/test02.cpp201
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test03/golden/test03.log40
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test03/test03.cpp190
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test04/golden/test04.log63
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test04/test04.cpp201
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test05/golden/test05.log63
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test05/test05.cpp201
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test06/golden/test06.log40
-rw-r--r--src/systemc/tests/systemc/datatypes/int/concat/test06/test06.cpp190
-rw-r--r--src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/golden/test01.log61
-rw-r--r--src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/test01.cpp224
-rw-r--r--src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/golden/test02.log61
-rw-r--r--src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/test02.cpp224
-rw-r--r--src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/golden/test03.log205
-rw-r--r--src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/test03.cpp224
-rw-r--r--src/systemc/tests/systemc/datatypes/int/misc/test01/golden/test01.log45
-rw-r--r--src/systemc/tests/systemc/datatypes/int/misc/test01/test01.cpp140
-rw-r--r--src/systemc/tests/systemc/datatypes/int/misc/test02/golden/test02.log2
-rw-r--r--src/systemc/tests/systemc/datatypes/int/misc/test02/test02.cpp128
-rw-r--r--src/systemc/tests/systemc/datatypes/int/misc/test03/golden/test03.log21
-rw-r--r--src/systemc/tests/systemc/datatypes/int/misc/test03/test03.cpp34
-rw-r--r--src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/golden/test01.log325
-rw-r--r--src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/test01.cpp177
-rw-r--r--src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/golden/test02.log325
-rw-r--r--src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/test02.cpp177
-rw-r--r--src/systemc/tests/systemc/datatypes/int/reduce/test01/golden/test01.log78
-rw-r--r--src/systemc/tests/systemc/datatypes/int/reduce/test01/test01.cpp138
-rw-r--r--src/systemc/tests/systemc/datatypes/int/reduce/test02/golden/test02.log78
-rw-r--r--src/systemc/tests/systemc/datatypes/int/reduce/test02/test02.cpp138
-rw-r--r--src/systemc/tests/systemc/datatypes/int/reduce/test03/golden/test03.log78
-rw-r--r--src/systemc/tests/systemc/datatypes/int/reduce/test03/test03.cpp138
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/golden/select.log49
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/select.cpp65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/golden/select.log65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/select.cpp65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/concat.cpp56
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/golden/concat.log32
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/concat.cpp56
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/golden/concat.log64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/concat.cpp55
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/golden/concat.log32
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/concat.cpp56
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/golden/concat.log64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/mixed/golden/test_int.log38
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/mixed/test_int.cpp235
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/golden/select.log65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/golden/select.log65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/golden/select.log49
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/select.cpp65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/golden/select.log65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/select.cpp65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/concat.cpp56
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/golden/concat.log32
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/concat.cpp56
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/golden/concat.log64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/concat.cpp57
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/golden/concat.log32
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/concat.cpp56
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/golden/concat.log64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/golden/test_int.log38
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/test_int.cpp237
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/golden/select.log33
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/golden/select.log65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/golden/select.log65
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/select.cpp64
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/golden/test01.log4
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/test01.cpp11
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/golden/test01.log5
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/test01.cpp13
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/golden/test02.log3
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/test02.cpp13
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/golden/test03.log7
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/test03.cpp71
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/golden/test04.log5
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/test04.cpp60
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/bsps1.cpp75
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/golden/bsps1.log5
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_small/test_small/golden/test_small.log18
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_small/test_small/test_small.cpp120
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/golden/test01.log4
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/test01.cpp11
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/golden/minus.log5
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/minus.cpp55
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/golden/test01.log5
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/test01.cpp13
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/golden/test02.log3
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/test02.cpp13
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/golden/test03.log5
-rw-r--r--src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/test03.cpp60
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test01/golden/test01.log32
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test01/test01.cpp200
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test02/golden/test02.log32
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test02/test02.cpp200
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test03/golden/test03.log1550
-rw-r--r--src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp43
152 files changed, 30061 insertions, 0 deletions
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith01/arith01.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith01/arith01.cpp
new file mode 100644
index 000000000..36b768e2b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith01/arith01.cpp
@@ -0,0 +1,141 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith01.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 <stdio.h>
+#include <stdlib.h>
+#include "systemc.h"
+
+/*
+
+ int9 x;
+
+ x.q = -256;
+
+ x.q is equal to 256 in Sun's CC, and -256 in gcc. The standard leaves
+ this issue as implementation dependent unless the definition is
+ qualified explicitly by signed or unsigned.
+
+ In order to force consistent behavior, I've qualified every int
+ definition accordingly in all the arith files.
+
+*/
+
+typedef struct int9 {
+ signed int q : 9;
+} int9;
+
+typedef struct int31 {
+ signed int q : 31;
+} int31;
+
+void
+crunch(sc_signed& z, int31 v31, int u, int v)
+{
+ for (int i = 0; i < 100000; ++i) {
+ z *= u;
+ z += v;
+ v31.q *= u;
+ v31.q += v;
+ sc_assert(z == v31.q);
+ }
+}
+
+// Function to fix result in int9 struct to correctly under-/overflow
+// within its 9 bits range and still ensure the correct sign encoding
+// over the full size of the integer variable. Otherwise, compiler
+// optimization may lead to spurious assertion errors.
+void
+fix_int9(int9& v) {
+ v.q %= 0x200;
+}
+
+int
+sc_main( int argc, char* argv[] )
+{
+ sc_signed x(31);
+ sc_signed y(9);
+ sc_signed z(31);
+ int9 v;
+
+ y = -256;
+ v.q = -256;
+ sc_assert(y == v.q);
+ cout << y << '\t' << v.q << endl;
+ for (int i = 0; i < 1000; ++i) {
+ y++;
+ v.q++;
+ fix_int9(v);
+ cout << y << '\t' << v.q << endl;
+ sc_assert(y == v.q);
+ }
+ for (int i = 0; i < 1000; ++i) {
+ y--;
+ v.q--;
+ fix_int9(v);
+ cout << y << '\t' << v.q << endl;
+ sc_assert(y == v.q);
+ }
+ for (int i = 0; i < 1000; ++i) {
+ ++y;
+ ++v.q;
+ fix_int9(v);
+ cout << y << '\t' << v.q << endl;
+ sc_assert(y == v.q);
+ }
+ for (int i = 0; i < 1000; ++i) {
+ --y;
+ --v.q;
+ fix_int9(v);
+ cout << y << '\t' << v.q << endl;
+ sc_assert(y == v.q);
+ }
+
+ z = 129023;
+ int31 v31;
+ v31.q = 129023;
+ crunch(z, v31, 491, 12089);
+
+ x = -129023;
+ v31.q = -129023;
+ crunch(x, v31, 109, -426);
+
+ x = -1;
+ v31.q = -1;
+ crunch(x, v31, 30941, -1188);
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log b/src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log
new file mode 100644
index 000000000..23813137d
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log
@@ -0,0 +1,4002 @@
+SystemC Simulation
+-256 -256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+233 233
+234 234
+235 235
+236 236
+237 237
+238 238
+239 239
+240 240
+241 241
+242 242
+243 243
+244 244
+245 245
+246 246
+247 247
+248 248
+249 249
+250 250
+251 251
+252 252
+253 253
+254 254
+255 255
+-256 -256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
+255 255
+254 254
+253 253
+252 252
+251 251
+250 250
+249 249
+248 248
+247 247
+246 246
+245 245
+244 244
+243 243
+242 242
+241 241
+240 240
+239 239
+238 238
+237 237
+236 236
+235 235
+234 234
+233 233
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+233 233
+234 234
+235 235
+236 236
+237 237
+238 238
+239 239
+240 240
+241 241
+242 242
+243 243
+244 244
+245 245
+246 246
+247 247
+248 248
+249 249
+250 250
+251 251
+252 252
+253 253
+254 254
+255 255
+-256 -256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
+255 255
+254 254
+253 253
+252 252
+251 251
+250 250
+249 249
+248 248
+247 247
+246 246
+245 245
+244 244
+243 243
+242 242
+241 241
+240 240
+239 239
+238 238
+237 237
+236 236
+235 235
+234 234
+233 233
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log.hpux11 b/src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log.hpux11
new file mode 100644
index 000000000..89bf387a1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith01/golden/arith01.log.hpux11
@@ -0,0 +1,4001 @@
+SystemC Simulation
+-256 -256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+233 233
+234 234
+235 235
+236 236
+237 237
+238 238
+239 239
+240 240
+241 241
+242 242
+243 243
+244 244
+245 245
+246 246
+247 247
+248 248
+249 249
+250 250
+251 251
+252 252
+253 253
+254 254
+255 255
+-256 -256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
+255 255
+254 254
+253 253
+252 252
+251 251
+250 250
+249 249
+248 248
+247 247
+246 246
+245 245
+244 244
+243 243
+242 242
+241 241
+240 240
+239 239
+238 238
+237 237
+236 236
+235 235
+234 234
+233 233
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+233 233
+234 234
+235 235
+236 236
+237 237
+238 238
+239 239
+240 240
+241 241
+242 242
+243 243
+244 244
+245 245
+246 246
+247 247
+248 248
+249 249
+250 250
+251 251
+252 252
+253 253
+254 254
+255 255
+-256 256
+-255 -255
+-254 -254
+-253 -253
+-252 -252
+-251 -251
+-250 -250
+-249 -249
+-248 -248
+-247 -247
+-246 -246
+-245 -245
+-244 -244
+-243 -243
+-242 -242
+-241 -241
+-240 -240
+-239 -239
+-238 -238
+-237 -237
+-236 -236
+-235 -235
+-234 -234
+-233 -233
+-232 -232
+-231 -231
+-230 -230
+-229 -229
+-228 -228
+-227 -227
+-226 -226
+-225 -225
+-224 -224
+-223 -223
+-222 -222
+-221 -221
+-220 -220
+-219 -219
+-218 -218
+-217 -217
+-216 -216
+-215 -215
+-214 -214
+-213 -213
+-212 -212
+-211 -211
+-210 -210
+-209 -209
+-208 -208
+-207 -207
+-206 -206
+-205 -205
+-204 -204
+-203 -203
+-202 -202
+-201 -201
+-200 -200
+-199 -199
+-198 -198
+-197 -197
+-196 -196
+-195 -195
+-194 -194
+-193 -193
+-192 -192
+-191 -191
+-190 -190
+-189 -189
+-188 -188
+-187 -187
+-186 -186
+-185 -185
+-184 -184
+-183 -183
+-182 -182
+-181 -181
+-180 -180
+-179 -179
+-178 -178
+-177 -177
+-176 -176
+-175 -175
+-174 -174
+-173 -173
+-172 -172
+-171 -171
+-170 -170
+-169 -169
+-168 -168
+-167 -167
+-166 -166
+-165 -165
+-164 -164
+-163 -163
+-162 -162
+-161 -161
+-160 -160
+-159 -159
+-158 -158
+-157 -157
+-156 -156
+-155 -155
+-154 -154
+-153 -153
+-152 -152
+-151 -151
+-150 -150
+-149 -149
+-148 -148
+-147 -147
+-146 -146
+-145 -145
+-144 -144
+-143 -143
+-142 -142
+-141 -141
+-140 -140
+-139 -139
+-138 -138
+-137 -137
+-136 -136
+-135 -135
+-134 -134
+-133 -133
+-132 -132
+-131 -131
+-130 -130
+-129 -129
+-128 -128
+-127 -127
+-126 -126
+-125 -125
+-124 -124
+-123 -123
+-122 -122
+-121 -121
+-120 -120
+-119 -119
+-118 -118
+-117 -117
+-116 -116
+-115 -115
+-114 -114
+-113 -113
+-112 -112
+-111 -111
+-110 -110
+-109 -109
+-108 -108
+-107 -107
+-106 -106
+-105 -105
+-104 -104
+-103 -103
+-102 -102
+-101 -101
+-100 -100
+-99 -99
+-98 -98
+-97 -97
+-96 -96
+-95 -95
+-94 -94
+-93 -93
+-92 -92
+-91 -91
+-90 -90
+-89 -89
+-88 -88
+-87 -87
+-86 -86
+-85 -85
+-84 -84
+-83 -83
+-82 -82
+-81 -81
+-80 -80
+-79 -79
+-78 -78
+-77 -77
+-76 -76
+-75 -75
+-74 -74
+-73 -73
+-72 -72
+-71 -71
+-70 -70
+-69 -69
+-68 -68
+-67 -67
+-66 -66
+-65 -65
+-64 -64
+-63 -63
+-62 -62
+-61 -61
+-60 -60
+-59 -59
+-58 -58
+-57 -57
+-56 -56
+-55 -55
+-54 -54
+-53 -53
+-52 -52
+-51 -51
+-50 -50
+-49 -49
+-48 -48
+-47 -47
+-46 -46
+-45 -45
+-44 -44
+-43 -43
+-42 -42
+-41 -41
+-40 -40
+-39 -39
+-38 -38
+-37 -37
+-36 -36
+-35 -35
+-34 -34
+-33 -33
+-32 -32
+-31 -31
+-30 -30
+-29 -29
+-28 -28
+-27 -27
+-26 -26
+-25 -25
+-24 -24
+-23 -23
+-22 -22
+-21 -21
+-20 -20
+-19 -19
+-18 -18
+-17 -17
+-16 -16
+-15 -15
+-14 -14
+-13 -13
+-12 -12
+-11 -11
+-10 -10
+-9 -9
+-8 -8
+-7 -7
+-6 -6
+-5 -5
+-4 -4
+-3 -3
+-2 -2
+-1 -1
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
+25 25
+26 26
+27 27
+28 28
+29 29
+30 30
+31 31
+32 32
+33 33
+34 34
+35 35
+36 36
+37 37
+38 38
+39 39
+40 40
+41 41
+42 42
+43 43
+44 44
+45 45
+46 46
+47 47
+48 48
+49 49
+50 50
+51 51
+52 52
+53 53
+54 54
+55 55
+56 56
+57 57
+58 58
+59 59
+60 60
+61 61
+62 62
+63 63
+64 64
+65 65
+66 66
+67 67
+68 68
+69 69
+70 70
+71 71
+72 72
+73 73
+74 74
+75 75
+76 76
+77 77
+78 78
+79 79
+80 80
+81 81
+82 82
+83 83
+84 84
+85 85
+86 86
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+100 100
+101 101
+102 102
+103 103
+104 104
+105 105
+106 106
+107 107
+108 108
+109 109
+110 110
+111 111
+112 112
+113 113
+114 114
+115 115
+116 116
+117 117
+118 118
+119 119
+120 120
+121 121
+122 122
+123 123
+124 124
+125 125
+126 126
+127 127
+128 128
+129 129
+130 130
+131 131
+132 132
+133 133
+134 134
+135 135
+136 136
+137 137
+138 138
+139 139
+140 140
+141 141
+142 142
+143 143
+144 144
+145 145
+146 146
+147 147
+148 148
+149 149
+150 150
+151 151
+152 152
+153 153
+154 154
+155 155
+156 156
+157 157
+158 158
+159 159
+160 160
+161 161
+162 162
+163 163
+164 164
+165 165
+166 166
+167 167
+168 168
+169 169
+170 170
+171 171
+172 172
+173 173
+174 174
+175 175
+176 176
+177 177
+178 178
+179 179
+180 180
+181 181
+182 182
+183 183
+184 184
+185 185
+186 186
+187 187
+188 188
+189 189
+190 190
+191 191
+192 192
+193 193
+194 194
+195 195
+196 196
+197 197
+198 198
+199 199
+200 200
+201 201
+202 202
+203 203
+204 204
+205 205
+206 206
+207 207
+208 208
+209 209
+210 210
+211 211
+212 212
+213 213
+214 214
+215 215
+216 216
+217 217
+218 218
+219 219
+220 220
+221 221
+222 222
+223 223
+224 224
+225 225
+226 226
+227 227
+228 228
+229 229
+230 230
+231 231
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
+255 -257
+254 254
+253 253
+252 252
+251 251
+250 250
+249 249
+248 248
+247 247
+246 246
+245 245
+244 244
+243 243
+242 242
+241 241
+240 240
+239 239
+238 238
+237 237
+236 236
+235 235
+234 234
+233 233
+232 232
+231 231
+230 230
+229 229
+228 228
+227 227
+226 226
+225 225
+224 224
+223 223
+222 222
+221 221
+220 220
+219 219
+218 218
+217 217
+216 216
+215 215
+214 214
+213 213
+212 212
+211 211
+210 210
+209 209
+208 208
+207 207
+206 206
+205 205
+204 204
+203 203
+202 202
+201 201
+200 200
+199 199
+198 198
+197 197
+196 196
+195 195
+194 194
+193 193
+192 192
+191 191
+190 190
+189 189
+188 188
+187 187
+186 186
+185 185
+184 184
+183 183
+182 182
+181 181
+180 180
+179 179
+178 178
+177 177
+176 176
+175 175
+174 174
+173 173
+172 172
+171 171
+170 170
+169 169
+168 168
+167 167
+166 166
+165 165
+164 164
+163 163
+162 162
+161 161
+160 160
+159 159
+158 158
+157 157
+156 156
+155 155
+154 154
+153 153
+152 152
+151 151
+150 150
+149 149
+148 148
+147 147
+146 146
+145 145
+144 144
+143 143
+142 142
+141 141
+140 140
+139 139
+138 138
+137 137
+136 136
+135 135
+134 134
+133 133
+132 132
+131 131
+130 130
+129 129
+128 128
+127 127
+126 126
+125 125
+124 124
+123 123
+122 122
+121 121
+120 120
+119 119
+118 118
+117 117
+116 116
+115 115
+114 114
+113 113
+112 112
+111 111
+110 110
+109 109
+108 108
+107 107
+106 106
+105 105
+104 104
+103 103
+102 102
+101 101
+100 100
+99 99
+98 98
+97 97
+96 96
+95 95
+94 94
+93 93
+92 92
+91 91
+90 90
+89 89
+88 88
+87 87
+86 86
+85 85
+84 84
+83 83
+82 82
+81 81
+80 80
+79 79
+78 78
+77 77
+76 76
+75 75
+74 74
+73 73
+72 72
+71 71
+70 70
+69 69
+68 68
+67 67
+66 66
+65 65
+64 64
+63 63
+62 62
+61 61
+60 60
+59 59
+58 58
+57 57
+56 56
+55 55
+54 54
+53 53
+52 52
+51 51
+50 50
+49 49
+48 48
+47 47
+46 46
+45 45
+44 44
+43 43
+42 42
+41 41
+40 40
+39 39
+38 38
+37 37
+36 36
+35 35
+34 34
+33 33
+32 32
+31 31
+30 30
+29 29
+28 28
+27 27
+26 26
+25 25
+24 24
+23 23
+22 22
+21 21
+20 20
+19 19
+18 18
+17 17
+16 16
+15 15
+14 14
+13 13
+12 12
+11 11
+10 10
+9 9
+8 8
+7 7
+6 6
+5 5
+4 4
+3 3
+2 2
+1 1
+0 0
+-1 -1
+-2 -2
+-3 -3
+-4 -4
+-5 -5
+-6 -6
+-7 -7
+-8 -8
+-9 -9
+-10 -10
+-11 -11
+-12 -12
+-13 -13
+-14 -14
+-15 -15
+-16 -16
+-17 -17
+-18 -18
+-19 -19
+-20 -20
+-21 -21
+-22 -22
+-23 -23
+-24 -24
+-25 -25
+-26 -26
+-27 -27
+-28 -28
+-29 -29
+-30 -30
+-31 -31
+-32 -32
+-33 -33
+-34 -34
+-35 -35
+-36 -36
+-37 -37
+-38 -38
+-39 -39
+-40 -40
+-41 -41
+-42 -42
+-43 -43
+-44 -44
+-45 -45
+-46 -46
+-47 -47
+-48 -48
+-49 -49
+-50 -50
+-51 -51
+-52 -52
+-53 -53
+-54 -54
+-55 -55
+-56 -56
+-57 -57
+-58 -58
+-59 -59
+-60 -60
+-61 -61
+-62 -62
+-63 -63
+-64 -64
+-65 -65
+-66 -66
+-67 -67
+-68 -68
+-69 -69
+-70 -70
+-71 -71
+-72 -72
+-73 -73
+-74 -74
+-75 -75
+-76 -76
+-77 -77
+-78 -78
+-79 -79
+-80 -80
+-81 -81
+-82 -82
+-83 -83
+-84 -84
+-85 -85
+-86 -86
+-87 -87
+-88 -88
+-89 -89
+-90 -90
+-91 -91
+-92 -92
+-93 -93
+-94 -94
+-95 -95
+-96 -96
+-97 -97
+-98 -98
+-99 -99
+-100 -100
+-101 -101
+-102 -102
+-103 -103
+-104 -104
+-105 -105
+-106 -106
+-107 -107
+-108 -108
+-109 -109
+-110 -110
+-111 -111
+-112 -112
+-113 -113
+-114 -114
+-115 -115
+-116 -116
+-117 -117
+-118 -118
+-119 -119
+-120 -120
+-121 -121
+-122 -122
+-123 -123
+-124 -124
+-125 -125
+-126 -126
+-127 -127
+-128 -128
+-129 -129
+-130 -130
+-131 -131
+-132 -132
+-133 -133
+-134 -134
+-135 -135
+-136 -136
+-137 -137
+-138 -138
+-139 -139
+-140 -140
+-141 -141
+-142 -142
+-143 -143
+-144 -144
+-145 -145
+-146 -146
+-147 -147
+-148 -148
+-149 -149
+-150 -150
+-151 -151
+-152 -152
+-153 -153
+-154 -154
+-155 -155
+-156 -156
+-157 -157
+-158 -158
+-159 -159
+-160 -160
+-161 -161
+-162 -162
+-163 -163
+-164 -164
+-165 -165
+-166 -166
+-167 -167
+-168 -168
+-169 -169
+-170 -170
+-171 -171
+-172 -172
+-173 -173
+-174 -174
+-175 -175
+-176 -176
+-177 -177
+-178 -178
+-179 -179
+-180 -180
+-181 -181
+-182 -182
+-183 -183
+-184 -184
+-185 -185
+-186 -186
+-187 -187
+-188 -188
+-189 -189
+-190 -190
+-191 -191
+-192 -192
+-193 -193
+-194 -194
+-195 -195
+-196 -196
+-197 -197
+-198 -198
+-199 -199
+-200 -200
+-201 -201
+-202 -202
+-203 -203
+-204 -204
+-205 -205
+-206 -206
+-207 -207
+-208 -208
+-209 -209
+-210 -210
+-211 -211
+-212 -212
+-213 -213
+-214 -214
+-215 -215
+-216 -216
+-217 -217
+-218 -218
+-219 -219
+-220 -220
+-221 -221
+-222 -222
+-223 -223
+-224 -224
+-225 -225
+-226 -226
+-227 -227
+-228 -228
+-229 -229
+-230 -230
+-231 -231
+-232 -232
+-233 -233
+-234 -234
+-235 -235
+-236 -236
+-237 -237
+-238 -238
+-239 -239
+-240 -240
+-241 -241
+-242 -242
+-243 -243
+-244 -244
+-245 -245
+-246 -246
+-247 -247
+-248 -248
+-249 -249
+-250 -250
+-251 -251
+-252 -252
+-253 -253
+-254 -254
+-255 -255
+-256 -256
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith02/arith02.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith02/arith02.cpp
new file mode 100644
index 000000000..90919bfbd
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith02/arith02.cpp
@@ -0,0 +1,157 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith02.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+void
+check_string( const sc_signed& z, int v )
+{
+ std::string buf(z.to_string( SC_BIN ) );
+ if (z < 0) {
+ sc_assert(buf[2] == '1');
+ } else {
+ sc_assert(buf[2] == '0');
+ }
+}
+
+int
+sc_main( int argc, char* argv[] )
+{
+ signed int vali[5] = { 0, 1, -1, 7, -8 };
+ signed int valj[5] = { 0, 1, -1, 7, -8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_signed x(i);
+ sc_signed y(j);
+ sc_signed z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ /*
+ // old code - takes too much time.
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ */
+ for (int ii = 0; ii < 10; ++ii) {
+ for (int jj = 0; jj < 10; ++jj) {
+ signed int qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ signed int qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ sc_assert( x == qi );
+ y = qj;
+ sc_assert( y == qj );
+ sc_assert((x == qj) == (qi == qj));
+ sc_assert((x == qj) == (qj == x));
+ sc_assert((x != qj) == (qi != qj));
+ sc_assert((x != qj) == (qj != x));
+ sc_assert((x < qj) == (qi < qj));
+ sc_assert((x < qj) == (qj > x));
+ sc_assert((x <= qj) == (qi <= qj));
+ sc_assert((x <= qj) == (qj >= x));
+ sc_assert((x > qj) == (qi > qj));
+ sc_assert((x > qj) == (qj < x));
+ sc_assert((x >= qj) == (qi >= qj));
+ sc_assert((x >= qj) == (qj <= x));
+ z = x + y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi + qj) );
+ check_string( z, qi + qj );
+ z = x - y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi - qj) );
+ check_string( z, qi - qj );
+ z = x * y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi * qj) );
+ check_string( z, qi * qj );
+ if (y != 0) {
+ z = x / y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi / qj) );
+ check_string( z, qi / qj );
+ z = x % y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi % qj) );
+ check_string( z, qi % qj );
+ }
+ z = x & y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi & qj) );
+ check_string( z, qi & qj );
+ z = x | y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi | qj) );
+ check_string( z, qi | qj );
+ z = x ^ y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi ^ qj) );
+ check_string( z, qi ^ qj );
+ if (jj < i - 1) {
+ z = x << jj;
+ for (int r = 0; r < i; ++r) {
+ sc_assert( (bool) z[r] == !!((qi << jj) & (1 << r)) );
+ }
+ z = x >> jj;
+ for (int r = 0; r < i; ++r) {
+ sc_assert( (bool) z[r] == !!((qi >> jj) & (1 << r)) );
+ }
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith02/golden/arith02.log b/src/systemc/tests/systemc/datatypes/int/arith/arith02/golden/arith02.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith02/golden/arith02.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith02/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith02/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith02/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith03/arith03.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith03/arith03.cpp
new file mode 100644
index 000000000..a9ee10f3f
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith03/arith03.cpp
@@ -0,0 +1,127 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith03.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+#define TEST(A,B) \
+{ \
+ if ( A != B ) \
+ cout << #A << " (" << hex << A << ") != " << #B << "(" << hex << B << ")" << endl; \
+}
+
+#define TESTA(A,B,C) \
+{ \
+ if ( A != (B-C) ) \
+ cout << #A << " (" << hex << A << ") != " << hex << B-C << " " << B << " " << C << endl; \
+}
+
+int
+sc_main( int argc, char* argv[] )
+{
+ unsigned vali[5] = { 0, 1, (unsigned) -1, 7, (unsigned)-8 };
+ unsigned valj[5] = { 0, 1, (unsigned) -1, 7, (unsigned)-8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_unsigned x(i);
+ sc_unsigned y(j);
+ sc_unsigned z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ unsigned qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ unsigned qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ TEST(x,qi);
+ y = qj;
+ TEST(y,qj);
+ z = x + y;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi + qj));
+ z = x - y;
+ // TEST((sc_unsigned)( z.range(31,0) ),(qi - qj));
+ TESTA((sc_unsigned)( z.range(31,0) ),qi,qj);
+ z = x * y;
+ TEST((sc_unsigned)( z.range(31,0) ),
+ (qi * qj) );
+ if (y != 0) {
+ z = x / y;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi/qj));
+ z = x % y;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi%qj));
+ }
+ z = x & y;
+ TEST( (sc_unsigned)( z.range(31,0) ), (qi & qj) );
+ z = x | y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi | qj) );
+ z = x ^ y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi ^ qj) );
+ if (jj < i - 1) {
+ z = x << jj;
+ for (int r = 0; r < i; ++r) {
+ TEST((bool) z[r],!!((qi << jj) & (1 << r)) );
+ }
+ z = x >> jj;
+ for (int r = 0; r < i; ++r) {
+ TEST((bool) z[r],!!((qi >> jj) & (1 << r)) );
+ }
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith03/golden/arith03.log b/src/systemc/tests/systemc/datatypes/int/arith/arith03/golden/arith03.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith03/golden/arith03.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith03/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith03/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith03/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith04/arith04.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith04/arith04.cpp
new file mode 100644
index 000000000..587f35f80
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith04/arith04.cpp
@@ -0,0 +1,182 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith04.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+void
+check_string( const sc_signed& z, int v )
+{
+ std::string buf( z.to_string( SC_BIN ) );
+ if (z < 0) {
+ sc_assert(buf[2] == '1');
+ } else {
+ sc_assert(buf[2] == '0');
+ }
+}
+
+int
+sc_main( int argc, char* argv[] )
+{
+ signed int vali[5] = { 0, 1, -1, 7, -8 };
+ signed int valj[5] = { 0, 1, -1, 7, -8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_signed x(i);
+ sc_signed y(j);
+ sc_signed z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ signed int qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ signed int qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+ signed int tqi;
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ tqi = qi;
+ sc_assert( x == qi );
+ y = qj;
+ sc_assert( y == qj );
+ sc_assert((x == qj) == (qi == qj));
+ sc_assert((x == qj) == (qj == x));
+ sc_assert((x != qj) == (qi != qj));
+ sc_assert((x != qj) == (qj != x));
+ sc_assert((x < qj) == (qi < qj));
+ sc_assert((x < qj) == (qj > x));
+ sc_assert((x <= qj) == (qi <= qj));
+ sc_assert((x <= qj) == (qj >= x));
+ sc_assert((x > qj) == (qi > qj));
+ sc_assert((x > qj) == (qj < x));
+ sc_assert((x >= qj) == (qi >= qj));
+ sc_assert((x >= qj) == (qj <= x));
+
+ x += y;
+ tqi += qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x -= y;
+ tqi -= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x *= y;
+ tqi *= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ if (y != 0) {
+ x = qi;
+ tqi = qi;
+ x /= y;
+ tqi /= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x %= y;
+ tqi %= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+ }
+
+ x = qi;
+ tqi = qi;
+ x &= y;
+ tqi &= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x |= y;
+ tqi |= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x ^= y;
+ tqi ^= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ if (jj < i - 1) {
+ x = qi;
+ tqi = qi;
+ x <<= jj;
+ tqi <<= jj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x >>= jj;
+ tqi >>= jj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith04/golden/arith04.log b/src/systemc/tests/systemc/datatypes/int/arith/arith04/golden/arith04.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith04/golden/arith04.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith04/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith04/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith04/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith05/arith05.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith05/arith05.cpp
new file mode 100644
index 000000000..7eb83eaff
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith05/arith05.cpp
@@ -0,0 +1,182 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith05.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+void
+check_string( const sc_signed& z, int v )
+{
+ std::string buf( z.to_string( SC_BIN ) );
+ if (z < 0) {
+ sc_assert(buf[2] == '1');
+ } else {
+ sc_assert(buf[2] == '0');
+ }
+}
+
+int
+sc_main( int argc, char* argv[] )
+{
+ unsigned vali[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+ unsigned valj[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+
+ for (unsigned i = 3; i < 32; ++i) {
+ for (unsigned j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_unsigned x(i);
+ sc_unsigned y(j);
+ sc_unsigned z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (unsigned ii = 0; ii < 100; ++ii) {
+ for (unsigned jj = 0; jj < 100; ++jj) {
+ unsigned qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ unsigned qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+ unsigned tqi;
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ tqi = qi;
+ sc_assert( x == qi );
+ y = qj;
+ sc_assert( y == qj );
+ sc_assert((x == qj) == (qi == qj));
+ sc_assert((x == qj) == (qj == x));
+ sc_assert((x != qj) == (qi != qj));
+ sc_assert((x != qj) == (qj != x));
+ sc_assert((x < qj) == (qi < qj));
+ sc_assert((x < qj) == (qj > x));
+ sc_assert((x <= qj) == (qi <= qj));
+ sc_assert((x <= qj) == (qj >= x));
+ sc_assert((x > qj) == (qi > qj));
+ sc_assert((x > qj) == (qj < x));
+ sc_assert((x >= qj) == (qi >= qj));
+ sc_assert((x >= qj) == (qj <= x));
+
+ x += y;
+ tqi += qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x -= y;
+ tqi -= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x *= y;
+ tqi *= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ if (y != 0) {
+ x = qi;
+ tqi = qi;
+ x /= y;
+ tqi /= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x %= y;
+ tqi %= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+ }
+
+ x = qi;
+ tqi = qi;
+ x &= y;
+ tqi &= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x |= y;
+ tqi |= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x ^= y;
+ tqi ^= qj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ if (jj < i - 1) {
+ x = qi;
+ tqi = qi;
+ x <<= jj;
+ tqi <<= jj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+
+ x = qi;
+ tqi = qi;
+ x >>= jj;
+ tqi >>= jj;
+ tqi = (tqi << (32 - i)) >> (32 - i);
+ sc_assert( x == tqi );
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith05/golden/arith05.log b/src/systemc/tests/systemc/datatypes/int/arith/arith05/golden/arith05.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith05/golden/arith05.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith05/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith05/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith05/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith06/arith06.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith06/arith06.cpp
new file mode 100644
index 000000000..0eebbcd79
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith06/arith06.cpp
@@ -0,0 +1,147 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith06.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+int
+sc_main( int argc, char* argv[] )
+{
+ signed int vali[5] = { 0, 1, -1, 7, -8 };
+ signed int valj[5] = { 0, 1, -1, 7, -8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_signed x(i);
+ sc_signed y(j);
+ sc_signed z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ signed int qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ signed int qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ sc_assert( x == qi );
+ y = qj;
+ sc_assert( y == qj );
+ sc_assert((x == qj) == (qi == qj));
+ sc_assert((x == qj) == (qj == x));
+ sc_assert((x != qj) == (qi != qj));
+ sc_assert((x != qj) == (qj != x));
+ sc_assert((x < qj) == (qi < qj));
+ sc_assert((x < qj) == (qj > x));
+ sc_assert((x <= qj) == (qi <= qj));
+ sc_assert((x <= qj) == (qj >= x));
+ sc_assert((x > qj) == (qi > qj));
+ sc_assert((x > qj) == (qj < x));
+ sc_assert((x >= qj) == (qi >= qj));
+ sc_assert((x >= qj) == (qj <= x));
+ z = x + qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi + qj) );
+ z = qi + y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi + qj) );
+ z = x - qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi - qj) );
+ z = qi - y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi - qj) );
+ z = x * qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi * qj) );
+ z = qi * y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi * qj) );
+ if (qj != 0) {
+ z = x / qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi / qj) );
+ z = qi / y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi / qj) );
+ z = x % qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi % qj) );
+ z = qi % y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi % qj) );
+ }
+ z = x & qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi & qj) );
+ z = qi & y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi & qj) );
+ z = x | qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi | qj) );
+ z = qi | y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi | qj) );
+ z = x ^ qj;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi ^ qj) );
+ z = qi ^ y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi ^ qj) );
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith06/golden/arith06.log b/src/systemc/tests/systemc/datatypes/int/arith/arith06/golden/arith06.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith06/golden/arith06.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith06/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith06/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith06/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith07/arith07.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith07/arith07.cpp
new file mode 100644
index 000000000..977108ea8
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith07/arith07.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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith07.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+#define TEST(A,B) \
+{ \
+ if ( A != B ) \
+ cout << #A << " (" << A << ") != " << #B << "(" << B << ")" << endl; \
+}
+
+int
+sc_main( int argc, char* argv[] )
+{
+ unsigned int vali[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+ unsigned int valj[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_unsigned x(i);
+ sc_unsigned y(j);
+ sc_unsigned z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ unsigned qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ unsigned qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ TEST(x,qi );
+ y = qj;
+ TEST(y,qj );
+ TEST((x == qj),(qi == qj));
+ TEST((x == qj),(qj == x));
+ TEST((x != qj),(qi != qj));
+ TEST((x != qj),(qj != x));
+ TEST((x < qj),(qi < qj));
+ TEST((x < qj),(qj > x));
+ TEST((x <= qj),(qi <= qj));
+ TEST((x <= qj),(qj >= x));
+ TEST((x > qj),(qi > qj));
+ TEST((x > qj),(qj < x));
+ TEST((x >= qj),(qi >= qj));
+ TEST((x >= qj),(qj <= x));
+ z = x + qj;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi + qj) );
+ z = qi + y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi + qj) );
+ z = x - qj;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi - qj) );
+ z = qi - y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi - qj) );
+ z = x * qj;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi * qj) );
+ z = qi * y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi * qj) );
+ if (qj != 0) {
+ z = x / qj;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi/qj));
+ z = qi / y;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi/qj));
+ z = x % qj;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi%qj));
+ z = qi % y;
+ TEST((sc_unsigned)( z.range(31,0) ),(qi%qj));
+ }
+ z = x & qj;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi & qj) );
+ z = qi & y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi & qj) );
+ z = x | qj;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi | qj) );
+ z = qi | y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi | qj) );
+ z = x ^ qj;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi ^ qj) );
+ z = qi ^ y;
+ TEST((sc_unsigned)( z.range(31,0) ), (qi ^ qj) );
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith07/golden/arith07.log b/src/systemc/tests/systemc/datatypes/int/arith/arith07/golden/arith07.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith07/golden/arith07.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith07/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith07/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith07/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith08/arith08.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith08/arith08.cpp
new file mode 100644
index 000000000..d44dda816
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith08/arith08.cpp
@@ -0,0 +1,123 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith08.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"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+#define TEST(A,B) \
+{ \
+ if ( A != B ) \
+ cout << #A << " (" << A << ") != " << #B << "(" << B << ")" << endl; \
+}
+
+int
+sc_main(int, char**)
+{
+ unsigned vali[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+ signed int valj[5] = { 0, 1, -1, 7, -8 };
+
+ for (int i = 3; i < 30; ++i) {
+ for (int j = 3; j < 30; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+ sc_unsigned x(i);
+ sc_signed y(j);
+ sc_signed z(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ unsigned qi = (ii < 5) ? vali[ii] :
+ (rng.rand() & ((1 << i) - 1));
+ signed int qj = (jj < 5) ? valj[jj] :
+ (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ y = qj;
+
+ sc_signed ty(x);
+ TEST(x,ty );
+ sc_assert( ty >= 0 );
+ sc_assert((! x[i-1]) || (ty.length() == i+1) );
+
+ z = x + y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ),
+ int(int(qi) + qj) );
+ z = x - y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ),
+ int(int(qi) - qj) );
+ z = x * y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ),
+ int(int(qi) * qj) );
+ sc_unsigned xx(i);
+ xx = x;
+ xx *= y;
+ sc_unsigned xx2(i);
+ xx2 = z.range(i - 1, 0);
+ TEST(xx,xx2);
+
+ if (y != 0) {
+ z = x / y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ), int(int(qi) / qj) );
+ z = x % y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ), int(int(qi) % qj) );
+ }
+ z = x & y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ), int(int(qi) & qj) );
+ z = x | y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ), int(int(qi) | qj) );
+ z = x ^ y;
+ TEST(static_cast<sc_bigint<32> >( z.range(31,0) ), int(int(qi) ^ qj) );
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith08/golden/arith08.log b/src/systemc/tests/systemc/datatypes/int/arith/arith08/golden/arith08.log
new file mode 100644
index 000000000..d7f3045b2
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith08/golden/arith08.log
@@ -0,0 +1,730 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith08/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith08/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith08/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith09/arith09.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith09/arith09.cpp
new file mode 100644
index 000000000..f918c0506
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith09/arith09.cpp
@@ -0,0 +1,122 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith09.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+int
+sc_main( int argc, char* argv[] )
+{
+ unsigned int vali[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+ unsigned int valj[5] = { 0, 1, (unsigned)-1, 7, (unsigned)-8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_unsigned x(i);
+ sc_unsigned y(j);
+ sc_unsigned z(64), q(64);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ unsigned qi = (ii < 5) ? vali[ii] :
+ (rng.rand() & ((1 << i) - 1));
+ unsigned qj = (jj < 5) ? valj[jj] :
+ (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ y = qj;
+ z = x * y;
+ sc_assert( (sc_unsigned)( z.range(31,0) ) ==
+ (qi * qj) );
+ if ( i < 17 )
+ {
+ if ( j < 17 ) // (i < 17)
+ {
+ q = (x.range(i-1,0) * y.range(j-1,0));
+ }
+ else // (j >= 17) (i < 17)
+ {
+ q = (x.range(i-1,0) * y.range(15,0)) +
+ ( x.range(i-1,0) * y.range(j-1,16) ) * 65536;
+ }
+ }
+ else
+ {
+ if ( j < 17 ) // (i >= 17)
+ {
+ q = (x.range(15,0) * y.range(j-1,0)) +
+ (x.range(i-1,16) * y.range(j-1,0)) * 65536;
+ }
+ else // (j >= 17) (i >= 17)
+ {
+ q = (x.range(15,0) * y.range(15,0)) +
+ (x.range(i-1,16) * y.range(15,0) +
+ x.range(15,0) * y.range(j-1,16)) * 65536 +
+ ((x.range(i-1,16) * y.range(j-1,16) * 65536)
+ * 65536);
+ }
+ }
+ sc_assert(z == q);
+
+ if (y != 0) {
+ z /= y;
+ sc_assert(z == x);
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith09/golden/arith09.log b/src/systemc/tests/systemc/datatypes/int/arith/arith09/golden/arith09.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith09/golden/arith09.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith09/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith09/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith09/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith10/arith10.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith10/arith10.cpp
new file mode 100644
index 000000000..e649cb2a3
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith10/arith10.cpp
@@ -0,0 +1,119 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith10.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 <stdlib.h>
+#include "systemc.h"
+#include "isaac.h"
+
+QTIsaac<8> rng; // Platform independent random number generator.
+
+int
+sc_main( int argc, char* argv[] )
+{
+ signed int vali[5] = { 0, 1, -1, 7, -8 };
+ signed int valj[5] = { 0, 1, -1, 7, -8 };
+
+ for (int i = 3; i < 32; ++i) {
+ for (int j = 3; j < 32; ++j) {
+ cout << "i = " << i << ", j = " << j << endl;
+
+ sc_signed x(i);
+ sc_signed y(j);
+ sc_signed z(65), q(65);
+
+ vali[3] = (1 << (i - 1)) - 1;
+ vali[4] = - (1 << (i - 1));
+
+ valj[3] = (1 << (j - 1)) - 1;
+ valj[4] = - (1 << (j - 1));
+
+ for (int ii = 0; ii < 100; ++ii) {
+ for (int jj = 0; jj < 100; ++jj) {
+ signed int qi = (ii < 5) ? vali[ii] : (rng.rand() & ((1 << i) - 1));
+ signed int qj = (jj < 5) ? valj[jj] : (rng.rand() & ((1 << j) - 1));
+
+ if (qi & (1 << (i - 1))) {
+ qi = (qi << (32 - i)) >> (32 - i);
+ }
+ if (qj & (1 << (j - 1))) {
+ qj = (qj << (32 - j)) >> (32 - j);
+ }
+
+ x = qi;
+ y = qj;
+ z = x * y;
+ sc_assert( static_cast<sc_bigint<32> >( z.range(31,0) ) ==
+ (qi * qj) );
+ bool s;
+ s = ((x < 0) != (y < 0));
+ sc_signed x2(i+1);
+ x2 = x;
+ if (x < 0) {
+ x2 = - x;
+ }
+ sc_signed y2(j+1);
+ y2 = y;
+ if (y < 0) {
+ y2 = - y;
+ }
+
+ sc_unsigned xhi(16), xlo(16);
+ sc_unsigned yhi(16), ylo(16);
+ sc_unsigned zero(16);
+ zero = 0;
+ xlo = i > 14 ? x2.range(15,0) : x2.range(i,0);
+ xhi = i > 15 ? x2.range(i,16) : zero;
+ ylo = j > 14 ? y2.range(15,0) : y2.range(j,0);
+ yhi = j > 15 ? y2.range(j,16) : zero;
+ q = (xlo * ylo) +
+ (xhi * ylo + xlo * yhi) * 65536 +
+ ((xhi * yhi) * 65536) * 65536;
+ if (s)
+ q = - q;
+ if (z.range(63,0) != q.range(63,0)) {
+ cout << "xlo = " << xlo << endl;
+ cout << "xhi = " << xhi << endl;
+ cout << "ylo = " << ylo << endl;
+ cout << "yhi = " << yhi << endl;
+ sc_assert(false);
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith10/golden/arith10.log b/src/systemc/tests/systemc/datatypes/int/arith/arith10/golden/arith10.log
new file mode 100644
index 000000000..4e17a8196
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith10/golden/arith10.log
@@ -0,0 +1,842 @@
+SystemC Simulation
+i = 3, j = 3
+i = 3, j = 4
+i = 3, j = 5
+i = 3, j = 6
+i = 3, j = 7
+i = 3, j = 8
+i = 3, j = 9
+i = 3, j = 10
+i = 3, j = 11
+i = 3, j = 12
+i = 3, j = 13
+i = 3, j = 14
+i = 3, j = 15
+i = 3, j = 16
+i = 3, j = 17
+i = 3, j = 18
+i = 3, j = 19
+i = 3, j = 20
+i = 3, j = 21
+i = 3, j = 22
+i = 3, j = 23
+i = 3, j = 24
+i = 3, j = 25
+i = 3, j = 26
+i = 3, j = 27
+i = 3, j = 28
+i = 3, j = 29
+i = 3, j = 30
+i = 3, j = 31
+i = 4, j = 3
+i = 4, j = 4
+i = 4, j = 5
+i = 4, j = 6
+i = 4, j = 7
+i = 4, j = 8
+i = 4, j = 9
+i = 4, j = 10
+i = 4, j = 11
+i = 4, j = 12
+i = 4, j = 13
+i = 4, j = 14
+i = 4, j = 15
+i = 4, j = 16
+i = 4, j = 17
+i = 4, j = 18
+i = 4, j = 19
+i = 4, j = 20
+i = 4, j = 21
+i = 4, j = 22
+i = 4, j = 23
+i = 4, j = 24
+i = 4, j = 25
+i = 4, j = 26
+i = 4, j = 27
+i = 4, j = 28
+i = 4, j = 29
+i = 4, j = 30
+i = 4, j = 31
+i = 5, j = 3
+i = 5, j = 4
+i = 5, j = 5
+i = 5, j = 6
+i = 5, j = 7
+i = 5, j = 8
+i = 5, j = 9
+i = 5, j = 10
+i = 5, j = 11
+i = 5, j = 12
+i = 5, j = 13
+i = 5, j = 14
+i = 5, j = 15
+i = 5, j = 16
+i = 5, j = 17
+i = 5, j = 18
+i = 5, j = 19
+i = 5, j = 20
+i = 5, j = 21
+i = 5, j = 22
+i = 5, j = 23
+i = 5, j = 24
+i = 5, j = 25
+i = 5, j = 26
+i = 5, j = 27
+i = 5, j = 28
+i = 5, j = 29
+i = 5, j = 30
+i = 5, j = 31
+i = 6, j = 3
+i = 6, j = 4
+i = 6, j = 5
+i = 6, j = 6
+i = 6, j = 7
+i = 6, j = 8
+i = 6, j = 9
+i = 6, j = 10
+i = 6, j = 11
+i = 6, j = 12
+i = 6, j = 13
+i = 6, j = 14
+i = 6, j = 15
+i = 6, j = 16
+i = 6, j = 17
+i = 6, j = 18
+i = 6, j = 19
+i = 6, j = 20
+i = 6, j = 21
+i = 6, j = 22
+i = 6, j = 23
+i = 6, j = 24
+i = 6, j = 25
+i = 6, j = 26
+i = 6, j = 27
+i = 6, j = 28
+i = 6, j = 29
+i = 6, j = 30
+i = 6, j = 31
+i = 7, j = 3
+i = 7, j = 4
+i = 7, j = 5
+i = 7, j = 6
+i = 7, j = 7
+i = 7, j = 8
+i = 7, j = 9
+i = 7, j = 10
+i = 7, j = 11
+i = 7, j = 12
+i = 7, j = 13
+i = 7, j = 14
+i = 7, j = 15
+i = 7, j = 16
+i = 7, j = 17
+i = 7, j = 18
+i = 7, j = 19
+i = 7, j = 20
+i = 7, j = 21
+i = 7, j = 22
+i = 7, j = 23
+i = 7, j = 24
+i = 7, j = 25
+i = 7, j = 26
+i = 7, j = 27
+i = 7, j = 28
+i = 7, j = 29
+i = 7, j = 30
+i = 7, j = 31
+i = 8, j = 3
+i = 8, j = 4
+i = 8, j = 5
+i = 8, j = 6
+i = 8, j = 7
+i = 8, j = 8
+i = 8, j = 9
+i = 8, j = 10
+i = 8, j = 11
+i = 8, j = 12
+i = 8, j = 13
+i = 8, j = 14
+i = 8, j = 15
+i = 8, j = 16
+i = 8, j = 17
+i = 8, j = 18
+i = 8, j = 19
+i = 8, j = 20
+i = 8, j = 21
+i = 8, j = 22
+i = 8, j = 23
+i = 8, j = 24
+i = 8, j = 25
+i = 8, j = 26
+i = 8, j = 27
+i = 8, j = 28
+i = 8, j = 29
+i = 8, j = 30
+i = 8, j = 31
+i = 9, j = 3
+i = 9, j = 4
+i = 9, j = 5
+i = 9, j = 6
+i = 9, j = 7
+i = 9, j = 8
+i = 9, j = 9
+i = 9, j = 10
+i = 9, j = 11
+i = 9, j = 12
+i = 9, j = 13
+i = 9, j = 14
+i = 9, j = 15
+i = 9, j = 16
+i = 9, j = 17
+i = 9, j = 18
+i = 9, j = 19
+i = 9, j = 20
+i = 9, j = 21
+i = 9, j = 22
+i = 9, j = 23
+i = 9, j = 24
+i = 9, j = 25
+i = 9, j = 26
+i = 9, j = 27
+i = 9, j = 28
+i = 9, j = 29
+i = 9, j = 30
+i = 9, j = 31
+i = 10, j = 3
+i = 10, j = 4
+i = 10, j = 5
+i = 10, j = 6
+i = 10, j = 7
+i = 10, j = 8
+i = 10, j = 9
+i = 10, j = 10
+i = 10, j = 11
+i = 10, j = 12
+i = 10, j = 13
+i = 10, j = 14
+i = 10, j = 15
+i = 10, j = 16
+i = 10, j = 17
+i = 10, j = 18
+i = 10, j = 19
+i = 10, j = 20
+i = 10, j = 21
+i = 10, j = 22
+i = 10, j = 23
+i = 10, j = 24
+i = 10, j = 25
+i = 10, j = 26
+i = 10, j = 27
+i = 10, j = 28
+i = 10, j = 29
+i = 10, j = 30
+i = 10, j = 31
+i = 11, j = 3
+i = 11, j = 4
+i = 11, j = 5
+i = 11, j = 6
+i = 11, j = 7
+i = 11, j = 8
+i = 11, j = 9
+i = 11, j = 10
+i = 11, j = 11
+i = 11, j = 12
+i = 11, j = 13
+i = 11, j = 14
+i = 11, j = 15
+i = 11, j = 16
+i = 11, j = 17
+i = 11, j = 18
+i = 11, j = 19
+i = 11, j = 20
+i = 11, j = 21
+i = 11, j = 22
+i = 11, j = 23
+i = 11, j = 24
+i = 11, j = 25
+i = 11, j = 26
+i = 11, j = 27
+i = 11, j = 28
+i = 11, j = 29
+i = 11, j = 30
+i = 11, j = 31
+i = 12, j = 3
+i = 12, j = 4
+i = 12, j = 5
+i = 12, j = 6
+i = 12, j = 7
+i = 12, j = 8
+i = 12, j = 9
+i = 12, j = 10
+i = 12, j = 11
+i = 12, j = 12
+i = 12, j = 13
+i = 12, j = 14
+i = 12, j = 15
+i = 12, j = 16
+i = 12, j = 17
+i = 12, j = 18
+i = 12, j = 19
+i = 12, j = 20
+i = 12, j = 21
+i = 12, j = 22
+i = 12, j = 23
+i = 12, j = 24
+i = 12, j = 25
+i = 12, j = 26
+i = 12, j = 27
+i = 12, j = 28
+i = 12, j = 29
+i = 12, j = 30
+i = 12, j = 31
+i = 13, j = 3
+i = 13, j = 4
+i = 13, j = 5
+i = 13, j = 6
+i = 13, j = 7
+i = 13, j = 8
+i = 13, j = 9
+i = 13, j = 10
+i = 13, j = 11
+i = 13, j = 12
+i = 13, j = 13
+i = 13, j = 14
+i = 13, j = 15
+i = 13, j = 16
+i = 13, j = 17
+i = 13, j = 18
+i = 13, j = 19
+i = 13, j = 20
+i = 13, j = 21
+i = 13, j = 22
+i = 13, j = 23
+i = 13, j = 24
+i = 13, j = 25
+i = 13, j = 26
+i = 13, j = 27
+i = 13, j = 28
+i = 13, j = 29
+i = 13, j = 30
+i = 13, j = 31
+i = 14, j = 3
+i = 14, j = 4
+i = 14, j = 5
+i = 14, j = 6
+i = 14, j = 7
+i = 14, j = 8
+i = 14, j = 9
+i = 14, j = 10
+i = 14, j = 11
+i = 14, j = 12
+i = 14, j = 13
+i = 14, j = 14
+i = 14, j = 15
+i = 14, j = 16
+i = 14, j = 17
+i = 14, j = 18
+i = 14, j = 19
+i = 14, j = 20
+i = 14, j = 21
+i = 14, j = 22
+i = 14, j = 23
+i = 14, j = 24
+i = 14, j = 25
+i = 14, j = 26
+i = 14, j = 27
+i = 14, j = 28
+i = 14, j = 29
+i = 14, j = 30
+i = 14, j = 31
+i = 15, j = 3
+i = 15, j = 4
+i = 15, j = 5
+i = 15, j = 6
+i = 15, j = 7
+i = 15, j = 8
+i = 15, j = 9
+i = 15, j = 10
+i = 15, j = 11
+i = 15, j = 12
+i = 15, j = 13
+i = 15, j = 14
+i = 15, j = 15
+i = 15, j = 16
+i = 15, j = 17
+i = 15, j = 18
+i = 15, j = 19
+i = 15, j = 20
+i = 15, j = 21
+i = 15, j = 22
+i = 15, j = 23
+i = 15, j = 24
+i = 15, j = 25
+i = 15, j = 26
+i = 15, j = 27
+i = 15, j = 28
+i = 15, j = 29
+i = 15, j = 30
+i = 15, j = 31
+i = 16, j = 3
+i = 16, j = 4
+i = 16, j = 5
+i = 16, j = 6
+i = 16, j = 7
+i = 16, j = 8
+i = 16, j = 9
+i = 16, j = 10
+i = 16, j = 11
+i = 16, j = 12
+i = 16, j = 13
+i = 16, j = 14
+i = 16, j = 15
+i = 16, j = 16
+i = 16, j = 17
+i = 16, j = 18
+i = 16, j = 19
+i = 16, j = 20
+i = 16, j = 21
+i = 16, j = 22
+i = 16, j = 23
+i = 16, j = 24
+i = 16, j = 25
+i = 16, j = 26
+i = 16, j = 27
+i = 16, j = 28
+i = 16, j = 29
+i = 16, j = 30
+i = 16, j = 31
+i = 17, j = 3
+i = 17, j = 4
+i = 17, j = 5
+i = 17, j = 6
+i = 17, j = 7
+i = 17, j = 8
+i = 17, j = 9
+i = 17, j = 10
+i = 17, j = 11
+i = 17, j = 12
+i = 17, j = 13
+i = 17, j = 14
+i = 17, j = 15
+i = 17, j = 16
+i = 17, j = 17
+i = 17, j = 18
+i = 17, j = 19
+i = 17, j = 20
+i = 17, j = 21
+i = 17, j = 22
+i = 17, j = 23
+i = 17, j = 24
+i = 17, j = 25
+i = 17, j = 26
+i = 17, j = 27
+i = 17, j = 28
+i = 17, j = 29
+i = 17, j = 30
+i = 17, j = 31
+i = 18, j = 3
+i = 18, j = 4
+i = 18, j = 5
+i = 18, j = 6
+i = 18, j = 7
+i = 18, j = 8
+i = 18, j = 9
+i = 18, j = 10
+i = 18, j = 11
+i = 18, j = 12
+i = 18, j = 13
+i = 18, j = 14
+i = 18, j = 15
+i = 18, j = 16
+i = 18, j = 17
+i = 18, j = 18
+i = 18, j = 19
+i = 18, j = 20
+i = 18, j = 21
+i = 18, j = 22
+i = 18, j = 23
+i = 18, j = 24
+i = 18, j = 25
+i = 18, j = 26
+i = 18, j = 27
+i = 18, j = 28
+i = 18, j = 29
+i = 18, j = 30
+i = 18, j = 31
+i = 19, j = 3
+i = 19, j = 4
+i = 19, j = 5
+i = 19, j = 6
+i = 19, j = 7
+i = 19, j = 8
+i = 19, j = 9
+i = 19, j = 10
+i = 19, j = 11
+i = 19, j = 12
+i = 19, j = 13
+i = 19, j = 14
+i = 19, j = 15
+i = 19, j = 16
+i = 19, j = 17
+i = 19, j = 18
+i = 19, j = 19
+i = 19, j = 20
+i = 19, j = 21
+i = 19, j = 22
+i = 19, j = 23
+i = 19, j = 24
+i = 19, j = 25
+i = 19, j = 26
+i = 19, j = 27
+i = 19, j = 28
+i = 19, j = 29
+i = 19, j = 30
+i = 19, j = 31
+i = 20, j = 3
+i = 20, j = 4
+i = 20, j = 5
+i = 20, j = 6
+i = 20, j = 7
+i = 20, j = 8
+i = 20, j = 9
+i = 20, j = 10
+i = 20, j = 11
+i = 20, j = 12
+i = 20, j = 13
+i = 20, j = 14
+i = 20, j = 15
+i = 20, j = 16
+i = 20, j = 17
+i = 20, j = 18
+i = 20, j = 19
+i = 20, j = 20
+i = 20, j = 21
+i = 20, j = 22
+i = 20, j = 23
+i = 20, j = 24
+i = 20, j = 25
+i = 20, j = 26
+i = 20, j = 27
+i = 20, j = 28
+i = 20, j = 29
+i = 20, j = 30
+i = 20, j = 31
+i = 21, j = 3
+i = 21, j = 4
+i = 21, j = 5
+i = 21, j = 6
+i = 21, j = 7
+i = 21, j = 8
+i = 21, j = 9
+i = 21, j = 10
+i = 21, j = 11
+i = 21, j = 12
+i = 21, j = 13
+i = 21, j = 14
+i = 21, j = 15
+i = 21, j = 16
+i = 21, j = 17
+i = 21, j = 18
+i = 21, j = 19
+i = 21, j = 20
+i = 21, j = 21
+i = 21, j = 22
+i = 21, j = 23
+i = 21, j = 24
+i = 21, j = 25
+i = 21, j = 26
+i = 21, j = 27
+i = 21, j = 28
+i = 21, j = 29
+i = 21, j = 30
+i = 21, j = 31
+i = 22, j = 3
+i = 22, j = 4
+i = 22, j = 5
+i = 22, j = 6
+i = 22, j = 7
+i = 22, j = 8
+i = 22, j = 9
+i = 22, j = 10
+i = 22, j = 11
+i = 22, j = 12
+i = 22, j = 13
+i = 22, j = 14
+i = 22, j = 15
+i = 22, j = 16
+i = 22, j = 17
+i = 22, j = 18
+i = 22, j = 19
+i = 22, j = 20
+i = 22, j = 21
+i = 22, j = 22
+i = 22, j = 23
+i = 22, j = 24
+i = 22, j = 25
+i = 22, j = 26
+i = 22, j = 27
+i = 22, j = 28
+i = 22, j = 29
+i = 22, j = 30
+i = 22, j = 31
+i = 23, j = 3
+i = 23, j = 4
+i = 23, j = 5
+i = 23, j = 6
+i = 23, j = 7
+i = 23, j = 8
+i = 23, j = 9
+i = 23, j = 10
+i = 23, j = 11
+i = 23, j = 12
+i = 23, j = 13
+i = 23, j = 14
+i = 23, j = 15
+i = 23, j = 16
+i = 23, j = 17
+i = 23, j = 18
+i = 23, j = 19
+i = 23, j = 20
+i = 23, j = 21
+i = 23, j = 22
+i = 23, j = 23
+i = 23, j = 24
+i = 23, j = 25
+i = 23, j = 26
+i = 23, j = 27
+i = 23, j = 28
+i = 23, j = 29
+i = 23, j = 30
+i = 23, j = 31
+i = 24, j = 3
+i = 24, j = 4
+i = 24, j = 5
+i = 24, j = 6
+i = 24, j = 7
+i = 24, j = 8
+i = 24, j = 9
+i = 24, j = 10
+i = 24, j = 11
+i = 24, j = 12
+i = 24, j = 13
+i = 24, j = 14
+i = 24, j = 15
+i = 24, j = 16
+i = 24, j = 17
+i = 24, j = 18
+i = 24, j = 19
+i = 24, j = 20
+i = 24, j = 21
+i = 24, j = 22
+i = 24, j = 23
+i = 24, j = 24
+i = 24, j = 25
+i = 24, j = 26
+i = 24, j = 27
+i = 24, j = 28
+i = 24, j = 29
+i = 24, j = 30
+i = 24, j = 31
+i = 25, j = 3
+i = 25, j = 4
+i = 25, j = 5
+i = 25, j = 6
+i = 25, j = 7
+i = 25, j = 8
+i = 25, j = 9
+i = 25, j = 10
+i = 25, j = 11
+i = 25, j = 12
+i = 25, j = 13
+i = 25, j = 14
+i = 25, j = 15
+i = 25, j = 16
+i = 25, j = 17
+i = 25, j = 18
+i = 25, j = 19
+i = 25, j = 20
+i = 25, j = 21
+i = 25, j = 22
+i = 25, j = 23
+i = 25, j = 24
+i = 25, j = 25
+i = 25, j = 26
+i = 25, j = 27
+i = 25, j = 28
+i = 25, j = 29
+i = 25, j = 30
+i = 25, j = 31
+i = 26, j = 3
+i = 26, j = 4
+i = 26, j = 5
+i = 26, j = 6
+i = 26, j = 7
+i = 26, j = 8
+i = 26, j = 9
+i = 26, j = 10
+i = 26, j = 11
+i = 26, j = 12
+i = 26, j = 13
+i = 26, j = 14
+i = 26, j = 15
+i = 26, j = 16
+i = 26, j = 17
+i = 26, j = 18
+i = 26, j = 19
+i = 26, j = 20
+i = 26, j = 21
+i = 26, j = 22
+i = 26, j = 23
+i = 26, j = 24
+i = 26, j = 25
+i = 26, j = 26
+i = 26, j = 27
+i = 26, j = 28
+i = 26, j = 29
+i = 26, j = 30
+i = 26, j = 31
+i = 27, j = 3
+i = 27, j = 4
+i = 27, j = 5
+i = 27, j = 6
+i = 27, j = 7
+i = 27, j = 8
+i = 27, j = 9
+i = 27, j = 10
+i = 27, j = 11
+i = 27, j = 12
+i = 27, j = 13
+i = 27, j = 14
+i = 27, j = 15
+i = 27, j = 16
+i = 27, j = 17
+i = 27, j = 18
+i = 27, j = 19
+i = 27, j = 20
+i = 27, j = 21
+i = 27, j = 22
+i = 27, j = 23
+i = 27, j = 24
+i = 27, j = 25
+i = 27, j = 26
+i = 27, j = 27
+i = 27, j = 28
+i = 27, j = 29
+i = 27, j = 30
+i = 27, j = 31
+i = 28, j = 3
+i = 28, j = 4
+i = 28, j = 5
+i = 28, j = 6
+i = 28, j = 7
+i = 28, j = 8
+i = 28, j = 9
+i = 28, j = 10
+i = 28, j = 11
+i = 28, j = 12
+i = 28, j = 13
+i = 28, j = 14
+i = 28, j = 15
+i = 28, j = 16
+i = 28, j = 17
+i = 28, j = 18
+i = 28, j = 19
+i = 28, j = 20
+i = 28, j = 21
+i = 28, j = 22
+i = 28, j = 23
+i = 28, j = 24
+i = 28, j = 25
+i = 28, j = 26
+i = 28, j = 27
+i = 28, j = 28
+i = 28, j = 29
+i = 28, j = 30
+i = 28, j = 31
+i = 29, j = 3
+i = 29, j = 4
+i = 29, j = 5
+i = 29, j = 6
+i = 29, j = 7
+i = 29, j = 8
+i = 29, j = 9
+i = 29, j = 10
+i = 29, j = 11
+i = 29, j = 12
+i = 29, j = 13
+i = 29, j = 14
+i = 29, j = 15
+i = 29, j = 16
+i = 29, j = 17
+i = 29, j = 18
+i = 29, j = 19
+i = 29, j = 20
+i = 29, j = 21
+i = 29, j = 22
+i = 29, j = 23
+i = 29, j = 24
+i = 29, j = 25
+i = 29, j = 26
+i = 29, j = 27
+i = 29, j = 28
+i = 29, j = 29
+i = 29, j = 30
+i = 29, j = 31
+i = 30, j = 3
+i = 30, j = 4
+i = 30, j = 5
+i = 30, j = 6
+i = 30, j = 7
+i = 30, j = 8
+i = 30, j = 9
+i = 30, j = 10
+i = 30, j = 11
+i = 30, j = 12
+i = 30, j = 13
+i = 30, j = 14
+i = 30, j = 15
+i = 30, j = 16
+i = 30, j = 17
+i = 30, j = 18
+i = 30, j = 19
+i = 30, j = 20
+i = 30, j = 21
+i = 30, j = 22
+i = 30, j = 23
+i = 30, j = 24
+i = 30, j = 25
+i = 30, j = 26
+i = 30, j = 27
+i = 30, j = 28
+i = 30, j = 29
+i = 30, j = 30
+i = 30, j = 31
+i = 31, j = 3
+i = 31, j = 4
+i = 31, j = 5
+i = 31, j = 6
+i = 31, j = 7
+i = 31, j = 8
+i = 31, j = 9
+i = 31, j = 10
+i = 31, j = 11
+i = 31, j = 12
+i = 31, j = 13
+i = 31, j = 14
+i = 31, j = 15
+i = 31, j = 16
+i = 31, j = 17
+i = 31, j = 18
+i = 31, j = 19
+i = 31, j = 20
+i = 31, j = 21
+i = 31, j = 22
+i = 31, j = 23
+i = 31, j = 24
+i = 31, j = 25
+i = 31, j = 26
+i = 31, j = 27
+i = 31, j = 28
+i = 31, j = 29
+i = 31, j = 30
+i = 31, j = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith10/isaac.h b/src/systemc/tests/systemc/datatypes/int/arith/arith10/isaac.h
new file mode 100644
index 000000000..9625be2ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith10/isaac.h
@@ -0,0 +1,272 @@
+#ifndef __ISAAC_HPP
+#define __ISAAC_HPP
+
+
+/*
+
+ C++ TEMPLATE VERSION OF Robert J. Jenkins Jr.'s
+ ISAAC Random Number Generator.
+
+ Ported from vanilla C to to template C++ class
+ by Quinn Tyler Jackson on 16-23 July 1998.
+
+ quinn@qtj.net
+
+ The function for the expected period of this
+ random number generator, according to Jenkins is:
+
+ f(a,b) = 2**((a+b*(3+2^^a)-1)
+
+ (where a is ALPHA and b is bitwidth)
+
+ So, for a bitwidth of 32 and an ALPHA of 8,
+ the expected period of ISAAC is:
+
+ 2^^(8+32*(3+2^^8)-1) = 2^^8295
+
+ Jackson has been able to run implementations
+ with an ALPHA as high as 16, or
+
+ 2^^2097263
+
+*/
+
+
+typedef unsigned int UINT32;
+const UINT32 GOLDEN_RATIO = UINT32(0x9e3779b9);
+
+
+template <UINT32 ALPHA = (8)>
+class QTIsaac
+{
+ public:
+
+ typedef unsigned char byte;
+
+ struct randctx
+ {
+ randctx(void)
+ {
+ randrsl = new UINT32[N];
+ randmem = new UINT32[N];
+ }
+
+ ~randctx(void)
+ {
+ delete [] randrsl;
+ delete [] randmem;
+ }
+
+ UINT32 randcnt;
+ UINT32* randrsl;
+ UINT32* randmem;
+ UINT32 randa;
+ UINT32 randb;
+ UINT32 randc;
+ };
+
+ QTIsaac(UINT32 a = 0, UINT32 b = 0, UINT32 c = 0);
+ virtual ~QTIsaac(void);
+
+ UINT32 rand(void);
+ virtual void randinit(randctx* ctx, bool bUseSeed);
+ virtual void srand(
+ UINT32 a = 0, UINT32 b = 0, UINT32 c = 0, UINT32* s = NULL);
+
+ enum {N = (1<<ALPHA)};
+
+ protected:
+
+ virtual void isaac(randctx* ctx);
+
+ UINT32 ind(UINT32* mm, UINT32 x);
+ void rngstep(
+ UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m,
+ UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y);
+ virtual void shuffle(
+ UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f,
+ UINT32& g, UINT32& h);
+
+ private:
+ randctx m_rc;
+};
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::QTIsaac(UINT32 a, UINT32 b, UINT32 c) : m_rc()
+{
+ srand(a, b, c);
+}
+
+
+template<UINT32 ALPHA>
+QTIsaac<ALPHA>::~QTIsaac(void)
+{
+ // DO NOTHING
+}
+
+
+template<UINT32 ALPHA>
+void QTIsaac<ALPHA>::srand(UINT32 a, UINT32 b, UINT32 c, UINT32* s)
+{
+ for(int i = 0; i < N; i++)
+ {
+ m_rc.randrsl[i] = s != NULL ? s[i] : 0;
+ }
+
+ m_rc.randa = a;
+ m_rc.randb = b;
+ m_rc.randc = c;
+
+ randinit(&m_rc, true);
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::rand(void)
+{
+ return 0x7fffffff & (!m_rc.randcnt-- ?
+ (isaac(&m_rc), m_rc.randcnt=(N-1), m_rc.randrsl[m_rc.randcnt]) :
+ m_rc.randrsl[m_rc.randcnt]);
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::randinit(randctx* ctx, bool bUseSeed)
+{
+ UINT32 a,b,c,d,e,f,g,h;
+ int i;
+
+ a = b = c = d = e = f = g = h = GOLDEN_RATIO;
+
+ UINT32* m = (ctx->randmem);
+ UINT32* r = (ctx->randrsl);
+
+ if(!bUseSeed)
+ {
+ ctx->randa = 0;
+ ctx->randb = 0;
+ ctx->randc = 0;
+ }
+
+ // scramble it
+ for(i=0; i < 4; ++i)
+ {
+ shuffle(a,b,c,d,e,f,g,h);
+ }
+
+ if(bUseSeed)
+ {
+ // initialize using the contents of r[] as the seed
+
+ for(i=0; i < N; i+=8)
+ {
+ a+=r[i ]; b+=r[i+1]; c+=r[i+2]; d+=r[i+3];
+ e+=r[i+4]; f+=r[i+5]; g+=r[i+6]; h+=r[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+
+ //do a second pass to make all of the seed affect all of m
+
+ for(i=0; i < N; i += 8)
+ {
+ a+=m[i ]; b+=m[i+1]; c+=m[i+2]; d+=m[i+3];
+ e+=m[i+4]; f+=m[i+5]; g+=m[i+6]; h+=m[i+7];
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+ }
+ }
+ else
+ {
+ // fill in mm[] with messy stuff
+
+ shuffle(a,b,c,d,e,f,g,h);
+
+ m[i ]=a; m[i+1]=b; m[i+2]=c; m[i+3]=d;
+ m[i+4]=e; m[i+5]=f; m[i+6]=g; m[i+7]=h;
+
+ }
+
+ isaac(ctx); // fill in the first set of results
+ ctx->randcnt = N; // prepare to use the first set of results
+}
+
+
+template<UINT32 ALPHA>
+inline UINT32 QTIsaac<ALPHA>::ind(UINT32* mm, UINT32 x)
+{
+ return (*(UINT32*)((byte*)(mm) + ((x) & ((N-1)<<2))));
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::rngstep(UINT32 mix, UINT32& a, UINT32& b, UINT32*& mm, UINT32*& m, UINT32*& m2, UINT32*& r, UINT32& x, UINT32& y)
+{
+ x = *m;
+ a = (a^(mix)) + *(m2++);
+ *(m++) = y = ind(mm,x) + a + b;
+ *(r++) = b = ind(mm,y>>ALPHA) + x;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::shuffle(UINT32& a, UINT32& b, UINT32& c, UINT32& d, UINT32& e, UINT32& f, UINT32& g, UINT32& h)
+{
+ a^=b<<11; d+=a; b+=c;
+ b^=c>>2; e+=b; c+=d;
+ c^=d<<8; f+=c; d+=e;
+ d^=e>>16; g+=d; e+=f;
+ e^=f<<10; h+=e; f+=g;
+ f^=g>>4; a+=f; g+=h;
+ g^=h<<8; b+=g; h+=a;
+ h^=a>>9; c+=h; a+=b;
+}
+
+
+template<UINT32 ALPHA>
+inline void QTIsaac<ALPHA>::isaac(randctx* ctx)
+{
+ UINT32 x,y;
+
+ UINT32* mm = ctx->randmem;
+ UINT32* r = ctx->randrsl;
+
+ UINT32 a = (ctx->randa);
+ UINT32 b = (ctx->randb + (++ctx->randc));
+
+ UINT32* m = mm;
+ UINT32* m2 = (m+(N/2));
+ UINT32* mend = m2;
+
+ for(; m<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ m2 = mm;
+
+ for(; m2<mend; )
+ {
+ rngstep((a<<13), a, b, mm, m, m2, r, x, y);
+ rngstep((a>>6) , a, b, mm, m, m2, r, x, y);
+ rngstep((a<<2) , a, b, mm, m, m2, r, x, y);
+ rngstep((a>>16), a, b, mm, m, m2, r, x, y);
+ }
+
+ ctx->randb = b;
+ ctx->randa = a;
+}
+
+
+#endif // __ISAAC_HPP
+
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith11/arith11.cpp b/src/systemc/tests/systemc/datatypes/int/arith/arith11/arith11.cpp
new file mode 100644
index 000000000..341ebf150
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith11/arith11.cpp
@@ -0,0 +1,57 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ arith11.cpp -- test auto increment on sc_bigint<N> and sc_biguint<N>
+
+ Original Author: Andy Goodrich, Forte Design Systems, 24 March 2008
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+#include <systemc.h>
+
+int sc_main(int argc, char**argv)
+{
+ sc_biguint<3> a = 7;
+ sc_bigint<3> b = 7;
+
+ ++a;
+ cout << "a is " << a << endl;
+ cout << "a == 0 is " << (a==0) << endl;
+ cout << "raw digit: " << *a.get_raw() << endl;
+ cout << endl;
+
+ ++b;
+ cout << "b is " << b << endl;
+ cout << "b == 0 is " << (b==0) << endl;
+ cout << "raw digit: " << *b.get_raw() << endl;
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/arith/arith11/golden/arith11.log b/src/systemc/tests/systemc/datatypes/int/arith/arith11/golden/arith11.log
new file mode 100644
index 000000000..06a259a10
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/arith/arith11/golden/arith11.log
@@ -0,0 +1,8 @@
+SystemC Simulation
+a is 0
+a == 0 is 1
+raw digit: 0
+
+b is 0
+b == 0 is 1
+raw digit: 0
diff --git a/src/systemc/tests/systemc/datatypes/int/check/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/check/test01/golden/test01.log
new file mode 100644
index 000000000..52f7e5605
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/check/test01/golden/test01.log
@@ -0,0 +1,19 @@
+SystemC Simulation
+caught exception for sc_int<-3>
+caught exception for sc_int<0>
+caught exception for sc_int<100>
+caught exception for sc_int<8>[-1]
+caught exception for sc_int<8>[8]
+caught exception for sc_int<8>( 3, -1 )
+caught exception for sc_int<8>( 8, 4 )
+caught exception for sc_int<8>( 0, 3 )
+0
+caught exception for sc_uint<-3>
+caught exception for sc_uint<0>
+caught exception for sc_uint<100>
+caught exception for sc_uint<8>[-1]
+caught exception for sc_uint<8>[8]
+caught exception for sc_uint<8>( 3, -1 )
+caught exception for sc_uint<8>( 8, 4 )
+caught exception for sc_uint<8>( 0, 3 )
+0
diff --git a/src/systemc/tests/systemc/datatypes/int/check/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/check/test01/test01.cpp
new file mode 100644
index 000000000..75220fde4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/check/test01/test01.cpp
@@ -0,0 +1,207 @@
+/*****************************************************************************
+
+ 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 checks in the sc_[u]int classes
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ // check_length for sc_int_base
+
+ try {
+ sc_int<-3> a;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<-3>\n";
+ }
+
+ try {
+ sc_int<0> a;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<0>\n";
+ }
+
+ try {
+ sc_int<100> a;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<100>\n";
+ }
+
+
+ // check_index for sc_int_base
+
+ try {
+ sc_int<8> a = 42;
+ cout << a[-1] << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<8>[-1]\n";
+ }
+
+ try {
+ sc_int<8> a = 42;
+ cout << a[8] << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<8>[8]\n";
+ }
+
+
+ // check_range for sc_int_base
+
+ try {
+ sc_int<8> a = 42;
+ cout << a( 3, -1 ) << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<8>( 3, -1 )\n";
+ }
+
+ try {
+ sc_int<8> a = 42;
+ cout << a( 8, 4 ) << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<8>( 8, 4 )\n";
+ }
+
+ try {
+ sc_int<8> a = 42;
+ cout << a( 0, 3 ) << endl;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_int<8>( 0, 3 )\n";
+ }
+
+
+ // check_length for sc_int_concref<T1,T2>
+
+ try {
+ sc_int<42> a;
+ cout << ( a, a ) << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for ( sc_int<42>, sc_int<42> )\n";
+ }
+
+
+ // check_length for sc_uint_base
+
+ try {
+ sc_uint<-3> a;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<-3>\n";
+ }
+
+ try {
+ sc_uint<0> a;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<0>\n";
+ }
+
+ try {
+ sc_uint<100> a;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<100>\n";
+ }
+
+
+ // check_index for sc_uint_base
+
+ try {
+ sc_uint<8> a = 42;
+ cout << a[-1] << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<8>[-1]\n";
+ }
+
+ try {
+ sc_uint<8> a = 42;
+ cout << a[8] << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<8>[8]\n";
+ }
+
+
+ // check_range for sc_uint_base
+
+ try {
+ sc_uint<8> a = 42;
+ cout << a( 3, -1 ) << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<8>( 3, -1 )\n";
+ }
+
+ try {
+ sc_uint<8> a = 42;
+ cout << a( 8, 4 ) << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<8>( 8, 4 )\n";
+ }
+
+ try {
+ sc_uint<8> a = 42;
+ cout << a( 0, 3 ) << endl;
+ }
+ catch( sc_report ) {
+ cout << "caught exception for sc_uint<8>( 0, 3 )\n";
+ }
+
+
+ // check_length for sc_uint_concref<T1,T2>
+
+ try {
+ sc_uint<42> a;
+ cout << ( a, a ) << "\n";
+ }
+ catch( sc_report ) {
+ cout << "caught exception for ( sc_uint<42>, sc_uint<42> )\n";
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/compare/compare.cpp b/src/systemc/tests/systemc/datatypes/int/compare/compare.cpp
new file mode 100644
index 000000000..73568faa1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/compare/compare.cpp
@@ -0,0 +1,77 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ compare.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"
+
+
+int sc_main(int argc, char* argv[] )
+{
+ sc_bigint<8> a, b;
+ sc_biguint<8> c;
+
+ a = -5;
+ b = -1;
+ c = -1;
+ sc_assert(a <= b);
+ sc_assert(a <= c);
+
+ a = -5;
+ b = 0;
+ c = 0;
+ sc_assert(a <= b);
+ sc_assert(a <= c);
+
+ a = -5;
+ b = 5;
+ c = 5;
+ sc_assert(a <= b);
+ sc_assert(a <= c);
+
+ a = 0;
+ b = 5;
+ c = 5;
+ sc_assert(a <= b);
+ sc_assert(a <= c);
+
+ a = 5;
+ b = 10;
+ c = 10;
+ sc_assert(a <= b);
+ sc_assert(a <= c);
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/compare/golden/compare.log b/src/systemc/tests/systemc/datatypes/int/compare/golden/compare.log
new file mode 100644
index 000000000..6d243dcc5
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/compare/golden/compare.log
@@ -0,0 +1 @@
+SystemC Simulation
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/concat/test01/golden/test01.log
new file mode 100644
index 000000000..d2fa0584e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test01/golden/test01.log
@@ -0,0 +1,63 @@
+SystemC Simulation
+33
+*** sc_int_base
+2
+1
+18
+---
+0
+3
+1
+---
+-8
+1
+33
+---
+-8
+2
+33
+*** sc_int_bitref
+1
+0
+33
+---
+2
+34
+---
+1
+2
+33
+---
+-8
+40
+*** sc_int_subref
+2
+1
+33
+---
+0
+3
+33
+---
+2
+1
+18
+---
+-8
+2
+34
+*** sc_int_concat
+-6
+1
+17
+---
+-8
+1
+17
+---
+-6
+1
+17
+---
+-8
+24
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/concat/test01/test01.cpp
new file mode 100644
index 000000000..33229ddb3
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test01/test01.cpp
@@ -0,0 +1,201 @@
+/*****************************************************************************
+
+ 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 sc_int's concat operators -- basic functionality, operator , ()
+
+#include "systemc.h"
+
+void
+test_concat( const sc_int<8>& a )
+{
+ sc_int<8> b;
+ sc_int<4> c;
+ sc_int<4> d;
+
+ cout << a << endl;
+
+ cout << "*** sc_int_base" << endl;
+
+ ( c, d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = ( d, c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c, d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( c, d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c, d.range( 1, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( c, d.range( 1, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c, ( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( c, ( d[0], d[1] ) );
+ cout << b << endl;
+
+ cout << "*** sc_int_bitref" << endl;
+
+ ( d[1], c ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( d[1], c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( d[0], d[1] ) = a.range( 1,0 );
+ cout << d << endl;
+
+ b.range( 1, 0 ) = ( d[1], d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( d[0], c.range( 3, 0 ) ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( d[0], c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( d[0], ( d[1], d[2], d[3] ) ) = a.range( 3, 0 );
+ cout << d << endl;
+
+ b.range( 3, 0 ) = ( d[3], ( d[2], d[1], d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_int_subref" << endl;
+
+ ( c.range( 3, 0 ), d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = ( c.range( 3, 0 ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c.range( 3, 0 ), d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( c.range( 3, 0 ), d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c.range( 3, 0 ), d.range( 3, 0 ) ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = ( d.range( 3, 0 ), c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c.range( 3, 0 ), ( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( c.range( 3, 0 ), ( d[1], d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_int_concat" << endl;
+
+ ( ( c[1], c[0] ), d ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( ( c[0], c[1] ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( ( c[1], c[0] ), d[0] ) = a.range( 2, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 2, 0 ) = ( ( c[0], c[1] ), d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( ( c[1], c[0] ), d.range( 3, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( ( c[0], c[1] ), d.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( ( c[0], c[1] ), ( c[2], c[3] ) ) = a.range( 3, 0 );
+ cout << c << endl;
+
+ b.range( 3, 0 ) = ( ( c[3], c[2] ), ( c[1], c[0] ) );
+ cout << b << endl;
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_int<8> a( 33 );
+
+ test_concat( a );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/concat/test02/golden/test02.log
new file mode 100644
index 000000000..a334a85d4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test02/golden/test02.log
@@ -0,0 +1,63 @@
+SystemC Simulation
+33
+*** sc_uint_base
+2
+1
+18
+---
+0
+3
+1
+---
+8
+1
+33
+---
+8
+2
+33
+*** sc_uint_bitref
+1
+0
+33
+---
+2
+34
+---
+1
+2
+33
+---
+8
+40
+*** sc_uint_subref
+2
+1
+33
+---
+0
+3
+33
+---
+2
+1
+18
+---
+8
+2
+34
+*** sc_uint_concat
+10
+1
+17
+---
+8
+1
+17
+---
+10
+1
+17
+---
+8
+24
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/concat/test02/test02.cpp
new file mode 100644
index 000000000..fa60cb171
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test02/test02.cpp
@@ -0,0 +1,201 @@
+/*****************************************************************************
+
+ 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: 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 sc_uint's concat operators -- basic functionality, operator , ()
+
+#include "systemc.h"
+
+void
+test_concat( const sc_uint<8>& a )
+{
+ sc_uint<8> b;
+ sc_uint<4> c;
+ sc_uint<4> d;
+
+ cout << a << endl;
+
+ cout << "*** sc_uint_base" << endl;
+
+ ( c, d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = ( d, c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c, d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( c, d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c, d.range( 1, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( c, d.range( 1, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c, ( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( c, ( d[0], d[1] ) );
+ cout << b << endl;
+
+ cout << "*** sc_uint_bitref" << endl;
+
+ ( d[1], c ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( d[1], c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( d[0], d[1] ) = a.range( 1,0 );
+ cout << d << endl;
+
+ b.range( 1, 0 ) = ( d[1], d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( d[0], c.range( 3, 0 ) ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( d[0], c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( d[0], ( d[1], d[2], d[3] ) ) = a.range( 3, 0 );
+ cout << d << endl;
+
+ b.range( 3, 0 ) = ( d[3], ( d[2], d[1], d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_uint_subref" << endl;
+
+ ( c.range( 3, 0 ), d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = ( c.range( 3, 0 ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c.range( 3, 0 ), d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = ( c.range( 3, 0 ), d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c.range( 3, 0 ), d.range( 3, 0 ) ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = ( d.range( 3, 0 ), c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( c.range( 3, 0 ), ( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( c.range( 3, 0 ), ( d[1], d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_uint_concat" << endl;
+
+ ( ( c[1], c[0] ), d ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( ( c[0], c[1] ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( ( c[1], c[0] ), d[0] ) = a.range( 2, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 2, 0 ) = ( ( c[0], c[1] ), d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( ( c[1], c[0] ), d.range( 3, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = ( ( c[0], c[1] ), d.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ ( ( c[0], c[1] ), ( c[2], c[3] ) ) = a.range( 3, 0 );
+ cout << c << endl;
+
+ b.range( 3, 0 ) = ( ( c[3], c[2] ), ( c[1], c[0] ) );
+ cout << b << endl;
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_uint<8> a( 33 );
+
+ test_concat( a );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/concat/test03/golden/test03.log
new file mode 100644
index 000000000..4ab7885d8
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test03/golden/test03.log
@@ -0,0 +1,40 @@
+SystemC Simulation
+6
+3
+7
+11
+
+2
+1
+3
+3
+
+2
+1
+3
+3
+
+6
+3
+7
+11
+
+6
+3
+7
+-5
+
+-2
+1
+-1
+-1
+
+-2
+1
+-1
+-1
+
+6
+3
+7
+-5
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/concat/test03/test03.cpp
new file mode 100644
index 000000000..c1431f6f7
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test03/test03.cpp
@@ -0,0 +1,190 @@
+/*****************************************************************************
+
+ 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: 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 sc_[u]int concatenation with type bool, operator , ()
+
+#include "systemc.h"
+
+#define WRITE(a) \
+ cout << a << endl
+
+int
+sc_main( int, char*[] )
+{
+ bool b;
+
+ // ))) sc_uint (((
+
+ sc_uint<3> ui3 = 3;
+ sc_uint<4> ui4;
+ sc_uint<2> ui2;
+
+ // sc_uint_base
+
+ b = false;
+ ui4 = ( ui3, b );
+ WRITE( ui4 );
+ ui4 = ( b, ui3 );
+ WRITE( ui4 );
+
+ b = true;
+ ui4 = ( ui3, b );
+ WRITE( ui4 );
+ ui4 = ( b, ui3 );
+ WRITE( ui4 );
+
+ // sc_uint_bitref
+
+ cout << endl;
+
+ b = false;
+ ui2 = ( ui3[0], b );
+ WRITE( ui2 );
+ ui2 = ( b, ui3[0] );
+ WRITE( ui2 );
+
+ b = true;
+ ui2 = ( ui3[0], b );
+ WRITE( ui2 );
+ ui2 = ( b, ui3[0] );
+ WRITE( ui2 );
+
+ // sc_uint_subref
+
+ cout << endl;
+
+ b = false;
+ ui2 = ( ui3.range( 0, 0 ), b );
+ WRITE( ui2 );
+ ui2 = ( b, ui3.range( 0, 0 ) );
+ WRITE( ui2 );
+
+ b = true;
+ ui2 = ( ui3.range( 0, 0 ), b );
+ WRITE( ui2 );
+ ui2 = ( b, ui3.range( 0, 0 ) );
+ WRITE( ui2 );
+
+ // sc_uint_concat
+
+ cout << endl;
+
+ b = false;
+ ui4 = ( ( ui3.range( 2, 1 ), ui3[0] ), b );
+ WRITE( ui4 );
+ ui4 = ( b, ( ui3.range( 2, 1 ), ui3[0] ) );
+ WRITE( ui4 );
+
+ b = true;
+ ui4 = ( ( ui3.range( 2, 1 ), ui3[0] ), b );
+ WRITE( ui4 );
+ ui4 = ( b, ( ui3.range( 2, 1 ), ui3[0] ) );
+ WRITE( ui4 );
+
+
+ // ))) sc_int (((
+
+ sc_int<3> i3 = 3;
+ sc_int<4> i4;
+ sc_int<2> i2;
+
+ // sc_int_base
+
+ cout << endl;
+
+ b = false;
+ i4 = ( i3, b );
+ WRITE( i4 );
+ i4 = ( b, i3 );
+ WRITE( i4 );
+
+ b = true;
+ i4 = ( i3, b );
+ WRITE( i4 );
+ i4 = ( b, i3 );
+ WRITE( i4 );
+
+ // sc_int_bitref
+
+ cout << endl;
+
+ b = false;
+ i2 = ( i3[0], b );
+ WRITE( i2 );
+ i2 = ( b, i3[0] );
+ WRITE( i2 );
+
+ b = true;
+ i2 = ( i3[0], b );
+ WRITE( i2 );
+ i2 = ( b, i3[0] );
+ WRITE( i2 );
+
+ // sc_int_subref
+
+ cout << endl;
+
+ b = false;
+ i2 = ( i3.range( 0, 0 ), b );
+ WRITE( i2 );
+ i2 = ( b, i3.range( 0, 0 ) );
+ WRITE( i2 );
+
+ b = true;
+ i2 = ( i3.range( 0, 0 ), b );
+ WRITE( i2 );
+ i2 = ( b, i3.range( 0, 0 ) );
+ WRITE( i2 );
+
+ // sc_int_concat
+
+ cout << endl;
+
+ b = false;
+ i4 = ( ( i3.range( 2, 1 ), i3[0] ), b );
+ WRITE( i4 );
+ i4 = ( b, ( i3.range( 2, 1 ), i3[0] ) );
+ WRITE( i4 );
+
+ b = true;
+ i4 = ( ( i3.range( 2, 1 ), i3[0] ), b );
+ WRITE( i4 );
+ i4 = ( b, ( i3.range( 2, 1 ), i3[0] ) );
+ WRITE( i4 );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test04/golden/test04.log b/src/systemc/tests/systemc/datatypes/int/concat/test04/golden/test04.log
new file mode 100644
index 000000000..d2fa0584e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test04/golden/test04.log
@@ -0,0 +1,63 @@
+SystemC Simulation
+33
+*** sc_int_base
+2
+1
+18
+---
+0
+3
+1
+---
+-8
+1
+33
+---
+-8
+2
+33
+*** sc_int_bitref
+1
+0
+33
+---
+2
+34
+---
+1
+2
+33
+---
+-8
+40
+*** sc_int_subref
+2
+1
+33
+---
+0
+3
+33
+---
+2
+1
+18
+---
+-8
+2
+34
+*** sc_int_concat
+-6
+1
+17
+---
+-8
+1
+17
+---
+-6
+1
+17
+---
+-8
+24
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test04/test04.cpp b/src/systemc/tests/systemc/datatypes/int/concat/test04/test04.cpp
new file mode 100644
index 000000000..e08ecfa43
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test04/test04.cpp
@@ -0,0 +1,201 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test04.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 sc_int's concat operators -- basic functionality, concat()
+
+#include "systemc.h"
+
+void
+test_concat( const sc_int<8>& a )
+{
+ sc_int<8> b;
+ sc_int<4> c;
+ sc_int<4> d;
+
+ cout << a << endl;
+
+ cout << "*** sc_int_base" << endl;
+
+ concat( c, d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = concat( d, c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c, d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( c, d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c, d.range( 1, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( c, d.range( 1, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c, ( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( c, ( d[0], d[1] ) );
+ cout << b << endl;
+
+ cout << "*** sc_int_bitref" << endl;
+
+ concat( d[1], c ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( d[1], c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( d[0], d[1] ) = a.range( 1,0 );
+ cout << d << endl;
+
+ b.range( 1, 0 ) = concat( d[1], d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( d[0], c.range( 3, 0 ) ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( d[0], c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( d[0], concat( concat( d[1], d[2] ), d[3] ) ) = a.range( 3, 0 );
+ cout << d << endl;
+
+ b.range( 3, 0 ) = concat( d[3], concat( concat( d[2], d[1] ), d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_int_subref" << endl;
+
+ concat( c.range( 3, 0 ), d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = concat( c.range( 3, 0 ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c.range( 3, 0 ), d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( c.range( 3, 0 ), d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c.range( 3, 0 ), d.range( 3, 0 ) ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = concat( d.range( 3, 0 ), c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c.range( 3, 0 ), concat( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( c.range( 3, 0 ), concat( d[1], d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_int_concat" << endl;
+
+ concat( concat( c[1], c[0] ), d ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( concat( c[0], c[1] ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( concat( c[1], c[0] ), d[0] ) = a.range( 2, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 2, 0 ) = concat( concat( c[0], c[1] ), d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( concat( c[1], c[0] ), d.range( 3, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( concat( c[0], c[1] ), d.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( concat( c[0], c[1] ), concat( c[2], c[3] ) ) = a.range( 3, 0 );
+ cout << c << endl;
+
+ b.range( 3, 0 ) = concat( concat( c[3], c[2] ), concat( c[1], c[0] ) );
+ cout << b << endl;
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_int<8> a( 33 );
+
+ test_concat( a );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test05/golden/test05.log b/src/systemc/tests/systemc/datatypes/int/concat/test05/golden/test05.log
new file mode 100644
index 000000000..a334a85d4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test05/golden/test05.log
@@ -0,0 +1,63 @@
+SystemC Simulation
+33
+*** sc_uint_base
+2
+1
+18
+---
+0
+3
+1
+---
+8
+1
+33
+---
+8
+2
+33
+*** sc_uint_bitref
+1
+0
+33
+---
+2
+34
+---
+1
+2
+33
+---
+8
+40
+*** sc_uint_subref
+2
+1
+33
+---
+0
+3
+33
+---
+2
+1
+18
+---
+8
+2
+34
+*** sc_uint_concat
+10
+1
+17
+---
+8
+1
+17
+---
+10
+1
+17
+---
+8
+24
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test05/test05.cpp b/src/systemc/tests/systemc/datatypes/int/concat/test05/test05.cpp
new file mode 100644
index 000000000..8d1160f80
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test05/test05.cpp
@@ -0,0 +1,201 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test05.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 sc_uint's concat operators -- basic functionality, concat()
+
+#include "systemc.h"
+
+void
+test_concat( const sc_uint<8>& a )
+{
+ sc_uint<8> b;
+ sc_uint<4> c;
+ sc_uint<4> d;
+
+ cout << a << endl;
+
+ cout << "*** sc_uint_base" << endl;
+
+ concat( c, d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = concat( d, c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c, d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( c, d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c, d.range( 1, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( c, d.range( 1, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c, concat( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( c, concat( d[0], d[1] ) );
+ cout << b << endl;
+
+ cout << "*** sc_uint_bitref" << endl;
+
+ concat( d[1], c ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( d[1], c );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( d[0], d[1] ) = a.range( 1,0 );
+ cout << d << endl;
+
+ b.range( 1, 0 ) = concat( d[1], d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( d[0], c.range( 3, 0 ) ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( d[0], c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( d[0], concat( concat( d[1], d[2] ), d[3] ) ) = a.range( 3, 0 );
+ cout << d << endl;
+
+ b.range( 3, 0 ) = concat( d[3], concat( concat( d[2], d[1] ), d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_uint_subref" << endl;
+
+ concat( c.range( 3, 0 ), d ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = concat( c.range( 3, 0 ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c.range( 3, 0 ), d[1] ) = a.range( 4, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 4, 0 ) = concat( c.range( 3, 0 ), d[1] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c.range( 3, 0 ), d.range( 3, 0 ) ) = a;
+ cout << c << endl;
+ cout << d << endl;
+
+ b = concat( d.range( 3, 0 ), c.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( c.range( 3, 0 ), concat( d[0], d[1] ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( c.range( 3, 0 ), concat( d[1], d[0] ) );
+ cout << b << endl;
+
+ cout << "*** sc_uint_concat" << endl;
+
+ concat( concat( c[1], c[0] ), d ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( concat( c[0], c[1] ), d );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( concat( c[1], c[0] ), d[0] ) = a.range( 2, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 2, 0 ) = concat( concat( c[0], c[1] ), d[0] );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( concat( c[1], c[0] ), d.range( 3, 0 ) ) = a.range( 5, 0 );
+ cout << c << endl;
+ cout << d << endl;
+
+ b.range( 5, 0 ) = concat( concat( c[0], c[1] ), d.range( 3, 0 ) );
+ cout << b << endl;
+
+ cout << "---" << endl;
+
+ concat( concat( c[0], c[1] ), concat( c[2], c[3] ) ) = a.range( 3, 0 );
+ cout << c << endl;
+
+ b.range( 3, 0 ) = concat( concat( c[3], c[2] ), concat( c[1], c[0] ) );
+ cout << b << endl;
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_uint<8> a( 33 );
+
+ test_concat( a );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test06/golden/test06.log b/src/systemc/tests/systemc/datatypes/int/concat/test06/golden/test06.log
new file mode 100644
index 000000000..4ab7885d8
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test06/golden/test06.log
@@ -0,0 +1,40 @@
+SystemC Simulation
+6
+3
+7
+11
+
+2
+1
+3
+3
+
+2
+1
+3
+3
+
+6
+3
+7
+11
+
+6
+3
+7
+-5
+
+-2
+1
+-1
+-1
+
+-2
+1
+-1
+-1
+
+6
+3
+7
+-5
diff --git a/src/systemc/tests/systemc/datatypes/int/concat/test06/test06.cpp b/src/systemc/tests/systemc/datatypes/int/concat/test06/test06.cpp
new file mode 100644
index 000000000..ab8f132b7
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/concat/test06/test06.cpp
@@ -0,0 +1,190 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test06.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 sc_[u]int concatenation with type bool, concat()
+
+#include "systemc.h"
+
+#define WRITE(a) \
+ cout << a << endl
+
+int
+sc_main( int, char*[] )
+{
+ bool b;
+
+ // ))) sc_uint (((
+
+ sc_uint<3> ui3 = 3;
+ sc_uint<4> ui4;
+ sc_uint<2> ui2;
+
+ // sc_uint_base
+
+ b = false;
+ ui4 = concat( ui3, b );
+ WRITE( ui4 );
+ ui4 = concat( b, ui3 );
+ WRITE( ui4 );
+
+ b = true;
+ ui4 = concat( ui3, b );
+ WRITE( ui4 );
+ ui4 = concat( b, ui3 );
+ WRITE( ui4 );
+
+ // sc_uint_bitref
+
+ cout << endl;
+
+ b = false;
+ ui2 = concat( ui3[0], b );
+ WRITE( ui2 );
+ ui2 = concat( b, ui3[0] );
+ WRITE( ui2 );
+
+ b = true;
+ ui2 = concat( ui3[0], b );
+ WRITE( ui2 );
+ ui2 = concat( b, ui3[0] );
+ WRITE( ui2 );
+
+ // sc_uint_subref
+
+ cout << endl;
+
+ b = false;
+ ui2 = concat( ui3.range( 0, 0 ), b );
+ WRITE( ui2 );
+ ui2 = concat( b, ui3.range( 0, 0 ) );
+ WRITE( ui2 );
+
+ b = true;
+ ui2 = concat( ui3.range( 0, 0 ), b );
+ WRITE( ui2 );
+ ui2 = concat( b, ui3.range( 0, 0 ) );
+ WRITE( ui2 );
+
+ // sc_uint_concat
+
+ cout << endl;
+
+ b = false;
+ ui4 = concat( concat( ui3.range( 2, 1 ), ui3[0] ), b );
+ WRITE( ui4 );
+ ui4 = concat( b, concat( ui3.range( 2, 1 ), ui3[0] ) );
+ WRITE( ui4 );
+
+ b = true;
+ ui4 = concat( concat( ui3.range( 2, 1 ), ui3[0] ), b );
+ WRITE( ui4 );
+ ui4 = concat( b, concat( ui3.range( 2, 1 ), ui3[0] ) );
+ WRITE( ui4 );
+
+
+ // ))) sc_int (((
+
+ sc_int<3> i3 = 3;
+ sc_int<4> i4;
+ sc_int<2> i2;
+
+ // sc_int_base
+
+ cout << endl;
+
+ b = false;
+ i4 = concat( i3, b );
+ WRITE( i4 );
+ i4 = concat( b, i3 );
+ WRITE( i4 );
+
+ b = true;
+ i4 = concat( i3, b );
+ WRITE( i4 );
+ i4 = concat( b, i3 );
+ WRITE( i4 );
+
+ // sc_int_bitref
+
+ cout << endl;
+
+ b = false;
+ i2 = concat( i3[0], b );
+ WRITE( i2 );
+ i2 = concat( b, i3[0] );
+ WRITE( i2 );
+
+ b = true;
+ i2 = concat( i3[0], b );
+ WRITE( i2 );
+ i2 = concat( b, i3[0] );
+ WRITE( i2 );
+
+ // sc_int_subref
+
+ cout << endl;
+
+ b = false;
+ i2 = concat( i3.range( 0, 0 ), b );
+ WRITE( i2 );
+ i2 = concat( b, i3.range( 0, 0 ) );
+ WRITE( i2 );
+
+ b = true;
+ i2 = concat( i3.range( 0, 0 ), b );
+ WRITE( i2 );
+ i2 = concat( b, i3.range( 0, 0 ) );
+ WRITE( i2 );
+
+ // sc_int_concat
+
+ cout << endl;
+
+ b = false;
+ i4 = concat( concat( i3.range( 2, 1 ), i3[0] ), b );
+ WRITE( i4 );
+ i4 = concat( b, concat( i3.range( 2, 1 ), i3[0] ) );
+ WRITE( i4 );
+
+ b = true;
+ i4 = concat( concat( i3.range( 2, 1 ), i3[0] ), b );
+ WRITE( i4 );
+ i4 = concat( b, concat( i3.range( 2, 1 ), i3[0] ) );
+ WRITE( i4 );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/golden/test01.log
new file mode 100644
index 000000000..9a94cc73c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/golden/test01.log
@@ -0,0 +1,61 @@
+SystemC Simulation
+*** smaller ***
+5
+10
+5
+10
+
+5
+10
+5
+10
+
+5
+10
+5
+10
+
+5
+10
+5
+10
+*** equal ***
+5
+-6
+5
+-6
+
+5
+10
+5
+10
+
+5
+-6
+5
+-6
+
+5
+10
+5
+10
+*** larger ***
+1
+-2
+1
+-2
+
+1
+2
+1
+2
+
+1
+-2
+1
+-2
+
+1
+2
+1
+2
diff --git a/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/test01.cpp
new file mode 100644
index 000000000..362632fc4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test01/test01.cpp
@@ -0,0 +1,224 @@
+/*****************************************************************************
+
+ 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 assigning sc_bv_base to the integer types
+
+#include "systemc.h"
+
+void
+test_smaller( const sc_bv<4>& bv_one, const sc_bv<4>& bv_two )
+{
+ cout << "*** smaller ***" << endl;
+ {
+ sc_int<8> a( bv_one );
+ sc_int<8> b( bv_two );
+ sc_int<8> c;
+ sc_int<8> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<8> a( bv_one );
+ sc_uint<8> b( bv_two );
+ sc_uint<8> c;
+ sc_uint<8> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<8> a( bv_one );
+ sc_bigint<8> b( bv_two );
+ sc_bigint<8> c;
+ sc_bigint<8> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<8> a( bv_one );
+ sc_biguint<8> b( bv_two );
+ sc_biguint<8> c;
+ sc_biguint<8> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+void
+test_equal( const sc_bv<4>& bv_one, const sc_bv<4>& bv_two )
+{
+ cout << "*** equal ***" << endl;
+ {
+ sc_int<4> a( bv_one );
+ sc_int<4> b( bv_two );
+ sc_int<4> c;
+ sc_int<4> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<4> a( bv_one );
+ sc_uint<4> b( bv_two );
+ sc_uint<4> c;
+ sc_uint<4> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<4> a( bv_one );
+ sc_bigint<4> b( bv_two );
+ sc_bigint<4> c;
+ sc_bigint<4> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<4> a( bv_one );
+ sc_biguint<4> b( bv_two );
+ sc_biguint<4> c;
+ sc_biguint<4> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+void
+test_larger( const sc_bv<4>& bv_one, const sc_bv<4>& bv_two )
+{
+ cout << "*** larger ***" << endl;
+ {
+ sc_int<2> a( bv_one );
+ sc_int<2> b( bv_two );
+ sc_int<2> c;
+ sc_int<2> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<2> a( bv_one );
+ sc_uint<2> b( bv_two );
+ sc_uint<2> c;
+ sc_uint<2> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<2> a( bv_one );
+ sc_bigint<2> b( bv_two );
+ sc_bigint<2> c;
+ sc_bigint<2> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<2> a( bv_one );
+ sc_biguint<2> b( bv_two );
+ sc_biguint<2> c;
+ sc_biguint<2> d;
+ c = bv_one;
+ d = bv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_bv<4> bv_one( "0101" );
+ sc_bv<4> bv_two( "1010" );
+
+ test_smaller( bv_one, bv_two );
+ test_equal( bv_one, bv_two );
+ test_larger( bv_one, bv_two );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/golden/test02.log
new file mode 100644
index 000000000..9a94cc73c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/golden/test02.log
@@ -0,0 +1,61 @@
+SystemC Simulation
+*** smaller ***
+5
+10
+5
+10
+
+5
+10
+5
+10
+
+5
+10
+5
+10
+
+5
+10
+5
+10
+*** equal ***
+5
+-6
+5
+-6
+
+5
+10
+5
+10
+
+5
+-6
+5
+-6
+
+5
+10
+5
+10
+*** larger ***
+1
+-2
+1
+-2
+
+1
+2
+1
+2
+
+1
+-2
+1
+-2
+
+1
+2
+1
+2
diff --git a/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/test02.cpp
new file mode 100644
index 000000000..4b61e5793
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test02/test02.cpp
@@ -0,0 +1,224 @@
+/*****************************************************************************
+
+ 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: 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 assigning sc_lv_base to the integer types
+
+#include "systemc.h"
+
+void
+test_smaller( const sc_lv<4>& lv_one, const sc_lv<4>& lv_two )
+{
+ cout << "*** smaller ***" << endl;
+ {
+ sc_int<8> a( lv_one );
+ sc_int<8> b( lv_two );
+ sc_int<8> c;
+ sc_int<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<8> a( lv_one );
+ sc_uint<8> b( lv_two );
+ sc_uint<8> c;
+ sc_uint<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<8> a( lv_one );
+ sc_bigint<8> b( lv_two );
+ sc_bigint<8> c;
+ sc_bigint<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<8> a( lv_one );
+ sc_biguint<8> b( lv_two );
+ sc_biguint<8> c;
+ sc_biguint<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+void
+test_equal( const sc_lv<4>& lv_one, const sc_lv<4>& lv_two )
+{
+ cout << "*** equal ***" << endl;
+ {
+ sc_int<4> a( lv_one );
+ sc_int<4> b( lv_two );
+ sc_int<4> c;
+ sc_int<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<4> a( lv_one );
+ sc_uint<4> b( lv_two );
+ sc_uint<4> c;
+ sc_uint<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<4> a( lv_one );
+ sc_bigint<4> b( lv_two );
+ sc_bigint<4> c;
+ sc_bigint<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<4> a( lv_one );
+ sc_biguint<4> b( lv_two );
+ sc_biguint<4> c;
+ sc_biguint<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+void
+test_larger( const sc_lv<4>& lv_one, const sc_lv<4>& lv_two )
+{
+ cout << "*** larger ***" << endl;
+ {
+ sc_int<2> a( lv_one );
+ sc_int<2> b( lv_two );
+ sc_int<2> c;
+ sc_int<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<2> a( lv_one );
+ sc_uint<2> b( lv_two );
+ sc_uint<2> c;
+ sc_uint<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<2> a( lv_one );
+ sc_bigint<2> b( lv_two );
+ sc_bigint<2> c;
+ sc_bigint<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<2> a( lv_one );
+ sc_biguint<2> b( lv_two );
+ sc_biguint<2> c;
+ sc_biguint<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_lv<4> lv_one( "0101" );
+ sc_lv<4> lv_two( "1010" );
+
+ test_smaller( lv_one, lv_two );
+ test_equal( lv_one, lv_two );
+ test_larger( lv_one, lv_two );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/golden/test03.log
new file mode 100644
index 000000000..2ecf45e97
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/golden/test03.log
@@ -0,0 +1,205 @@
+SystemC Simulation
+*** smaller ***
+
+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>
+7
+10
+7
+10
+
+
+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>
+7
+10
+7
+10
+
+
+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>
+7
+10
+7
+10
+
+
+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>
+7
+10
+7
+10
+*** equal ***
+
+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>
+7
+-6
+7
+-6
+
+
+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>
+7
+10
+7
+10
+
+
+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>
+7
+-6
+7
+-6
+
+
+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>
+7
+10
+7
+10
+*** larger ***
+
+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>
+-1
+-2
+-1
+-2
+
+
+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>
+3
+2
+3
+2
+
+
+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>
+-1
+-2
+-1
+-2
+
+
+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>
+3
+2
+3
+2
diff --git a/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/test03.cpp
new file mode 100644
index 000000000..d86284851
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/from_bv_lv/test03/test03.cpp
@@ -0,0 +1,224 @@
+/*****************************************************************************
+
+ 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: 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 assigning sc_lv_base to the integer types
+
+#include "systemc.h"
+
+void
+test_smaller( const sc_lv<4>& lv_one, const sc_lv<4>& lv_two )
+{
+ cout << "*** smaller ***" << endl;
+ {
+ sc_int<8> a( lv_one );
+ sc_int<8> b( lv_two );
+ sc_int<8> c;
+ sc_int<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<8> a( lv_one );
+ sc_uint<8> b( lv_two );
+ sc_uint<8> c;
+ sc_uint<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<8> a( lv_one );
+ sc_bigint<8> b( lv_two );
+ sc_bigint<8> c;
+ sc_bigint<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<8> a( lv_one );
+ sc_biguint<8> b( lv_two );
+ sc_biguint<8> c;
+ sc_biguint<8> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+void
+test_equal( const sc_lv<4>& lv_one, const sc_lv<4>& lv_two )
+{
+ cout << "*** equal ***" << endl;
+ {
+ sc_int<4> a( lv_one );
+ sc_int<4> b( lv_two );
+ sc_int<4> c;
+ sc_int<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<4> a( lv_one );
+ sc_uint<4> b( lv_two );
+ sc_uint<4> c;
+ sc_uint<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<4> a( lv_one );
+ sc_bigint<4> b( lv_two );
+ sc_bigint<4> c;
+ sc_bigint<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<4> a( lv_one );
+ sc_biguint<4> b( lv_two );
+ sc_biguint<4> c;
+ sc_biguint<4> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+void
+test_larger( const sc_lv<4>& lv_one, const sc_lv<4>& lv_two )
+{
+ cout << "*** larger ***" << endl;
+ {
+ sc_int<2> a( lv_one );
+ sc_int<2> b( lv_two );
+ sc_int<2> c;
+ sc_int<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_uint<2> a( lv_one );
+ sc_uint<2> b( lv_two );
+ sc_uint<2> c;
+ sc_uint<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_bigint<2> a( lv_one );
+ sc_bigint<2> b( lv_two );
+ sc_bigint<2> c;
+ sc_bigint<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+ cout << endl;
+ {
+ sc_biguint<2> a( lv_one );
+ sc_biguint<2> b( lv_two );
+ sc_biguint<2> c;
+ sc_biguint<2> d;
+ c = lv_one;
+ d = lv_two;
+ cout << a << endl;
+ cout << b << endl;
+ cout << c << endl;
+ cout << d << endl;
+ }
+}
+
+int
+sc_main( int, char*[] )
+{
+ sc_lv<4> lv_one( "01ZX" );
+ sc_lv<4> lv_two( "1010" );
+
+ test_smaller( lv_one, lv_two );
+ test_equal( lv_one, lv_two );
+ test_larger( lv_one, lv_two );
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/misc/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/misc/test01/golden/test01.log
new file mode 100644
index 000000000..8201117d0
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/misc/test01/golden/test01.log
@@ -0,0 +1,45 @@
+SystemC Simulation
+
+*** sc_int ***
+sc_int_concref = sc_signed
+0
+1
+sc_int_concref = sc_unsigned
+0
+-2
+sc_int_concref = sc_bv_base
+0
+-1
+sc_int_concref = sc_lv_base
+1
+0
+sc_int_subref = sc_signed
+16
+sc_int_subref = sc_unsigned
+32
+sc_int_subref = sc_bv_base
+48
+sc_int_subref = sc_lv_base
+64
+
+*** sc_uint ***
+sc_uint_concref = sc_signed
+0
+1
+sc_uint_concref = sc_unsigned
+0
+2
+sc_uint_concref = sc_bv_base
+0
+3
+sc_uint_concref = sc_lv_base
+1
+0
+sc_uint_subref = sc_signed
+16
+sc_uint_subref = sc_unsigned
+32
+sc_uint_subref = sc_bv_base
+48
+sc_uint_subref = sc_lv_base
+64
diff --git a/src/systemc/tests/systemc/datatypes/int/misc/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/misc/test01/test01.cpp
new file mode 100644
index 000000000..dd9f75994
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/misc/test01/test01.cpp
@@ -0,0 +1,140 @@
+/*****************************************************************************
+
+ 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-03-24
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+// test of sc_[u]int_(conc|sub)ref assignment from sc_[un]signed and
+// sc_(bv|lv)_base
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ sc_bigint<4> a = 1;
+ sc_biguint<4> b = 2;
+ sc_bv<4> c = 3;
+ sc_lv<4> d = 4;
+
+ {
+ cout << "\n*** sc_int ***" << endl;
+
+ sc_int<2> e = 0;
+ sc_int<2> f = 0;
+ sc_int<8> g = 0;
+
+ cout << "sc_int_concref = sc_signed" << endl;
+ (e, f) = a;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_int_concref = sc_unsigned" << endl;
+ (e, f) = b;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_int_concref = sc_bv_base" << endl;
+ (e, f) = c;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_int_concref = sc_lv_base" << endl;
+ (e, f) = d;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_int_subref = sc_signed" << endl;
+ g( 7, 4 ) = a;
+ cout << g << endl;
+
+ cout << "sc_int_subref = sc_unsigned" << endl;
+ g( 7, 4 ) = b;
+ cout << g << endl;
+
+ cout << "sc_int_subref = sc_bv_base" << endl;
+ g( 7, 4 ) = c;
+ cout << g << endl;
+
+ cout << "sc_int_subref = sc_lv_base" << endl;
+ g( 7, 4 ) = d;
+ cout << g << endl;
+ }
+
+ {
+ cout << "\n*** sc_uint ***" << endl;
+
+ sc_uint<2> e = 0;
+ sc_uint<2> f = 0;
+ sc_uint<8> g = 0;
+
+ cout << "sc_uint_concref = sc_signed" << endl;
+ (e, f) = a;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_uint_concref = sc_unsigned" << endl;
+ (e, f) = b;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_uint_concref = sc_bv_base" << endl;
+ (e, f) = c;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_uint_concref = sc_lv_base" << endl;
+ (e, f) = d;
+ cout << e << endl;
+ cout << f << endl;
+
+ cout << "sc_uint_subref = sc_signed" << endl;
+ g( 7, 4 ) = a;
+ cout << g << endl;
+
+ cout << "sc_uint_subref = sc_unsigned" << endl;
+ g( 7, 4 ) = b;
+ cout << g << endl;
+
+ cout << "sc_uint_subref = sc_bv_base" << endl;
+ g( 7, 4 ) = c;
+ cout << g << endl;
+
+ cout << "sc_uint_subref = sc_lv_base" << endl;
+ g( 7, 4 ) = d;
+ cout << g << endl;
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/misc/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/misc/test02/golden/test02.log
new file mode 100644
index 000000000..0d934d401
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/misc/test02/golden/test02.log
@@ -0,0 +1,2 @@
+SystemC Simulation
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/int/misc/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/misc/test02/test02.cpp
new file mode 100644
index 000000000..d27e98062
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/misc/test02/test02.cpp
@@ -0,0 +1,128 @@
+#include "systemc.h"
+
+
+inline void dump(sc_signed& value)
+{
+ sc_digit* ptr = value.get_raw();
+ printf(" %08x_%08x_%08x_%08x\n",
+ (int)ptr[3], (int)ptr[2], (int)ptr[1], (int)ptr[0]);
+ cout << " " << value << endl;
+}
+
+inline void dump(sc_unsigned& value)
+{
+ sc_digit* ptr = value.get_raw();
+ printf(" %08x_%08x_%08x_%08x\n",
+ (int)ptr[3], (int)ptr[2], (int)ptr[1], (int)ptr[0]);
+ cout << " " << value << endl;
+}
+
+#define PARSE( SUBJECT ) \
+{ \
+ src_p = SUBJECT; \
+ cout << endl << #SUBJECT << ":" << endl; \
+ svalue = src_p; \
+ dump(svalue); \
+ cout << endl; \
+ value = src_p; \
+ dump(value); \
+}
+#define TEST(SUBJECT,EXPECTED) \
+{ \
+ value = SUBJECT; \
+ if ( value.to_uint64() != EXPECTED ) \
+ { \
+ printf("%s(%d): %s: %llx != %llx\n", \
+ __FILE__, __LINE__, SUBJECT, value.to_uint64(), (uint64)EXPECTED);\
+ } \
+}
+
+#define TESTs64(SUBJECT,EXPECTED) \
+{ \
+ svalue64 = SUBJECT; \
+ if ( svalue64 != (long long)EXPECTED ) \
+ { \
+ printf("%s(%d): %s: %llx != %llx\n", \
+ __FILE__, __LINE__, SUBJECT, value.to_uint64(), (uint64)EXPECTED);\
+ }\
+}
+
+#define TESTu64(SUBJECT,EXPECTED) \
+{ \
+ uvalue64 = SUBJECT; \
+ if ( uvalue64 != EXPECTED ) \
+ { \
+ printf("%s(%d): %s: %llx != %llx\n", \
+ __FILE__, __LINE__, SUBJECT, value.to_uint64(), (uint64)EXPECTED);\
+ }\
+}
+
+
+int sc_main(int, char**)
+{
+ char buffer[128];
+ unsigned long long expected;
+ sc_bigint<120> svalue;
+ sc_int<64> svalue64;
+ sc_uint<64> uvalue64;
+ sc_biguint<120> value;
+
+
+ TESTs64("0xusffffffff", 0xffffffff);
+ TESTs64("0xusffffffff", 0xffffffff);
+ TESTs64("0xusfffffff", 0xfffffff);
+ TESTs64("0XUSfedcab876543210", 0xfedcab876543210ull);
+ TESTs64("0ous77777777", 077777777);
+ TESTs64("0ous77777777", 077777777);
+ TESTs64("0Ous7654321076543", 07654321076543ull);
+ TESTs64("55555555555555", 55555555555555ull);
+ TESTs64("0bus1100110011001100", 0xcccc);
+ TESTs64("0bus1111111011011100101110101001100001110110010101000011001000010000",
+ 0xfedcba9876543210ll);
+
+ TESTu64("0xusffffffff", 0xffffffff);
+ TESTu64("0xusffffffff", 0xffffffff);
+ TESTu64("0xusfffffff", 0xfffffff);
+ TESTu64("0XUSfedcab876543210", 0xfedcab876543210ull);
+ TESTu64("0ous77777777", 077777777);
+ TESTu64("0ous77777777", 077777777);
+ TESTu64("0Ous7654321076543", 07654321076543ull);
+ TESTu64("55555555555555", 55555555555555ull);
+ TESTu64("0bus1100110011001100", 0xcccc);
+ TESTu64("0bus1111111011011100101110101001100001110110010101000011001000010000",
+ 0xfedcba9876543210ll);
+ for ( int i = 0; i < 60; i++ )
+ {
+ for ( int j = 0; j < 16; j++ )
+ {
+ expected = j;
+ expected = expected << i;
+ sprintf(buffer, "0Xus%llx", expected);
+ TEST(buffer, expected);
+ TESTs64(buffer, expected);
+ TESTu64(buffer, expected);
+ sprintf(buffer, "0ous%llo", expected);
+ TEST(buffer, expected);
+ TESTs64(buffer, expected);
+ TESTu64(buffer, expected);
+ sprintf(buffer, "%lld", expected);
+ TEST(buffer, expected);
+ TESTs64(buffer, expected);
+ TESTu64(buffer, expected);
+ }
+ }
+ TEST("0xusffffffff", 0xffffffff);
+ TEST("0xusffffffff", 0xffffffff);
+ TEST("0xusfffffff", 0xfffffff);
+ TEST("0XUSfedcab876543210", 0xfedcab876543210ull);
+ TEST("0ous77777777", 077777777);
+ TEST("0ous77777777", 077777777);
+ TEST("0Ous7654321076543", 07654321076543ull);
+ TEST("55555555555555", 55555555555555ull);
+ TEST("0bus1100110011001100", 0xcccc);
+ TEST("0bus1111111011011100101110101001100001110110010101000011001000010000",
+ 0xfedcba9876543210ll);
+
+ cerr << "Program completed" << endl;
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/misc/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/misc/test03/golden/test03.log
new file mode 100644
index 000000000..3d586cecc
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/misc/test03/golden/test03.log
@@ -0,0 +1,21 @@
+SystemC Simulation
+BI(3,0).to_int() = 15
+BI(3,0).to_uint() = 15
+BI(3,0).to_int64() = 15
+BI(3,0).to_uint64() = 15
+BI(3,0).to_double() = 15
+I(3,0).to_int() = 15
+I(3,0).to_uint() = 15
+I(3,0).to_int64() = 15
+I(3,0).to_uint64() = 15
+I(3,0).to_double() = 15
+UI(3,0).to_int() = 15
+UI(3,0).to_uint() = 15
+UI(3,0).to_int64() = 15
+UI(3,0).to_uint64() = 15
+UI(3,0).to_double() = 15
+UBI(3,0).to_int() = 15
+UBI(3,0).to_uint() = 15
+UBI(3,0).to_int64() = 15
+UBI(3,0).to_uint64() = 15
+UBI(3,0).to_double() = 15
diff --git a/src/systemc/tests/systemc/datatypes/int/misc/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/misc/test03/test03.cpp
new file mode 100644
index 000000000..13f4af2d9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/misc/test03/test03.cpp
@@ -0,0 +1,34 @@
+#include "systemc.h"
+
+#define TEST(EXP) cout << #EXP << " = " << EXP << endl;
+int
+sc_main( int argc, char* argv[] )
+{
+ sc_bigint<8> BI = 0xff;
+ sc_int<8> I = BI;
+ sc_uint<8> UI = BI;
+ sc_biguint<8> UBI = BI;
+
+TEST(BI(3,0).to_int())
+TEST(BI(3,0).to_uint())
+TEST(BI(3,0).to_int64())
+TEST(BI(3,0).to_uint64())
+TEST(BI(3,0).to_double())
+TEST(I(3,0).to_int())
+TEST(I(3,0).to_uint())
+TEST(I(3,0).to_int64())
+TEST(I(3,0).to_uint64())
+TEST(I(3,0).to_double())
+TEST(UI(3,0).to_int())
+TEST(UI(3,0).to_uint())
+TEST(UI(3,0).to_int64())
+TEST(UI(3,0).to_uint64())
+TEST(UI(3,0).to_double())
+TEST(UBI(3,0).to_int())
+TEST(UBI(3,0).to_uint())
+TEST(UBI(3,0).to_int64())
+TEST(UBI(3,0).to_uint64())
+TEST(UBI(3,0).to_double())
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/golden/test01.log
new file mode 100644
index 000000000..fc31d05d2
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/golden/test01.log
@@ -0,0 +1,325 @@
+SystemC Simulation
+
+bu01 = 101 : 0000000000000000000000000000000000000000000000000000000000000001 : 1
+bu02 = 101 : 0000000000000000000000000000000000000000000000000000000000000001 : 1
+bu03 = 101 : 0000000000000000000000000000000000000000000000000000000000000101 : 5
+bu04 = 101 : 0000000000000000000000000000000000000000000000000000000000000101 : 5
+bu05 = 101 : 0000000000000000000000000000000000000000000000000000000000000101 : 5
+bu06 = 101 : 0000000000000000000000000000000000000000000000000000000000100101 : 25
+bu07 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu08 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu09 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu10 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu11 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu12 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu13 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu14 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu15 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu16 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu17 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu18 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu19 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu20 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu21 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu22 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu23 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu24 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu25 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu26 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu27 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu28 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu29 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu30 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu31 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu32 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu33 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu34 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu35 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu36 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu37 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu38 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu39 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu40 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu41 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu42 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu43 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu44 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu45 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu46 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu47 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu48 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu49 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu50 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu51 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu52 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu53 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu54 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu55 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu56 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu57 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu58 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu59 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu60 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu61 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu62 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu63 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+bu64 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65
+
+bu01 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu02 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu03 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu04 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000001000 : 8
+bu05 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000011000 : 18
+bu06 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000111000 : 38
+bu07 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000001111000 : 78
+bu08 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000001111000 : 78
+bu09 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000101111000 : 178
+bu10 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378
+bu11 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378
+bu12 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378
+bu13 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378
+bu14 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000010001101111000 : 2378
+bu15 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000010001101111000 : 2378
+bu16 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000001010001101111000 : a378
+bu17 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000001010001101111000 : a378
+bu18 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000001010001101111000 : a378
+bu19 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000001001010001101111000 : 4a378
+bu20 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000001001010001101111000 : 4a378
+bu21 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000001001010001101111000 : 4a378
+bu22 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000001001001010001101111000 : 24a378
+bu23 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000001001001010001101111000 : 24a378
+bu24 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000101001001010001101111000 : a4a378
+bu25 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000001101001001010001101111000 : 1a4a378
+bu26 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000011101001001010001101111000 : 3a4a378
+bu27 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000111101001001010001101111000 : 7a4a378
+bu28 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378
+bu29 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378
+bu30 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378
+bu31 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378
+bu32 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378
+bu33 = 11111110110111001011101010011000 : 0000000000000000000000000000000100001111101001001010001101111000 : 10fa4a378
+bu34 = 11111110110111001011101010011000 : 0000000000000000000000000000001100001111101001001010001101111000 : 30fa4a378
+bu35 = 11111110110111001011101010011000 : 0000000000000000000000000000011100001111101001001010001101111000 : 70fa4a378
+bu36 = 11111110110111001011101010011000 : 0000000000000000000000000000011100001111101001001010001101111000 : 70fa4a378
+bu37 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378
+bu38 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378
+bu39 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378
+bu40 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378
+bu41 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378
+bu42 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378
+bu43 = 11111110110111001011101010011000 : 0000000000000000000001000001011100001111101001001010001101111000 : 4170fa4a378
+bu44 = 11111110110111001011101010011000 : 0000000000000000000011000001011100001111101001001010001101111000 : c170fa4a378
+bu45 = 11111110110111001011101010011000 : 0000000000000000000111000001011100001111101001001010001101111000 : 1c170fa4a378
+bu46 = 11111110110111001011101010011000 : 0000000000000000000111000001011100001111101001001010001101111000 : 1c170fa4a378
+bu47 = 11111110110111001011101010011000 : 0000000000000000010111000001011100001111101001001010001101111000 : 5c170fa4a378
+bu48 = 11111110110111001011101010011000 : 0000000000000000010111000001011100001111101001001010001101111000 : 5c170fa4a378
+bu49 = 11111110110111001011101010011000 : 0000000000000001010111000001011100001111101001001010001101111000 : 15c170fa4a378
+bu50 = 11111110110111001011101010011000 : 0000000000000001010111000001011100001111101001001010001101111000 : 15c170fa4a378
+bu51 = 11111110110111001011101010011000 : 0000000000000101010111000001011100001111101001001010001101111000 : 55c170fa4a378
+bu52 = 11111110110111001011101010011000 : 0000000000000101010111000001011100001111101001001010001101111000 : 55c170fa4a378
+bu53 = 11111110110111001011101010011000 : 0000000000000101010111000001011100001111101001001010001101111000 : 55c170fa4a378
+bu54 = 11111110110111001011101010011000 : 0000000000100101010111000001011100001111101001001010001101111000 : 255c170fa4a378
+bu55 = 11111110110111001011101010011000 : 0000000001100101010111000001011100001111101001001010001101111000 : 655c170fa4a378
+bu56 = 11111110110111001011101010011000 : 0000000001100101010111000001011100001111101001001010001101111000 : 655c170fa4a378
+bu57 = 11111110110111001011101010011000 : 0000000001100101010111000001011100001111101001001010001101111000 : 655c170fa4a378
+bu58 = 11111110110111001011101010011000 : 0000001001100101010111000001011100001111101001001010001101111000 : 2655c170fa4a378
+bu59 = 11111110110111001011101010011000 : 0000011001100101010111000001011100001111101001001010001101111000 : 6655c170fa4a378
+bu60 = 11111110110111001011101010011000 : 0000011001100101010111000001011100001111101001001010001101111000 : 6655c170fa4a378
+bu61 = 11111110110111001011101010011000 : 0000011001100101010111000001011100001111101001001010001101111000 : 6655c170fa4a378
+bu62 = 11111110110111001011101010011000 : 0010011001100101010111000001011100001111101001001010001101111000 : 26655c170fa4a378
+bu63 = 11111110110111001011101010011000 : 0110011001100101010111000001011100001111101001001010001101111000 : 66655c170fa4a378
+bu64 = 11111110110111001011101010011000 : 0110011001100101010111000001011100001111101001001010001101111000 : 66655c170fa4a378
+
+bu01 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000001 : 1
+bu02 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000011 : 3
+bu03 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7
+bu04 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7
+bu05 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7
+bu06 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7
+bu07 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000001000111 : 47
+bu08 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000011000111 : c7
+bu09 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7
+bu10 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7
+bu11 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7
+bu12 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7
+bu13 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000001000111000111 : 11c7
+bu14 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000011000111000111 : 31c7
+bu15 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7
+bu16 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7
+bu17 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7
+bu18 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7
+bu19 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000001000111000111000111 : 471c7
+bu20 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000011000111000111000111 : c71c7
+bu21 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7
+bu22 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7
+bu23 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7
+bu24 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7
+bu25 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000001000111000111000111000111 : 11c71c7
+bu26 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000011000111000111000111000111 : 31c71c7
+bu27 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7
+bu28 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7
+bu29 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7
+bu30 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7
+bu31 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000001000111000111000111000111000111 : 471c71c7
+bu32 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000011000111000111000111000111000111 : c71c71c7
+bu33 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7
+bu34 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7
+bu35 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7
+bu36 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7
+bu37 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000001000111000111000111000111000111000111 : 11c71c71c7
+bu38 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000011000111000111000111000111000111000111 : 31c71c71c7
+bu39 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7
+bu40 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7
+bu41 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7
+bu42 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7
+bu43 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000001000111000111000111000111000111000111000111 : 471c71c71c7
+bu44 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000011000111000111000111000111000111000111000111 : c71c71c71c7
+bu45 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7
+bu46 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7
+bu47 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7
+bu48 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7
+bu49 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000001000111000111000111000111000111000111000111000111 : 11c71c71c71c7
+bu50 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000011000111000111000111000111000111000111000111000111 : 31c71c71c71c7
+bu51 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7
+bu52 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7
+bu53 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7
+bu54 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7
+bu55 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000001000111000111000111000111000111000111000111000111000111 : 471c71c71c71c7
+bu56 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000011000111000111000111000111000111000111000111000111000111 : c71c71c71c71c7
+bu57 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7
+bu58 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7
+bu59 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7
+bu60 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7
+bu61 = 1111111111111111111111111111111111111111111111111111111111111111 : 0001000111000111000111000111000111000111000111000111000111000111 : 11c71c71c71c71c7
+bu62 = 1111111111111111111111111111111111111111111111111111111111111111 : 0011000111000111000111000111000111000111000111000111000111000111 : 31c71c71c71c71c7
+bu63 = 1111111111111111111111111111111111111111111111111111111111111111 : 0111000111000111000111000111000111000111000111000111000111000111 : 71c71c71c71c71c7
+bu64 = 1111111111111111111111111111111111111111111111111111111111111111 : 0111000111000111000111000111000111000111000111000111000111000111 : 71c71c71c71c71c7
+
+bu01 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu02 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu03 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu04 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu05 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10
+bu06 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10
+bu07 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10
+bu08 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10
+bu09 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110
+bu10 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110
+bu11 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110
+bu12 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110
+bu13 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110
+bu14 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000010000100010000 : 2110
+bu15 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000010000100010000 : 2110
+bu16 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000001010000100010000 : a110
+bu17 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000001010000100010000 : a110
+bu18 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000101010000100010000 : 2a110
+bu19 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000001101010000100010000 : 6a110
+bu20 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000001101010000100010000 : 6a110
+bu21 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000001101010000100010000 : 6a110
+bu22 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000001001101010000100010000 : 26a110
+bu23 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000011001101010000100010000 : 66a110
+bu24 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000011001101010000100010000 : 66a110
+bu25 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000001011001101010000100010000 : 166a110
+bu26 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000001011001101010000100010000 : 166a110
+bu27 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000001011001101010000100010000 : 166a110
+bu28 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000001001011001101010000100010000 : 966a110
+bu29 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000011001011001101010000100010000 : 1966a110
+bu30 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110
+bu31 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110
+bu32 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110
+bu33 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110
+bu34 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000001000111001011001101010000100010000 : 23966a110
+bu35 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110
+bu36 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110
+bu37 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110
+bu38 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110
+bu39 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000100011000111001011001101010000100010000 : 463966a110
+bu40 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000100011000111001011001101010000100010000 : 463966a110
+bu41 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000100011000111001011001101010000100010000 : 463966a110
+bu42 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000100100011000111001011001101010000100010000 : 2463966a110
+bu43 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000001100100011000111001011001101010000100010000 : 6463966a110
+bu44 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000001100100011000111001011001101010000100010000 : 6463966a110
+bu45 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000001100100011000111001011001101010000100010000 : 6463966a110
+bu46 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000001001100100011000111001011001101010000100010000 : 26463966a110
+bu47 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110
+bu48 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110
+bu49 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110
+bu50 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110
+bu51 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000100011001100100011000111001011001101010000100010000 : 466463966a110
+bu52 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000100011001100100011000111001011001101010000100010000 : 466463966a110
+bu53 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000100011001100100011000111001011001101010000100010000 : 466463966a110
+bu54 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000100100011001100100011000111001011001101010000100010000 : 2466463966a110
+bu55 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000100100011001100100011000111001011001101010000100010000 : 2466463966a110
+bu56 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000010100100011001100100011000111001011001101010000100010000 : a466463966a110
+bu57 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000110100100011001100100011000111001011001101010000100010000 : 1a466463966a110
+bu58 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000001110100100011001100100011000111001011001101010000100010000 : 3a466463966a110
+bu59 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000001110100100011001100100011000111001011001101010000100010000 : 3a466463966a110
+bu60 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000101110100100011001100100011000111001011001101010000100010000 : ba466463966a110
+bu61 = 1111111011011100101110101001100001110110010101000011001000010000 : 0001101110100100011001100100011000111001011001101010000100010000 : 1ba466463966a110
+bu62 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110
+bu63 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110
+bu64 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110
+bu64 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110
+bu64 = 111111011011100101110101001100001110110010101000011001000010000 : 1011101110100100011001100100011000111001011001101010000100010000 : bba466463966a110
+bu64 = 11111011011100101110101001100001110110010101000011001000010000 : 0111101110100100011001100100011000111001011001101010000100010000 : 7ba466463966a110
+bu64 = 1111011011100101110101001100001110110010101000011001000010000 : 1101101110100100011001100100011000111001011001101010000100010000 : dba466463966a110
+bu64 = 111011011100101110101001100001110110010101000011001000010000 : 1100101110100100011001100100011000111001011001101010000100010000 : cba466463966a110
+bu64 = 11011011100101110101001100001110110010101000011001000010000 : 1110001110100100011001100100011000111001011001101010000100010000 : e3a466463966a110
+bu64 = 1011011100101110101001100001110110010101000011001000010000 : 1111111110100100011001100100011000111001011001101010000100010000 : ffa466463966a110
+bu64 = 011011100101110101001100001110110010101000011001000010000 : 1011010110100100011001100100011000111001011001101010000100010000 : b5a466463966a110
+bu64 = 11011100101110101001100001110110010101000011001000010000 : 1011010110100100011001100100011000111001011001101010000100010000 : b5a466463966a110
+bu64 = 1011100101110101001100001110110010101000011001000010000 : 1111111100100100011001100100011000111001011001101010000100010000 : ff2466463966a110
+bu64 = 011100101110101001100001110110010101000011001000010000 : 0110110011100100011001100100011000111001011001101010000100010000 : 6ce466463966a110
+bu64 = 11100101110101001100001110110010101000011001000010000 : 0110110011100100011001100100011000111001011001101010000100010000 : 6ce466463966a110
+bu64 = 1100101110101001100001110110010101000011001000010000 : 1001000111010100011001100100011000111001011001101010000100010000 : 91d466463966a110
+bu64 = 100101110101001100001110110010101000011001000010000 : 0111101111101100011001100100011000111001011001101010000100010000 : 7bec66463966a110
+bu64 = 00101110101001100001110110010101000011001000010000 : 1100011010001000011001100100011000111001011001101010000100010000 : c68866463966a110
+bu64 = 0101110101001100001110110010101000011001000010000 : 1100011010001000011001100100011000111001011001101010000100010000 : c68866463966a110
+bu64 = 101110101001100001110110010101000011001000010000 : 1100011010001000011001100100011000111001011001101010000100010000 : c68866463966a110
+bu64 = 01110101001100001110110010101000011001000010000 : 0110110100000001111001100100011000111001011001101010000100010000 : 6d01e6463966a110
+bu64 = 1110101001100001110110010101000011001000010000 : 0110110100000001111001100100011000111001011001101010000100010000 : 6d01e6463966a110
+bu64 = 110101001100001110110010101000011001000010000 : 0110000111011111010001100100011000111001011001101010000100010000 : 61df46463966a110
+bu64 = 10101001100001110110010101000011001000010000 : 0110000011000010001101100100011000111001011001101010000100010000 : 60c236463966a110
+bu64 = 0101001100001110110010101000011001000010000 : 1111101000111111010011100100011000111001011001101010000100010000 : fa3f4e463966a110
+bu64 = 101001100001110110010101000011001000010000 : 1111101000111111010011100100011000111001011001101010000100010000 : fa3f4e463966a110
+bu64 = 01001100001110110010101000011001000010000 : 1011011010101001100001000100011000111001011001101010000100010000 : b6a984463966a110
+bu64 = 1001100001110110010101000011001000010000 : 1011011010101001100001000100011000111001011001101010000100010000 : b6a984463966a110
+bu64 = 001100001110110010101000011001000010000 : 0101011101000100001011011100011000111001011001101010000100010000 : 57442dc63966a110
+bu64 = 01100001110110010101000011001000010000 : 0101011101000100001011011100011000111001011001101010000100010000 : 57442dc63966a110
+bu64 = 1100001110110010101000011001000010000 : 0101011101000100001011011100011000111001011001101010000100010000 : 57442dc63966a110
+bu64 = 100001110110010101000011001000010000 : 1010001111111000100011101011011000111001011001101010000100010000 : a3f88eb63966a110
+bu64 = 00001110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110
+bu64 = 0001110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110
+bu64 = 001110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110
+bu64 = 01110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110
+bu64 = 1110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110
+bu64 = 110110010101000011001000010000 : 0011000111111100000100001110001111111001011001101010000100010000 : 31fc10e3f966a110
+bu64 = 10110010101000011001000010000 : 1100010010001001111110010001100101011001011001101010000100010000 : c489f9195966a110
+bu64 = 0110010101000011001000010000 : 1000011001100100111101101011100001001001011001101010000100010000 : 8664f6b84966a110
+bu64 = 110010101000011001000010000 : 1000011001100100111101101011100001001001011001101010000100010000 : 8664f6b84966a110
+bu64 = 10010101000011001000010000 : 1010100110011100111010011110010101100101011001101010000100010000 : a99ce9e56566a110
+bu64 = 0010101000011001000010000 : 1001001110001000111010001001110100011011011001101010000100010000 : 9388e89d1b66a110
+bu64 = 010101000011001000010000 : 1001001110001000111010001001110100011011011001101010000100010000 : 9388e89d1b66a110
+bu64 = 10101000011001000010000 : 1001001110001000111010001001110100011011011001101010000100010000 : 9388e89d1b66a110
+bu64 = 0101000011001000010000 : 0111100110101000000111101110001001101001001001101010000100010000 : 79a81ee26926a110
+bu64 = 101000011001000010000 : 0111100110101000000111101110001001101001001001101010000100010000 : 79a81ee26926a110
+bu64 = 01000011001000010000 : 0000110111100000110000001011010100000110000101101010000100010000 : de0c0b50616a110
+bu64 = 1000011001000010000 : 0000110111100000110000001011010100000110000101101010000100010000 : de0c0b50616a110
+bu64 = 000011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110
+bu64 = 00011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110
+bu64 = 0011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110
+bu64 = 011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110
+bu64 = 11001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110
+bu64 = 1001000010000 : 0000000000000000000000001110100100010000010000000000000100010000 : e910400110
+bu64 = 001000010000 : 0000000000000000000000000000000000111011100110101111000100010000 : 3b9af110
+bu64 = 01000010000 : 0000000000000000000000000000000000111011100110101111000100010000 : 3b9af110
+bu64 = 1000010000 : 0000000000000000000000000000000000111011100110101111000100010000 : 3b9af110
+bu64 = 000010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710
+bu64 = 00010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710
+bu64 = 0010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710
+bu64 = 010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710
+bu64 = 10000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710
+bu64 = 0000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu64 = 000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu64 = 00 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
+bu64 = 0 : 0000000000000000000000000000000000000000000000000000000000000000 : 0
diff --git a/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/test01.cpp
new file mode 100644
index 000000000..8f6e8186c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test01/test01.cpp
@@ -0,0 +1,177 @@
+#include "systemc.h"
+
+#define TEST_VAR(var, v) \
+ var = v; \
+ sprintf(buffer, "%16llx", var.to_uint64()); \
+ bv64 = var; \
+ cout << #var << " = " << v << " : " << bv64 << " : " << buffer << endl;
+
+#define TEST(v) \
+ cout << endl; \
+ TEST_VAR( bu01, v ); \
+ TEST_VAR( bu02, v ); \
+ TEST_VAR( bu03, v ); \
+ TEST_VAR( bu04, v ); \
+ TEST_VAR( bu05, v ); \
+ TEST_VAR( bu06, v ); \
+ TEST_VAR( bu07, v ); \
+ TEST_VAR( bu08, v ); \
+ TEST_VAR( bu09, v ); \
+ TEST_VAR( bu10, v ); \
+ TEST_VAR( bu11, v ); \
+ TEST_VAR( bu12, v ); \
+ TEST_VAR( bu13, v ); \
+ TEST_VAR( bu14, v ); \
+ TEST_VAR( bu15, v ); \
+ TEST_VAR( bu16, v ); \
+ TEST_VAR( bu17, v ); \
+ TEST_VAR( bu18, v ); \
+ TEST_VAR( bu19, v ); \
+ TEST_VAR( bu20, v ); \
+ TEST_VAR( bu21, v ); \
+ TEST_VAR( bu22, v ); \
+ TEST_VAR( bu23, v ); \
+ TEST_VAR( bu24, v ); \
+ TEST_VAR( bu25, v ); \
+ TEST_VAR( bu26, v ); \
+ TEST_VAR( bu27, v ); \
+ TEST_VAR( bu28, v ); \
+ TEST_VAR( bu29, v ); \
+ TEST_VAR( bu30, v ); \
+ TEST_VAR( bu31, v ); \
+ TEST_VAR( bu32, v ); \
+ TEST_VAR( bu33, v ); \
+ TEST_VAR( bu34, v ); \
+ TEST_VAR( bu35, v ); \
+ TEST_VAR( bu36, v ); \
+ TEST_VAR( bu37, v ); \
+ TEST_VAR( bu38, v ); \
+ TEST_VAR( bu39, v ); \
+ TEST_VAR( bu40, v ); \
+ TEST_VAR( bu41, v ); \
+ TEST_VAR( bu42, v ); \
+ TEST_VAR( bu43, v ); \
+ TEST_VAR( bu44, v ); \
+ TEST_VAR( bu45, v ); \
+ TEST_VAR( bu46, v ); \
+ TEST_VAR( bu47, v ); \
+ TEST_VAR( bu48, v ); \
+ TEST_VAR( bu49, v ); \
+ TEST_VAR( bu50, v ); \
+ TEST_VAR( bu51, v ); \
+ TEST_VAR( bu52, v ); \
+ TEST_VAR( bu53, v ); \
+ TEST_VAR( bu54, v ); \
+ TEST_VAR( bu55, v ); \
+ TEST_VAR( bu56, v ); \
+ TEST_VAR( bu57, v ); \
+ TEST_VAR( bu58, v ); \
+ TEST_VAR( bu59, v ); \
+ TEST_VAR( bu60, v ); \
+ TEST_VAR( bu61, v ); \
+ TEST_VAR( bu62, v ); \
+ TEST_VAR( bu63, v ); \
+ TEST_VAR( bu64, v );
+
+int sc_main(int argc, char* argv[])
+{
+ char buffer[256];
+ sc_biguint<1> bu01;
+ sc_biguint<2> bu02;
+ sc_biguint<3> bu03;
+ sc_biguint<4> bu04;
+ sc_biguint<5> bu05;
+ sc_biguint<6> bu06;
+ sc_biguint<7> bu07;
+ sc_biguint<8> bu08;
+ sc_biguint<9> bu09;
+ sc_biguint<10> bu10;
+ sc_biguint<11> bu11;
+ sc_biguint<12> bu12;
+ sc_biguint<13> bu13;
+ sc_biguint<14> bu14;
+ sc_biguint<15> bu15;
+ sc_biguint<16> bu16;
+ sc_biguint<17> bu17;
+ sc_biguint<18> bu18;
+ sc_biguint<19> bu19;
+ sc_biguint<20> bu20;
+ sc_biguint<21> bu21;
+ sc_biguint<22> bu22;
+ sc_biguint<23> bu23;
+ sc_biguint<24> bu24;
+ sc_biguint<25> bu25;
+ sc_biguint<26> bu26;
+ sc_biguint<27> bu27;
+ sc_biguint<28> bu28;
+ sc_biguint<29> bu29;
+ sc_biguint<30> bu30;
+ sc_biguint<31> bu31;
+ sc_biguint<32> bu32;
+ sc_biguint<33> bu33;
+ sc_biguint<34> bu34;
+ sc_biguint<35> bu35;
+ sc_biguint<36> bu36;
+ sc_biguint<37> bu37;
+ sc_biguint<38> bu38;
+ sc_biguint<39> bu39;
+ sc_biguint<40> bu40;
+ sc_biguint<41> bu41;
+ sc_biguint<42> bu42;
+ sc_biguint<43> bu43;
+ sc_biguint<44> bu44;
+ sc_biguint<45> bu45;
+ sc_biguint<46> bu46;
+ sc_biguint<47> bu47;
+ sc_biguint<48> bu48;
+ sc_biguint<49> bu49;
+ sc_biguint<50> bu50;
+ sc_biguint<51> bu51;
+ sc_biguint<52> bu52;
+ sc_biguint<53> bu53;
+ sc_biguint<54> bu54;
+ sc_biguint<55> bu55;
+ sc_biguint<56> bu56;
+ sc_biguint<57> bu57;
+ sc_biguint<58> bu58;
+ sc_biguint<59> bu59;
+ sc_biguint<60> bu60;
+ sc_biguint<61> bu61;
+ sc_biguint<62> bu62;
+ sc_biguint<63> bu63;
+ sc_biguint<64> bu64;
+
+ sc_bv<64> bv64;
+
+ int i;
+
+ char values[] = "1111"
+ "1110"
+ "1101"
+ "1100"
+ "1011"
+ "1010"
+ "1001"
+ "1000"
+ "0111"
+ "0110"
+ "0101"
+ "0100"
+ "0011"
+ "0010"
+ "0001"
+ "0000";
+ TEST("101");
+
+ TEST( "11111110110111001011101010011000" );
+ TEST( "1111111111111111111111111111111111111111111111111111111111111111" );
+
+ TEST( values );
+
+ for ( i = 0; i < (int)strlen(values); i++ )
+ {
+ TEST_VAR( bu64, &values[i]);
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/golden/test02.log
new file mode 100644
index 000000000..3d6d01c1d
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/golden/test02.log
@@ -0,0 +1,325 @@
+SystemC Simulation
+
+bi01 = 101 : 1111111111111111111111111111111111111111111111111111111111111111 : ffffffffffffffff : -1
+bi02 = 101 : 0000000000000000000000000000000000000000000000000000000000000001 : 1 : 1
+bi03 = 101 : 1111111111111111111111111111111111111111111111111111111111111101 : fffffffffffffffd : -3
+bi04 = 101 : 0000000000000000000000000000000000000000000000000000000000000101 : 5 : 5
+bi05 = 101 : 0000000000000000000000000000000000000000000000000000000000000101 : 5 : 5
+bi06 = 101 : 1111111111111111111111111111111111111111111111111111111111100101 : ffffffffffffffe5 : -27
+bi07 = 101 : 1111111111111111111111111111111111111111111111111111111111100101 : ffffffffffffffe5 : -27
+bi08 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi09 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi10 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi11 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi12 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi13 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi14 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi15 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi16 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi17 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi18 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi19 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi20 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi21 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi22 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi23 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi24 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi25 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi26 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi27 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi28 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi29 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi30 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi31 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi32 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi33 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi34 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi35 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi36 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi37 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi38 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi39 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi40 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi41 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi42 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi43 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi44 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi45 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi46 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi47 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi48 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi49 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi50 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi51 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi52 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi53 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi54 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi55 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi56 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi57 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi58 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi59 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi60 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi61 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi62 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi63 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+bi64 = 101 : 0000000000000000000000000000000000000000000000000000000001100101 : 65 : 101
+
+bi01 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi02 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi03 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi04 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111111111111111000 : fffffffffffffff8 : -8
+bi05 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111111111111111000 : fffffffffffffff8 : -8
+bi06 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111111111111111000 : fffffffffffffff8 : -8
+bi07 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111111111111111000 : fffffffffffffff8 : -8
+bi08 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000000001111000 : 78 : 120
+bi09 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111111111101111000 : ffffffffffffff78 : -136
+bi10 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111111111101111000 : ffffffffffffff78 : -136
+bi11 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378 : 888
+bi12 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378 : 888
+bi13 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000000001101111000 : 378 : 888
+bi14 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111110001101111000 : ffffffffffffe378 : -7304
+bi15 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000000010001101111000 : 2378 : 9080
+bi16 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111111010001101111000 : ffffffffffffa378 : -23688
+bi17 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000001010001101111000 : a378 : 41848
+bi18 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000000001010001101111000 : a378 : 41848
+bi19 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111111001010001101111000 : fffffffffffca378 : -220296
+bi20 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000001001010001101111000 : 4a378 : 303992
+bi21 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000000001001010001101111000 : 4a378 : 303992
+bi22 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111111001001010001101111000 : ffffffffffe4a378 : -1793160
+bi23 = 11111110110111001011101010011000 : 0000000000000000000000000000000000000000001001001010001101111000 : 24a378 : 2401144
+bi24 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111101001001010001101111000 : ffffffffffa4a378 : -5987464
+bi25 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111101001001010001101111000 : ffffffffffa4a378 : -5987464
+bi26 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111101001001010001101111000 : ffffffffffa4a378 : -5987464
+bi27 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111101001001010001101111000 : ffffffffffa4a378 : -5987464
+bi28 = 11111110110111001011101010011000 : 1111111111111111111111111111111111111111101001001010001101111000 : ffffffffffa4a378 : -5987464
+bi29 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378 : 262447992
+bi30 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378 : 262447992
+bi31 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378 : 262447992
+bi32 = 11111110110111001011101010011000 : 0000000000000000000000000000000000001111101001001010001101111000 : fa4a378 : 262447992
+bi33 = 11111110110111001011101010011000 : 1111111111111111111111111111111100001111101001001010001101111000 : ffffffff0fa4a378 : -4032519304
+bi34 = 11111110110111001011101010011000 : 1111111111111111111111111111111100001111101001001010001101111000 : ffffffff0fa4a378 : -4032519304
+bi35 = 11111110110111001011101010011000 : 1111111111111111111111111111111100001111101001001010001101111000 : ffffffff0fa4a378 : -4032519304
+bi36 = 11111110110111001011101010011000 : 0000000000000000000000000000011100001111101001001010001101111000 : 70fa4a378 : 30327219064
+bi37 = 11111110110111001011101010011000 : 1111111111111111111111111111011100001111101001001010001101111000 : fffffff70fa4a378 : -38392257672
+bi38 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378 : 99046695800
+bi39 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378 : 99046695800
+bi40 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378 : 99046695800
+bi41 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378 : 99046695800
+bi42 = 11111110110111001011101010011000 : 0000000000000000000000000001011100001111101001001010001101111000 : 170fa4a378 : 99046695800
+bi43 = 11111110110111001011101010011000 : 1111111111111111111111000001011100001111101001001010001101111000 : fffffc170fa4a378 : -4298999815304
+bi44 = 11111110110111001011101010011000 : 1111111111111111111111000001011100001111101001001010001101111000 : fffffc170fa4a378 : -4298999815304
+bi45 = 11111110110111001011101010011000 : 1111111111111111111111000001011100001111101001001010001101111000 : fffffc170fa4a378 : -4298999815304
+bi46 = 11111110110111001011101010011000 : 0000000000000000000111000001011100001111101001001010001101111000 : 1c170fa4a378 : 30885372273528
+bi47 = 11111110110111001011101010011000 : 1111111111111111110111000001011100001111101001001010001101111000 : ffffdc170fa4a378 : -39483371904136
+bi48 = 11111110110111001011101010011000 : 0000000000000000010111000001011100001111101001001010001101111000 : 5c170fa4a378 : 101254116451192
+bi49 = 11111110110111001011101010011000 : 1111111111111111010111000001011100001111101001001010001101111000 : ffff5c170fa4a378 : -180220860259464
+bi50 = 11111110110111001011101010011000 : 0000000000000001010111000001011100001111101001001010001101111000 : 15c170fa4a378 : 382729093161848
+bi51 = 11111110110111001011101010011000 : 1111111111111101010111000001011100001111101001001010001101111000 : fffd5c170fa4a378 : -743170813680776
+bi52 = 11111110110111001011101010011000 : 0000000000000101010111000001011100001111101001001010001101111000 : 55c170fa4a378 : 1508629000004472
+bi53 = 11111110110111001011101010011000 : 0000000000000101010111000001011100001111101001001010001101111000 : 55c170fa4a378 : 1508629000004472
+bi54 = 11111110110111001011101010011000 : 1111111111100101010111000001011100001111101001001010001101111000 : ffe55c170fa4a378 : -7498570254736520
+bi55 = 11111110110111001011101010011000 : 1111111111100101010111000001011100001111101001001010001101111000 : ffe55c170fa4a378 : -7498570254736520
+bi56 = 11111110110111001011101010011000 : 0000000001100101010111000001011100001111101001001010001101111000 : 655c170fa4a378 : 28530226764227448
+bi57 = 11111110110111001011101010011000 : 0000000001100101010111000001011100001111101001001010001101111000 : 655c170fa4a378 : 28530226764227448
+bi58 = 11111110110111001011101010011000 : 1111111001100101010111000001011100001111101001001010001101111000 : fe655c170fa4a378 : -115584961311628424
+bi59 = 11111110110111001011101010011000 : 1111111001100101010111000001011100001111101001001010001101111000 : fe655c170fa4a378 : -115584961311628424
+bi60 = 11111110110111001011101010011000 : 0000011001100101010111000001011100001111101001001010001101111000 : 6655c170fa4a378 : 460875790991795064
+bi61 = 11111110110111001011101010011000 : 0000011001100101010111000001011100001111101001001010001101111000 : 6655c170fa4a378 : 460875790991795064
+bi62 = 11111110110111001011101010011000 : 1110011001100101010111000001011100001111101001001010001101111000 : e6655c170fa4a378 : -1844967218221898888
+bi63 = 11111110110111001011101010011000 : 1110011001100101010111000001011100001111101001001010001101111000 : e6655c170fa4a378 : -1844967218221898888
+bi64 = 11111110110111001011101010011000 : 0110011001100101010111000001011100001111101001001010001101111000 : 66655c170fa4a378 : 7378404818632876920
+
+bi01 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111111111111111 : ffffffffffffffff : -1
+bi02 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111111111111111 : ffffffffffffffff : -1
+bi03 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111111111111111 : ffffffffffffffff : -1
+bi04 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7 : 7
+bi05 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7 : 7
+bi06 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000000000111 : 7 : 7
+bi07 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111111111000111 : ffffffffffffffc7 : -57
+bi08 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111111111000111 : ffffffffffffffc7 : -57
+bi09 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111111111000111 : ffffffffffffffc7 : -57
+bi10 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7 : 455
+bi11 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7 : 455
+bi12 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000000000111000111 : 1c7 : 455
+bi13 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111000111000111 : fffffffffffff1c7 : -3641
+bi14 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111000111000111 : fffffffffffff1c7 : -3641
+bi15 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111111111000111000111 : fffffffffffff1c7 : -3641
+bi16 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7 : 29127
+bi17 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7 : 29127
+bi18 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000000000111000111000111 : 71c7 : 29127
+bi19 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111000111000111000111 : fffffffffffc71c7 : -233017
+bi20 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111000111000111000111 : fffffffffffc71c7 : -233017
+bi21 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111111111000111000111000111 : fffffffffffc71c7 : -233017
+bi22 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7 : 1864135
+bi23 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7 : 1864135
+bi24 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000000000111000111000111000111 : 1c71c7 : 1864135
+bi25 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111000111000111000111000111 : ffffffffff1c71c7 : -14913081
+bi26 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111000111000111000111000111 : ffffffffff1c71c7 : -14913081
+bi27 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111111111000111000111000111000111 : ffffffffff1c71c7 : -14913081
+bi28 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7 : 119304647
+bi29 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7 : 119304647
+bi30 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000000000111000111000111000111000111 : 71c71c7 : 119304647
+bi31 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111000111000111000111000111000111 : ffffffffc71c71c7 : -954437177
+bi32 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111000111000111000111000111000111 : ffffffffc71c71c7 : -954437177
+bi33 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111111111000111000111000111000111000111 : ffffffffc71c71c7 : -954437177
+bi34 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7 : 7635497415
+bi35 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7 : 7635497415
+bi36 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000000000111000111000111000111000111000111 : 1c71c71c7 : 7635497415
+bi37 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111000111000111000111000111000111000111 : fffffff1c71c71c7 : -61083979321
+bi38 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111000111000111000111000111000111000111 : fffffff1c71c71c7 : -61083979321
+bi39 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111111111000111000111000111000111000111000111 : fffffff1c71c71c7 : -61083979321
+bi40 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7 : 488671834567
+bi41 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7 : 488671834567
+bi42 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000000000111000111000111000111000111000111000111 : 71c71c71c7 : 488671834567
+bi43 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111000111000111000111000111000111000111000111 : fffffc71c71c71c7 : -3909374676537
+bi44 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111000111000111000111000111000111000111000111 : fffffc71c71c71c7 : -3909374676537
+bi45 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111111111000111000111000111000111000111000111000111 : fffffc71c71c71c7 : -3909374676537
+bi46 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7 : 31274997412295
+bi47 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7 : 31274997412295
+bi48 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000000000111000111000111000111000111000111000111000111 : 1c71c71c71c7 : 31274997412295
+bi49 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111000111000111000111000111000111000111000111000111 : ffff1c71c71c71c7 : -250199979298361
+bi50 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111000111000111000111000111000111000111000111000111 : ffff1c71c71c71c7 : -250199979298361
+bi51 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111111111000111000111000111000111000111000111000111000111 : ffff1c71c71c71c7 : -250199979298361
+bi52 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7 : 2001599834386887
+bi53 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7 : 2001599834386887
+bi54 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000000000111000111000111000111000111000111000111000111000111 : 71c71c71c71c7 : 2001599834386887
+bi55 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111000111000111000111000111000111000111000111000111000111 : ffc71c71c71c71c7 : -16012798675095097
+bi56 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111000111000111000111000111000111000111000111000111000111 : ffc71c71c71c71c7 : -16012798675095097
+bi57 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111111111000111000111000111000111000111000111000111000111000111 : ffc71c71c71c71c7 : -16012798675095097
+bi58 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7 : 128102389400760775
+bi59 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7 : 128102389400760775
+bi60 = 1111111111111111111111111111111111111111111111111111111111111111 : 0000000111000111000111000111000111000111000111000111000111000111 : 1c71c71c71c71c7 : 128102389400760775
+bi61 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111000111000111000111000111000111000111000111000111000111000111 : f1c71c71c71c71c7 : -1024819115206086201
+bi62 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111000111000111000111000111000111000111000111000111000111000111 : f1c71c71c71c71c7 : -1024819115206086201
+bi63 = 1111111111111111111111111111111111111111111111111111111111111111 : 1111000111000111000111000111000111000111000111000111000111000111 : f1c71c71c71c71c7 : -1024819115206086201
+bi64 = 1111111111111111111111111111111111111111111111111111111111111111 : 0111000111000111000111000111000111000111000111000111000111000111 : 71c71c71c71c71c7 : 8198552921648689607
+
+bi01 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi02 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi03 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi04 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi05 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111111111111111111110000 : fffffffffffffff0 : -16
+bi06 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10 : 16
+bi07 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10 : 16
+bi08 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000000010000 : 10 : 16
+bi09 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111111111111111100010000 : ffffffffffffff10 : -240
+bi10 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110 : 272
+bi11 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110 : 272
+bi12 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110 : 272
+bi13 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000000000100010000 : 110 : 272
+bi14 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111111111110000100010000 : ffffffffffffe110 : -7920
+bi15 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000000010000100010000 : 2110 : 8464
+bi16 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111111111010000100010000 : ffffffffffffa110 : -24304
+bi17 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000000001010000100010000 : a110 : 41232
+bi18 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111111101010000100010000 : fffffffffffea110 : -89840
+bi19 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111111101010000100010000 : fffffffffffea110 : -89840
+bi20 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000001101010000100010000 : 6a110 : 434448
+bi21 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000000001101010000100010000 : 6a110 : 434448
+bi22 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111001101010000100010000 : ffffffffffe6a110 : -1662704
+bi23 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111111001101010000100010000 : ffffffffffe6a110 : -1662704
+bi24 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000000011001101010000100010000 : 66a110 : 6725904
+bi25 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111111011001101010000100010000 : ffffffffff66a110 : -10051312
+bi26 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000001011001101010000100010000 : 166a110 : 23503120
+bi27 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000000001011001101010000100010000 : 166a110 : 23503120
+bi28 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111001011001101010000100010000 : fffffffff966a110 : -110714608
+bi29 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111001011001101010000100010000 : fffffffff966a110 : -110714608
+bi30 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111111111001011001101010000100010000 : fffffffff966a110 : -110714608
+bi31 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110 : 963027216
+bi32 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110 : 963027216
+bi33 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000000000111001011001101010000100010000 : 3966a110 : 963027216
+bi34 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111000111001011001101010000100010000 : fffffffe3966a110 : -7626907376
+bi35 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111111111000111001011001101010000100010000 : fffffffe3966a110 : -7626907376
+bi36 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110 : 26732830992
+bi37 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110 : 26732830992
+bi38 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000000011000111001011001101010000100010000 : 63966a110 : 26732830992
+bi39 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111111100011000111001011001101010000100010000 : ffffffc63966a110 : -248145075952
+bi40 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000100011000111001011001101010000100010000 : 463966a110 : 301610737936
+bi41 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000000000100011000111001011001101010000100010000 : 463966a110 : 301610737936
+bi42 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111100100011000111001011001101010000100010000 : fffffe463966a110 : -1897412517616
+bi43 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111111100100011000111001011001101010000100010000 : fffffe463966a110 : -1897412517616
+bi44 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000001100100011000111001011001101010000100010000 : 6463966a110 : 6898680504592
+bi45 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000000001100100011000111001011001101010000100010000 : 6463966a110 : 6898680504592
+bi46 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111001100100011000111001011001101010000100010000 : ffffe6463966a110 : -28285691584240
+bi47 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111111111001100100011000111001011001101010000100010000 : ffffe6463966a110 : -28285691584240
+bi48 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110 : 112451796771088
+bi49 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110 : 112451796771088
+bi50 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000000011001100100011000111001011001101010000100010000 : 66463966a110 : 112451796771088
+bi51 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111111100011001100100011000111001011001101010000100010000 : fffc66463966a110 : -1013448110071536
+bi52 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000100011001100100011000111001011001101010000100010000 : 466463966a110 : 1238351703613712
+bi53 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000000100011001100100011000111001011001101010000100010000 : 466463966a110 : 1238351703613712
+bi54 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111111100100011001100100011000111001011001101010000100010000 : ffe466463966a110 : -7768847551127280
+bi55 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000000000100100011001100100011000111001011001101010000100010000 : 2466463966a110 : 10245550958354704
+bi56 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111110100100011001100100011000111001011001101010000100010000 : ffa466463966a110 : -25783246060609264
+bi57 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111110100100011001100100011000111001011001101010000100010000 : ffa466463966a110 : -25783246060609264
+bi58 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111111110100100011001100100011000111001011001101010000100010000 : ffa466463966a110 : -25783246060609264
+bi59 = 1111111011011100101110101001100001110110010101000011001000010000 : 0000001110100100011001100100011000111001011001101010000100010000 : 3a466463966a110 : 262447130091102480
+bi60 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111101110100100011001100100011000111001011001101010000100010000 : fba466463966a110 : -314013622212321008
+bi61 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111101110100100011001100100011000111001011001101010000100010000 : fba466463966a110 : -314013622212321008
+bi62 = 1111111011011100101110101001100001110110010101000011001000010000 : 1111101110100100011001100100011000111001011001101010000100010000 : fba466463966a110 : -314013622212321008
+bi63 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110 : 4297672396215066896
+bi64 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110 : 4297672396215066896
+bi64 = 1111111011011100101110101001100001110110010101000011001000010000 : 0011101110100100011001100100011000111001011001101010000100010000 : 3ba466463966a110 : 4297672396215066896
+bi64 = 111111011011100101110101001100001110110010101000011001000010000 : 1011101110100100011001100100011000111001011001101010000100010000 : bba466463966a110 : -4925699640639708912
+bi64 = 11111011011100101110101001100001110110010101000011001000010000 : 0111101110100100011001100100011000111001011001101010000100010000 : 7ba466463966a110 : 8909358414642454800
+bi64 = 1111011011100101110101001100001110110010101000011001000010000 : 1101101110100100011001100100011000111001011001101010000100010000 : dba466463966a110 : -2619856631426014960
+bi64 = 111011011100101110101001100001110110010101000011001000010000 : 1100101110100100011001100100011000111001011001101010000100010000 : cba466463966a110 : -3772778136032861936
+bi64 = 11011011100101110101001100001110110010101000011001000010000 : 1110001110100100011001100100011000111001011001101010000100010000 : e3a466463966a110 : -2043395879122591472
+bi64 = 1011011100101110101001100001110110010101000011001000010000 : 1111111110100100011001100100011000111001011001101010000100010000 : ffa466463966a110 : -25783246060609264
+bi64 = 011011100101110101001100001110110010101000011001000010000 : 1011010110100100011001100100011000111001011001101010000100010000 : b5a466463966a110 : -5358045204867276528
+bi64 = 11011100101110101001100001110110010101000011001000010000 : 1011010110100100011001100100011000111001011001101010000100010000 : b5a466463966a110 : -5358045204867276528
+bi64 = 1011100101110101001100001110110010101000011001000010000 : 1111111100100100011001100100011000111001011001101010000100010000 : ff2466463966a110 : -61812043079573232
+bi64 = 011100101110101001100001110110010101000011001000010000 : 0110110011100100011001100100011000111001011001101010000100010000 : 6ce466463966a110 : 7846508902583017744
+bi64 = 11100101110101001100001110110010101000011001000010000 : 0110110011100100011001100100011000111001011001101010000100010000 : 6ce466463966a110 : 7846508902583017744
+bi64 = 1100101110101001100001110110010101000011001000010000 : 1001000111010100011001100100011000111001011001101010000100010000 : 91d466463966a110 : -7938607791350570736
+bi64 = 100101110101001100001110110010101000011001000010000 : 0111101111101100011001100100011000111001011001101010000100010000 : 7bec66463966a110 : 8929624612965622032
+bi64 = 00101110101001100001110110010101000011001000010000 : 1100011010001000011001100100011000111001011001101010000100010000 : c68866463966a110 : -4140947405570399984
+bi64 = 0101110101001100001110110010101000011001000010000 : 1100011010001000011001100100011000111001011001101010000100010000 : c68866463966a110 : -4140947405570399984
+bi64 = 101110101001100001110110010101000011001000010000 : 1100011010001000011001100100011000111001011001101010000100010000 : c68866463966a110 : -4140947405570399984
+bi64 = 01110101001100001110110010101000011001000010000 : 0110110100000001111001100100011000111001011001101010000100010000 : 6d01e6463966a110 : 7854812414395982096
+bi64 = 1110101001100001110110010101000011001000010000 : 0110110100000001111001100100011000111001011001101010000100010000 : 6d01e6463966a110 : 7854812414395982096
+bi64 = 110101001100001110110010101000011001000010000 : 0110000111011111010001100100011000111001011001101010000100010000 : 61df46463966a110 : 7052432808910168336
+bi64 = 10101001100001110110010101000011001000010000 : 0110000011000010001101100100011000111001011001101010000100010000 : 60c236463966a110 : 6972194848361586960
+bi64 = 0101001100001110110010101000011001000010000 : 1111101000111111010011100100011000111001011001101010000100010000 : fa3f4e463966a110 : -414526577177091824
+bi64 = 101001100001110110010101000011001000010000 : 1111101000111111010011100100011000111001011001101010000100010000 : fa3f4e463966a110 : -414526577177091824
+bi64 = 01001100001110110010101000011001000010000 : 1011011010101001100001000100011000111001011001101010000100010000 : b6a984463966a110 : -5284547250596962032
+bi64 = 1001100001110110010101000011001000010000 : 1011011010101001100001000100011000111001011001101010000100010000 : b6a984463966a110 : -5284547250596962032
+bi64 = 001100001110110010101000011001000010000 : 0101011101000100001011011100011000111001011001101010000100010000 : 57442dc63966a110 : 6288201309105856784
+bi64 = 01100001110110010101000011001000010000 : 0101011101000100001011011100011000111001011001101010000100010000 : 57442dc63966a110 : 6288201309105856784
+bi64 = 1100001110110010101000011001000010000 : 0101011101000100001011011100011000111001011001101010000100010000 : 57442dc63966a110 : 6288201309105856784
+bi64 = 100001110110010101000011001000010000 : 1010001111111000100011101011011000111001011001101010000100010000 : a3f88eb63966a110 : -6631393538004836080
+bi64 = 00001110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110 : 8678716643622691088
+bi64 = 0001110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110 : 8678716643622691088
+bi64 = 001110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110 : 8678716643622691088
+bi64 = 01110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110 : 8678716643622691088
+bi64 = 1110110010101000011001000010000 : 0111100001110000111111101100111000111001011001101010000100010000 : 7870fece3966a110 : 8678716643622691088
+bi64 = 110110010101000011001000010000 : 0011000111111100000100001110001111111001011001101010000100010000 : 31fc10e3f966a110 : 3601772373317427472
+bi64 = 10110010101000011001000010000 : 1100010010001001111110010001100101011001011001101010000100010000 : c489f9195966a110 : -4284619683196919536
+bi64 = 0110010101000011001000010000 : 1000011001100100111101101011100001001001011001101010000100010000 : 8664f6b84966a110 : -8762607703590264560
+bi64 = 110010101000011001000010000 : 1000011001100100111101101011100001001001011001101010000100010000 : 8664f6b84966a110 : -8762607703590264560
+bi64 = 10010101000011001000010000 : 1010100110011100111010011110010101100101011001101010000100010000 : a99ce9e56566a110 : -6224843413474860784
+bi64 = 0010101000011001000010000 : 1001001110001000111010001001110100011011011001101010000100010000 : 9388e89d1b66a110 : -7815741391834275568
+bi64 = 010101000011001000010000 : 1001001110001000111010001001110100011011011001101010000100010000 : 9388e89d1b66a110 : -7815741391834275568
+bi64 = 10101000011001000010000 : 1001001110001000111010001001110100011011011001101010000100010000 : 9388e89d1b66a110 : -7815741391834275568
+bi64 = 0101000011001000010000 : 0111100110101000000111101110001001101001001001101010000100010000 : 79a81ee26926a110 : 8766290632452251920
+bi64 = 101000011001000010000 : 0111100110101000000111101110001001101001001001101010000100010000 : 79a81ee26926a110 : 8766290632452251920
+bi64 = 01000011001000010000 : 0000110111100000110000001011010100000110000101101010000100010000 : de0c0b50616a110 : 1000011001000010000
+bi64 = 1000011001000010000 : 0000110111100000110000001011010100000110000101101010000100010000 : de0c0b50616a110 : 1000011001000010000
+bi64 = 000011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110 : 11001000010000
+bi64 = 00011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110 : 11001000010000
+bi64 = 0011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110 : 11001000010000
+bi64 = 011001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110 : 11001000010000
+bi64 = 11001000010000 : 0000000000000000000010100000000101011110101100101010000100010000 : a015eb2a110 : 11001000010000
+bi64 = 1001000010000 : 0000000000000000000000001110100100010000010000000000000100010000 : e910400110 : 1001000010000
+bi64 = 001000010000 : 0000000000000000000000000000000000111011100110101111000100010000 : 3b9af110 : 1000010000
+bi64 = 01000010000 : 0000000000000000000000000000000000111011100110101111000100010000 : 3b9af110 : 1000010000
+bi64 = 1000010000 : 0000000000000000000000000000000000111011100110101111000100010000 : 3b9af110 : 1000010000
+bi64 = 000010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710 : 10000
+bi64 = 00010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710 : 10000
+bi64 = 0010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710 : 10000
+bi64 = 010000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710 : 10000
+bi64 = 10000 : 0000000000000000000000000000000000000000000000000010011100010000 : 2710 : 10000
+bi64 = 0000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi64 = 000 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi64 = 00 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
+bi64 = 0 : 0000000000000000000000000000000000000000000000000000000000000000 : 0 : 0
diff --git a/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/test02.cpp
new file mode 100644
index 000000000..1cbd304f1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/parse_binary_bits/test02/test02.cpp
@@ -0,0 +1,177 @@
+#include "systemc.h"
+
+#define TEST_VAR(var, v) \
+ var = v; \
+ sprintf(buffer, "%16llx", var.to_int64()); \
+ bv64 = var; \
+ cout << #var << " = " << v << " : " << bv64 << " : " << buffer << " : " << var << endl;
+
+#define TEST(v) \
+ cout << endl; \
+ TEST_VAR( bi01, v ); \
+ TEST_VAR( bi02, v ); \
+ TEST_VAR( bi03, v ); \
+ TEST_VAR( bi04, v ); \
+ TEST_VAR( bi05, v ); \
+ TEST_VAR( bi06, v ); \
+ TEST_VAR( bi07, v ); \
+ TEST_VAR( bi08, v ); \
+ TEST_VAR( bi09, v ); \
+ TEST_VAR( bi10, v ); \
+ TEST_VAR( bi11, v ); \
+ TEST_VAR( bi12, v ); \
+ TEST_VAR( bi13, v ); \
+ TEST_VAR( bi14, v ); \
+ TEST_VAR( bi15, v ); \
+ TEST_VAR( bi16, v ); \
+ TEST_VAR( bi17, v ); \
+ TEST_VAR( bi18, v ); \
+ TEST_VAR( bi19, v ); \
+ TEST_VAR( bi20, v ); \
+ TEST_VAR( bi21, v ); \
+ TEST_VAR( bi22, v ); \
+ TEST_VAR( bi23, v ); \
+ TEST_VAR( bi24, v ); \
+ TEST_VAR( bi25, v ); \
+ TEST_VAR( bi26, v ); \
+ TEST_VAR( bi27, v ); \
+ TEST_VAR( bi28, v ); \
+ TEST_VAR( bi29, v ); \
+ TEST_VAR( bi30, v ); \
+ TEST_VAR( bi31, v ); \
+ TEST_VAR( bi32, v ); \
+ TEST_VAR( bi33, v ); \
+ TEST_VAR( bi34, v ); \
+ TEST_VAR( bi35, v ); \
+ TEST_VAR( bi36, v ); \
+ TEST_VAR( bi37, v ); \
+ TEST_VAR( bi38, v ); \
+ TEST_VAR( bi39, v ); \
+ TEST_VAR( bi40, v ); \
+ TEST_VAR( bi41, v ); \
+ TEST_VAR( bi42, v ); \
+ TEST_VAR( bi43, v ); \
+ TEST_VAR( bi44, v ); \
+ TEST_VAR( bi45, v ); \
+ TEST_VAR( bi46, v ); \
+ TEST_VAR( bi47, v ); \
+ TEST_VAR( bi48, v ); \
+ TEST_VAR( bi49, v ); \
+ TEST_VAR( bi50, v ); \
+ TEST_VAR( bi51, v ); \
+ TEST_VAR( bi52, v ); \
+ TEST_VAR( bi53, v ); \
+ TEST_VAR( bi54, v ); \
+ TEST_VAR( bi55, v ); \
+ TEST_VAR( bi56, v ); \
+ TEST_VAR( bi57, v ); \
+ TEST_VAR( bi58, v ); \
+ TEST_VAR( bi59, v ); \
+ TEST_VAR( bi60, v ); \
+ TEST_VAR( bi61, v ); \
+ TEST_VAR( bi62, v ); \
+ TEST_VAR( bi63, v ); \
+ TEST_VAR( bi64, v );
+
+int sc_main(int argc, char* argv[])
+{
+ char buffer[256];
+ sc_bigint<1> bi01;
+ sc_bigint<2> bi02;
+ sc_bigint<3> bi03;
+ sc_bigint<4> bi04;
+ sc_bigint<5> bi05;
+ sc_bigint<6> bi06;
+ sc_bigint<7> bi07;
+ sc_bigint<8> bi08;
+ sc_bigint<9> bi09;
+ sc_bigint<10> bi10;
+ sc_bigint<11> bi11;
+ sc_bigint<12> bi12;
+ sc_bigint<13> bi13;
+ sc_bigint<14> bi14;
+ sc_bigint<15> bi15;
+ sc_bigint<16> bi16;
+ sc_bigint<17> bi17;
+ sc_bigint<18> bi18;
+ sc_bigint<19> bi19;
+ sc_bigint<20> bi20;
+ sc_bigint<21> bi21;
+ sc_bigint<22> bi22;
+ sc_bigint<23> bi23;
+ sc_bigint<24> bi24;
+ sc_bigint<25> bi25;
+ sc_bigint<26> bi26;
+ sc_bigint<27> bi27;
+ sc_bigint<28> bi28;
+ sc_bigint<29> bi29;
+ sc_bigint<30> bi30;
+ sc_bigint<31> bi31;
+ sc_bigint<32> bi32;
+ sc_bigint<33> bi33;
+ sc_bigint<34> bi34;
+ sc_bigint<35> bi35;
+ sc_bigint<36> bi36;
+ sc_bigint<37> bi37;
+ sc_bigint<38> bi38;
+ sc_bigint<39> bi39;
+ sc_bigint<40> bi40;
+ sc_bigint<41> bi41;
+ sc_bigint<42> bi42;
+ sc_bigint<43> bi43;
+ sc_bigint<44> bi44;
+ sc_bigint<45> bi45;
+ sc_bigint<46> bi46;
+ sc_bigint<47> bi47;
+ sc_bigint<48> bi48;
+ sc_bigint<49> bi49;
+ sc_bigint<50> bi50;
+ sc_bigint<51> bi51;
+ sc_bigint<52> bi52;
+ sc_bigint<53> bi53;
+ sc_bigint<54> bi54;
+ sc_bigint<55> bi55;
+ sc_bigint<56> bi56;
+ sc_bigint<57> bi57;
+ sc_bigint<58> bi58;
+ sc_bigint<59> bi59;
+ sc_bigint<60> bi60;
+ sc_bigint<61> bi61;
+ sc_bigint<62> bi62;
+ sc_bigint<63> bi63;
+ sc_bigint<64> bi64;
+
+ sc_bv<64> bv64;
+
+ int i;
+
+ char values[] = "1111"
+ "1110"
+ "1101"
+ "1100"
+ "1011"
+ "1010"
+ "1001"
+ "1000"
+ "0111"
+ "0110"
+ "0101"
+ "0100"
+ "0011"
+ "0010"
+ "0001"
+ "0000";
+ TEST("101");
+
+ TEST( "11111110110111001011101010011000" );
+ TEST( "1111111111111111111111111111111111111111111111111111111111111111" );
+
+ TEST( values );
+
+ for ( i = 0; i < (int)strlen(values); i++ )
+ {
+ TEST_VAR( bi64, &values[i]);
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/reduce/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/reduce/test01/golden/test01.log
new file mode 100644
index 000000000..22e74474a
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/reduce/test01/golden/test01.log
@@ -0,0 +1,78 @@
+SystemC Simulation
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+1
+0
+
+1
+1
+
+1
+0
+
+1
+1
+
+0
+0
+0
+0
+1
+1
+1
+1
+0
+0
+1
+1
+0
+0
+0
+0
+1
+1
+1
+1
+0
+0
diff --git a/src/systemc/tests/systemc/datatypes/int/reduce/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/reduce/test01/test01.cpp
new file mode 100644
index 000000000..4cb25e5db
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/reduce/test01/test01.cpp
@@ -0,0 +1,138 @@
+/*****************************************************************************
+
+ 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 reduce methods in the sc_[u]int datatypes -- method notation
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ // 1) check the existence of the reduce methods
+
+ sc_int<42> a = 42;
+
+ // sc_int_base
+ cout << endl;
+ cout << a.and_reduce() << endl;
+ cout << a.or_reduce() << endl;
+ cout << a.xor_reduce() << endl;
+ cout << a.nand_reduce() << endl;
+ cout << a.nor_reduce() << endl;
+ cout << a.xnor_reduce() << endl;
+
+ // sc_int_subref
+ cout << endl;
+ cout << a( 7, 0 ).and_reduce() << endl;
+ cout << a( 7, 0 ).or_reduce() << endl;
+ cout << a( 7, 0 ).xor_reduce() << endl;
+ cout << a( 7, 0 ).nand_reduce() << endl;
+ cout << a( 7, 0 ).nor_reduce() << endl;
+ cout << a( 7, 0 ).xnor_reduce() << endl;
+
+ // sc_int_concref<T1,T2>
+ cout << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).and_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).or_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).xor_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).nand_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).nor_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).xnor_reduce() << endl;
+
+ sc_uint<42> b = 42;
+
+ // sc_uint_base
+ cout << endl;
+ cout << b.and_reduce() << endl;
+ cout << b.or_reduce() << endl;
+ cout << b.xor_reduce() << endl;
+ cout << b.nand_reduce() << endl;
+ cout << b.nor_reduce() << endl;
+ cout << b.xnor_reduce() << endl;
+
+ // sc_uint_subref
+ cout << endl;
+ cout << b( 7, 0 ).and_reduce() << endl;
+ cout << b( 7, 0 ).or_reduce() << endl;
+ cout << b( 7, 0 ).xor_reduce() << endl;
+ cout << b( 7, 0 ).nand_reduce() << endl;
+ cout << b( 7, 0 ).nor_reduce() << endl;
+ cout << b( 7, 0 ).xnor_reduce() << endl;
+
+ // sc_uint_concref<T1,T2>
+ cout << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).and_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).or_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).xor_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).nand_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).nor_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).xnor_reduce() << endl;
+
+ // 2) check the functionality of the reduce methods
+
+ sc_int<2> c2 = -1;
+ cout << endl;
+ cout << c2.and_reduce() << endl;
+ cout << c2.xor_reduce() << endl;
+
+ sc_int<3> c3 = -1;
+ cout << endl;
+ cout << c3.and_reduce() << endl;
+ cout << c3.xor_reduce() << endl;
+
+ sc_uint<2> d2 = sc_dt::uint_type( -1 );
+ cout << endl;
+ cout << d2.and_reduce() << endl;
+ cout << d2.xor_reduce() << endl;
+
+ sc_uint<3> d3 = sc_dt::uint_type( -1 );
+ cout << endl;
+ cout << d3.and_reduce() << endl;
+ cout << d3.xor_reduce() << endl;
+
+ sc_int<6> e;
+ sc_uint<6> f;
+ cout << endl;
+ for( int i = 0; i >= -10; -- i ) {
+ e = i;
+ f = i;
+ cout << e.xor_reduce() << endl;
+ cout << f.xor_reduce() << endl;
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/reduce/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/reduce/test02/golden/test02.log
new file mode 100644
index 000000000..22e74474a
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/reduce/test02/golden/test02.log
@@ -0,0 +1,78 @@
+SystemC Simulation
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+1
+0
+
+1
+1
+
+1
+0
+
+1
+1
+
+0
+0
+0
+0
+1
+1
+1
+1
+0
+0
+1
+1
+0
+0
+0
+0
+1
+1
+1
+1
+0
+0
diff --git a/src/systemc/tests/systemc/datatypes/int/reduce/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/reduce/test02/test02.cpp
new file mode 100644
index 000000000..b225fb0e1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/reduce/test02/test02.cpp
@@ -0,0 +1,138 @@
+/*****************************************************************************
+
+ 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: 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 reduce methods in the sc_[u]int datatypes -- functional notation
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ // 1) check the existence of the reduce methods
+
+ sc_int<42> a = 42;
+
+ // sc_int_base
+ cout << endl;
+ cout << and_reduce( a ) << endl;
+ cout << or_reduce( a ) << endl;
+ cout << xor_reduce( a ) << endl;
+ cout << nand_reduce( a ) << endl;
+ cout << nor_reduce( a ) << endl;
+ cout << xnor_reduce( a ) << endl;
+
+ // sc_int_subref
+ cout << endl;
+ cout << and_reduce( a( 7, 0 ) ) << endl;
+ cout << or_reduce( a( 7, 0 ) ) << endl;
+ cout << xor_reduce( a( 7, 0 ) ) << endl;
+ cout << nand_reduce( a( 7, 0 ) ) << endl;
+ cout << nor_reduce( a( 7, 0 ) ) << endl;
+ cout << xnor_reduce( a( 7, 0 ) ) << endl;
+
+ // sc_int_concref<T1,T2>
+ cout << endl;
+ cout << and_reduce( ( a( 7, 0 ), a( 15, 8 ) ) ) << endl;
+ cout << or_reduce( ( a( 7, 0 ), a( 15, 8 ) ) ) << endl;
+ cout << xor_reduce( ( a( 7, 0 ), a( 15, 8 ) ) ) << endl;
+ cout << nand_reduce( ( a( 7, 0 ), a( 15, 8 ) ) ) << endl;
+ cout << nor_reduce( ( a( 7, 0 ), a( 15, 8 ) ) ) << endl;
+ cout << xnor_reduce( ( a( 7, 0 ), a( 15, 8 ) ) ) << endl;
+
+ sc_uint<42> b = 42;
+
+ // sc_uint_base
+ cout << endl;
+ cout << and_reduce( b ) << endl;
+ cout << or_reduce( b ) << endl;
+ cout << xor_reduce( b ) << endl;
+ cout << nand_reduce( b ) << endl;
+ cout << nor_reduce( b ) << endl;
+ cout << xnor_reduce( b ) << endl;
+
+ // sc_uint_subref
+ cout << endl;
+ cout << and_reduce( b( 7, 0 ) ) << endl;
+ cout << or_reduce( b( 7, 0 ) ) << endl;
+ cout << xor_reduce( b( 7, 0 ) ) << endl;
+ cout << nand_reduce( b( 7, 0 ) ) << endl;
+ cout << nor_reduce( b( 7, 0 ) ) << endl;
+ cout << xnor_reduce( b( 7, 0 ) ) << endl;
+
+ // sc_uint_concref<T1,T2>
+ cout << endl;
+ cout << and_reduce( ( b( 7, 0 ), b( 15, 8 ) ) ) << endl;
+ cout << or_reduce( ( b( 7, 0 ), b( 15, 8 ) ) ) << endl;
+ cout << xor_reduce( ( b( 7, 0 ), b( 15, 8 ) ) ) << endl;
+ cout << nand_reduce( ( b( 7, 0 ), b( 15, 8 ) ) ) << endl;
+ cout << nor_reduce( ( b( 7, 0 ), b( 15, 8 ) ) ) << endl;
+ cout << xnor_reduce( ( b( 7, 0 ), b( 15, 8 ) ) ) << endl;
+
+ // 2) check the functionality of the reduce methods
+
+ sc_int<2> c2 = -1;
+ cout << endl;
+ cout << and_reduce( c2 ) << endl;
+ cout << xor_reduce( c2 ) << endl;
+
+ sc_int<3> c3 = -1;
+ cout << endl;
+ cout << and_reduce( c3 ) << endl;
+ cout << xor_reduce( c3 ) << endl;
+
+ sc_uint<2> d2 = sc_dt::uint_type( -1 );
+ cout << endl;
+ cout << and_reduce( d2 ) << endl;
+ cout << xor_reduce( d2 ) << endl;
+
+ sc_uint<3> d3 = sc_dt::uint_type( -1 );
+ cout << endl;
+ cout << and_reduce( d3 ) << endl;
+ cout << xor_reduce( d3 ) << endl;
+
+ sc_int<6> e;
+ sc_uint<6> f;
+ cout << endl;
+ for( int i = 0; i >= -10; -- i ) {
+ e = i;
+ f = i;
+ cout << xor_reduce( e ) << endl;
+ cout << xor_reduce( f ) << endl;
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/reduce/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/reduce/test03/golden/test03.log
new file mode 100644
index 000000000..22e74474a
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/reduce/test03/golden/test03.log
@@ -0,0 +1,78 @@
+SystemC Simulation
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+0
+1
+1
+1
+0
+0
+
+1
+0
+
+1
+1
+
+1
+0
+
+1
+1
+
+0
+0
+0
+0
+1
+1
+1
+1
+0
+0
+1
+1
+0
+0
+0
+0
+1
+1
+1
+1
+0
+0
diff --git a/src/systemc/tests/systemc/datatypes/int/reduce/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/reduce/test03/test03.cpp
new file mode 100644
index 000000000..ae7670d58
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/reduce/test03/test03.cpp
@@ -0,0 +1,138 @@
+/*****************************************************************************
+
+ 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: Martin Janssen, Synopsys, Inc., 2002-02-15
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date: Andy Goodrich, Forte Design Systems 2006-08-17
+ Description of Modification: Converted over to test sc_big types.
+
+ *****************************************************************************/
+
+// test of the reduce methods in the sc_big[u]int datatypes -- method notation
+
+#include "systemc.h"
+
+int
+sc_main( int, char*[] )
+{
+ // 1) check the existence of the reduce methods
+
+ sc_bigint<42> a = 42;
+
+ // sc_signed
+ cout << endl;
+ cout << a.and_reduce() << endl;
+ cout << a.or_reduce() << endl;
+ cout << a.xor_reduce() << endl;
+ cout << a.nand_reduce() << endl;
+ cout << a.nor_reduce() << endl;
+ cout << a.xnor_reduce() << endl;
+
+ // sc_signed_subref
+ cout << endl;
+ cout << a( 7, 0 ).and_reduce() << endl;
+ cout << a( 7, 0 ).or_reduce() << endl;
+ cout << a( 7, 0 ).xor_reduce() << endl;
+ cout << a( 7, 0 ).nand_reduce() << endl;
+ cout << a( 7, 0 ).nor_reduce() << endl;
+ cout << a( 7, 0 ).xnor_reduce() << endl;
+
+ // concatenation
+ cout << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).and_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).or_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).xor_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).nand_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).nor_reduce() << endl;
+ cout << ( a( 7, 0 ), a( 15, 8 ) ).xnor_reduce() << endl;
+
+ sc_biguint<42> b = 42;
+
+ // sc_unsigned
+ cout << endl;
+ cout << b.and_reduce() << endl;
+ cout << b.or_reduce() << endl;
+ cout << b.xor_reduce() << endl;
+ cout << b.nand_reduce() << endl;
+ cout << b.nor_reduce() << endl;
+ cout << b.xnor_reduce() << endl;
+
+ // sc_unsigned_subref
+ cout << endl;
+ cout << b( 7, 0 ).and_reduce() << endl;
+ cout << b( 7, 0 ).or_reduce() << endl;
+ cout << b( 7, 0 ).xor_reduce() << endl;
+ cout << b( 7, 0 ).nand_reduce() << endl;
+ cout << b( 7, 0 ).nor_reduce() << endl;
+ cout << b( 7, 0 ).xnor_reduce() << endl;
+
+ // concatenation
+ cout << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).and_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).or_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).xor_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).nand_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).nor_reduce() << endl;
+ cout << ( b( 7, 0 ), b( 15, 8 ) ).xnor_reduce() << endl;
+
+ // 2) check the functionality of the reduce methods
+
+ sc_bigint<2> c2 = -1;
+ cout << endl;
+ cout << c2.and_reduce() << endl;
+ cout << c2.xor_reduce() << endl;
+
+ sc_bigint<3> c3 = -1;
+ cout << endl;
+ cout << c3.and_reduce() << endl;
+ cout << c3.xor_reduce() << endl;
+
+ sc_biguint<2> d2 = sc_dt::uint_type( -1 );
+ cout << endl;
+ cout << d2.and_reduce() << endl;
+ cout << d2.xor_reduce() << endl;
+
+ sc_biguint<3> d3 = sc_dt::uint_type( -1 );
+ cout << endl;
+ cout << d3.and_reduce() << endl;
+ cout << d3.xor_reduce() << endl;
+
+ sc_bigint<6> e;
+ sc_biguint<6> f;
+ cout << endl;
+ for( int i = 0; i >= -10; -- i ) {
+ e = i;
+ f = i;
+ cout << e.xor_reduce() << endl;
+ cout << f.xor_reduce() << endl;
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/select.cpp
new file mode 100644
index 000000000..cb9ee2e68
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/signed/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int<WIDTH> Bx, By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (1<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (1<<i)? 1 : 0) );
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/select.cpp
new file mode 100644
index 000000000..d96b10271
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/32bit/unsigned/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint<WIDTH> Bx, By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (1<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (1<<i)? 1 : 0) );
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/golden/select.log
new file mode 100644
index 000000000..0f57bd1a4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/golden/select.log
@@ -0,0 +1,49 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/select.cpp
new file mode 100644
index 000000000..bfdb4bd1b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/signed/select.cpp
@@ -0,0 +1,65 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 48
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int<WIDTH> Bx,By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(uint64 j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (uint64(1)<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (uint64(1)<<i)? 1 : 0) );
+
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c4375f21c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/golden/select.log
@@ -0,0 +1,65 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
+i = 63
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/select.cpp
new file mode 100644
index 000000000..1cd36c653
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/bitselect/64bit/unsigned/select.cpp
@@ -0,0 +1,65 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 64
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint<WIDTH> Bx,By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(uint64 j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (uint64(1)<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (uint64(1)<<i)? 1 : 0) );
+
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/concat.cpp
new file mode 100644
index 000000000..06b1928d9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/concat.cpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 32
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_int<WIDTH> a_si32, b_si32;
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_si32 = i;
+ b_si32 = (a_si32.range(WIDTH-1,i+1), a_si32.range(i,0));
+ sc_assert( a_si32 == b_si32 );
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/golden/concat.log
new file mode 100644
index 000000000..31bb32fc5
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/32bit/golden/concat.log
@@ -0,0 +1,32 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/concat.cpp
new file mode 100644
index 000000000..a2a7acd1f
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/concat.cpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 64
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_int<WIDTH> a_si64, b_si64;
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_si64 = i;
+ b_si64 = (a_si64.range(WIDTH-1,i+1), a_si64.range(i,0));
+ sc_assert( a_si64 == b_si64 );
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/golden/concat.log
new file mode 100644
index 000000000..e47f7871b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/signed/64bit/golden/concat.log
@@ -0,0 +1,64 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/concat.cpp
new file mode 100644
index 000000000..2c2a1964b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/concat.cpp
@@ -0,0 +1,55 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 32
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_uint<WIDTH> a_su32, b_su32;
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_su32 = i;
+ b_su32 = (a_su32.range(WIDTH-1,i+1), a_su32.range(i,0));
+ sc_assert( a_su32 == b_su32 );
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/golden/concat.log
new file mode 100644
index 000000000..31bb32fc5
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/32bit/golden/concat.log
@@ -0,0 +1,32 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/concat.cpp
new file mode 100644
index 000000000..5bd3abe5e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/concat.cpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 64
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_uint<WIDTH> a_su64, b_su64;
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_su64 = i;
+ b_su64 = (a_su64.range(WIDTH-1,i+1), a_su64.range(i,0));
+ sc_assert( a_su64 == b_su64 );
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/golden/concat.log
new file mode 100644
index 000000000..e47f7871b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/concat/unsigned/64bit/golden/concat.log
@@ -0,0 +1,64 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/mixed/golden/test_int.log b/src/systemc/tests/systemc/datatypes/int/sc_int/mixed/golden/test_int.log
new file mode 100644
index 000000000..6237a8ce1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/mixed/golden/test_int.log
@@ -0,0 +1,38 @@
+SystemC Simulation
+x + a = 16
+++a = 9
+a-- = 9
+a = 9
+a[3] = 1
+a.range(4,0) = 9
+a = 9
+c = 9
+a = 15
+a = 23
+a = -121
+a = 19
+sb = 19
+sx = 1
+sy = 1
+sx = 1
+sy = 3
+s5 = 3
+s5 = -15
+sc8 = 16
+sc4 = 1
+u4 = 1
+u4 = 9
+sx = 6
+b = 0
+b = 1
+bva = 00000001
+lva = 00000001
+bva = 00000001
+ss8 = 1
+ss8 = 9
+b = 9
+b = 1
+ei8 = -118
+ei10 = -470
+bs4 = -8
+ds4 = -8
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/mixed/test_int.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/mixed/test_int.cpp
new file mode 100644
index 000000000..ba4cfd254
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/mixed/test_int.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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test_int.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"
+
+int sc_main( int ac, char *av[] )
+{
+ sc_int<8> a,b;
+ int x;
+
+
+
+ x = 8;
+ a = 8;
+ sc_assert( x == a);
+
+ cout << "x + a = " << x + a << endl;
+ cout << "++a = " << ++a << endl;
+ cout << "a-- = " << a-- << endl;
+
+ // bit-select on L.H.S.
+ a[0] = 1;
+ cout << "a = " << a << endl;
+
+ // bitselect on R.H.S.
+ cout << "a[3] = " << a[3] << endl;
+
+
+ // part-select on R.H.S
+ cout << "a.range(4,0) = " << a.range(4,0) << endl;
+ cout << "a = " << a << endl;
+
+ sc_int<5> c = a.range(4,0);
+ cout << "c = " << c << endl;
+
+ // part-select on L.H.S.
+ a.range(2,0) = 7;
+ cout << "a = " << a << endl;
+
+ a.range(4,2) = 5;
+ cout << "a = " << a << endl;
+
+ a.range(7,4) = 8;
+ cout << "a = " << a << endl;
+
+ // concat on R.H.S.
+ sc_int<4> sx = 1;
+ sc_int<4> sy = 3;
+ a = ( sx, sy );
+
+ cout << "a = " << a << endl;
+
+ sc_int<8> sb;
+ // concat of part-selects
+ sb = ( a.range(7,4), a.range(3,0) );
+
+ cout << "sb = " << sb << endl;
+
+ ( sx, sy ) = 17;
+
+ cout << "sx = " << sx << endl;
+ cout << "sy = " << sy << endl;
+
+ // concat and part-selects
+ ( sx, sy ) = ( a.range(7,4), a.range(3,0) );
+
+ cout << "sx = " << sx << endl;
+ cout << "sy = " << sy << endl;
+
+ sc_int<5> s5;
+
+ s5 = ( sx , a[4] );
+
+ cout << "s5 = " << s5 << endl;
+
+ s5 = (a[4],sx);
+ cout << "s5 = " << s5 << endl;
+
+ sc_bv<8> sc8;
+ sc_bv<4> sc4;
+
+ // ( sc8.range(7,4), sc4 ) = 17;
+ ( sc8.range(7,4), sc4 ) = "00010001";
+
+ cout << "sc8 = " << sc8.to_int() << endl;
+ cout << "sc4 = " << sc4.to_int() << endl;
+
+ sc_int_base sia(8);
+
+
+ sc_uint<4> u4;
+
+ // part-select on sc_uint
+ u4 = sx.range(3,0);
+
+ cout << "u4 = " << u4 << endl;
+
+ u4[3] = sx[0];
+
+ cout << "u4 = " << u4 << endl;
+
+ sx = (u4.range(1,0), u4.range(3,2));
+
+ cout << "sx = " << sx << endl;
+
+ sc_bv<8> bva;
+ sc_lv<8> lva;
+
+ // Mixing bv, lv on the RHS
+
+ bva = "10000000";
+ lva = "10000001";
+
+// #if ! defined( __GNUC__ )
+ b = bva & "1010";
+ cout << "b = " << b << endl;
+// #endif
+
+ // b = lva ^ bva;
+ b = sc_lv<8>( lva ^ bva );
+ cout << "b = " << b << endl;
+
+ //Mixing bv, lv on the LHS
+
+ bva = b;
+ lva = b;
+
+ cout << "bva = " << bva << endl;
+ cout << "lva = " << lva << endl;
+
+ bva = b & lva.to_int();
+
+ cout << "bva = " << bva << endl;
+
+
+ //Mixing sc_signed on LHS
+
+ sc_signed ss8(8);
+ ss8 = b;
+ cout << "ss8 = " << ss8 << endl;
+
+ ss8 = u4;
+ cout << "ss8 = " << ss8 << endl;
+
+ // Mixing sc_signed/sc_unsigned on RHS
+ sc_unsigned su8(8);
+
+ su8 = 8;
+ b = su8 + 1;
+
+ cout << "b = " << b << endl;
+
+ b = ss8 * su8;
+ b = ss8 ^ su8;
+ su8 = bva.to_int() | ss8;
+
+ cout << "b = " << b << endl;
+
+ // Having more than two concats
+
+ sc_int<2> ai2;
+ sc_int<4> bi4;
+ sc_int<2> ci2;
+ sc_int<2> di2;
+ sc_int<8> ei8;
+ sc_int<10> ei10;
+
+ ai2 = 2;
+ bi4 = 2;
+ ci2 = 2;
+ di2 = 2;
+
+ ei8 = (ai2, bi4, ci2 );
+
+ cout << "ei8 = " << ei8 << endl;
+
+ ei10 = (ai2, bi4, ci2 , di2);
+
+ cout << "ei10 = " << ei10 << endl;
+
+ // bit-true behavior
+ sc_int<4> bs4;
+ sc_signed ds4(4);
+
+ bs4[3] = 1;
+ bs4[2] = 0;
+ bs4[1] = 0;
+ bs4[0] = 0;
+
+ ds4[3] = 1;
+ ds4[2] = 0;
+ ds4[1] = 0;
+ ds4[0] = 0;
+
+
+ cout << "bs4 = " << bs4 << endl;
+ cout << "ds4 = " << ds4 << endl;
+
+ return 0;
+
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/select.cpp
new file mode 100644
index 000000000..27534579b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/signed/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int<WIDTH> Bx,By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/select.cpp
new file mode 100644
index 000000000..9631a020d
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/32bit/unsigned/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint<WIDTH> Bx,By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/golden/select.log
new file mode 100644
index 000000000..c4375f21c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/golden/select.log
@@ -0,0 +1,65 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
+i = 63
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/select.cpp
new file mode 100644
index 000000000..e13202d32
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/signed/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 64
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int<WIDTH> Bx,By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c4375f21c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/golden/select.log
@@ -0,0 +1,65 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
+i = 63
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/select.cpp
new file mode 100644
index 000000000..16701d45c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int/partselect/64bit/unsigned/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 64
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint<WIDTH> Bx,By;
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/select.cpp
new file mode 100644
index 000000000..368761f94
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/signed/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int_base Bx(WIDTH), By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (1<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (1<<i)? 1 : 0) );
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/select.cpp
new file mode 100644
index 000000000..6db3e0393
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/32bit/unsigned/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint_base Bx(WIDTH), By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (1<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (1<<i)? 1 : 0) );
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/golden/select.log
new file mode 100644
index 000000000..0f57bd1a4
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/golden/select.log
@@ -0,0 +1,49 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/select.cpp
new file mode 100644
index 000000000..d3cb83531
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/signed/select.cpp
@@ -0,0 +1,65 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 48
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int_base Bx(WIDTH),By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(uint64 j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (uint64(1)<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (uint64(1)<<i)? 1 : 0) );
+
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c4375f21c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/golden/select.log
@@ -0,0 +1,65 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
+i = 63
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/select.cpp
new file mode 100644
index 000000000..a6b3a3173
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/bitselect/64bit/unsigned/select.cpp
@@ -0,0 +1,65 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 64
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint_base Bx(WIDTH),By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(uint64 j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ sc_assert( (bool) Bx[i] == (j & (uint64(1)<<i)? 1 : 0) );
+ By[i] = Bx[i];
+ sc_assert( (bool) By[i] == (j & (uint64(1)<<i)? 1 : 0) );
+
+ }
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/concat.cpp
new file mode 100644
index 000000000..2dcee7146
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/concat.cpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 32
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_int_base a_si32(WIDTH), b_si32(WIDTH);
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_si32 = i;
+ b_si32 = (a_si32.range(WIDTH-1,i+1), a_si32.range(i,0));
+ sc_assert( a_si32 == b_si32 );
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/golden/concat.log
new file mode 100644
index 000000000..31bb32fc5
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/32bit/golden/concat.log
@@ -0,0 +1,32 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/concat.cpp
new file mode 100644
index 000000000..3fca84e38
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/concat.cpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 64
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_int_base a_si64(WIDTH), b_si64(WIDTH);
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_si64 = i;
+ b_si64 = (a_si64.range(WIDTH-1,i+1), a_si64.range(i,0));
+ sc_assert( a_si64 == b_si64 );
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/golden/concat.log
new file mode 100644
index 000000000..e47f7871b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/signed/64bit/golden/concat.log
@@ -0,0 +1,64 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/concat.cpp
new file mode 100644
index 000000000..bc85168dc
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/concat.cpp
@@ -0,0 +1,57 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 32
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_uint_base a_su32(WIDTH), b_su32(WIDTH);
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << ": ";
+ a_su32 = i;
+ b_su32 = (a_su32.range(WIDTH-1,i+1), a_su32.range(i,0));
+ // Output variables to avoid erroneous optimization observed on RHEL6 with g++-4.4.6.
+ cout << a_su32 << (a_su32 == b_su32 ? " == " : " != ") << b_su32 << endl;
+ sc_assert( a_su32 == b_su32 );
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/golden/concat.log
new file mode 100644
index 000000000..bb0fe1a22
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/32bit/golden/concat.log
@@ -0,0 +1,32 @@
+SystemC Simulation
+i = 0: 0 == 0
+i = 1: 1 == 1
+i = 2: 2 == 2
+i = 3: 3 == 3
+i = 4: 4 == 4
+i = 5: 5 == 5
+i = 6: 6 == 6
+i = 7: 7 == 7
+i = 8: 8 == 8
+i = 9: 9 == 9
+i = 10: 10 == 10
+i = 11: 11 == 11
+i = 12: 12 == 12
+i = 13: 13 == 13
+i = 14: 14 == 14
+i = 15: 15 == 15
+i = 16: 16 == 16
+i = 17: 17 == 17
+i = 18: 18 == 18
+i = 19: 19 == 19
+i = 20: 20 == 20
+i = 21: 21 == 21
+i = 22: 22 == 22
+i = 23: 23 == 23
+i = 24: 24 == 24
+i = 25: 25 == 25
+i = 26: 26 == 26
+i = 27: 27 == 27
+i = 28: 28 == 28
+i = 29: 29 == 29
+i = 30: 30 == 30
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/concat.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/concat.cpp
new file mode 100644
index 000000000..897840b90
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/concat.cpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ concat.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 WIDTH 64
+
+int sc_main(int ac, char* av[] )
+{
+
+ sc_uint_base a_su64(WIDTH), b_su64(WIDTH);
+
+ for(int i=0; i < WIDTH-1; i++ ){
+ cout << "i = " << i << endl;
+ a_su64 = i;
+ b_su64 = (a_su64.range(WIDTH-1,i+1), a_su64.range(i,0));
+ sc_assert( a_su64 == b_su64 );
+ }
+
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/golden/concat.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/golden/concat.log
new file mode 100644
index 000000000..e47f7871b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/concat/unsigned/64bit/golden/concat.log
@@ -0,0 +1,64 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/golden/test_int.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/golden/test_int.log
new file mode 100644
index 000000000..6237a8ce1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/golden/test_int.log
@@ -0,0 +1,38 @@
+SystemC Simulation
+x + a = 16
+++a = 9
+a-- = 9
+a = 9
+a[3] = 1
+a.range(4,0) = 9
+a = 9
+c = 9
+a = 15
+a = 23
+a = -121
+a = 19
+sb = 19
+sx = 1
+sy = 1
+sx = 1
+sy = 3
+s5 = 3
+s5 = -15
+sc8 = 16
+sc4 = 1
+u4 = 1
+u4 = 9
+sx = 6
+b = 0
+b = 1
+bva = 00000001
+lva = 00000001
+bva = 00000001
+ss8 = 1
+ss8 = 9
+b = 9
+b = 1
+ei8 = -118
+ei10 = -470
+bs4 = -8
+ds4 = -8
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/test_int.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/test_int.cpp
new file mode 100644
index 000000000..bcec788a6
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/mixed/test_int.cpp
@@ -0,0 +1,237 @@
+/*****************************************************************************
+
+ 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_int.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"
+
+
+int sc_main( int ac, char *av[] )
+{
+ sc_int_base a(8),b(8);
+ int x;
+
+
+
+ x = 8;
+ a = 8;
+ sc_assert( x == a);
+
+ cout << "x + a = " << x + a << endl;
+ cout << "++a = " << ++a << endl;
+ cout << "a-- = " << a-- << endl;
+
+ // bit-select on L.H.S.
+ a[0] = 1;
+ cout << "a = " << a << endl;
+
+ // bitselect on R.H.S.
+ cout << "a[3] = " << a[3] << endl;
+
+
+ // part-select on R.H.S
+ cout << "a.range(4,0) = " << a.range(4,0) << endl;
+ cout << "a = " << a << endl;
+
+ sc_int_base c(5);
+ c = a.range(4,0);
+ cout << "c = " << c << endl;
+
+ // part-select on L.H.S.
+ a.range(2,0) = 7;
+ cout << "a = " << a << endl;
+
+ a.range(4,2) = 5;
+ cout << "a = " << a << endl;
+
+ a.range(7,4) = 8;
+ cout << "a = " << a << endl;
+
+ // concat on R.H.S.
+ sc_int_base sx(4);
+ sx = 1;
+ sc_int_base sy(4);
+ sy = 3;
+ a = ( sx, sy );
+
+ cout << "a = " << a << endl;
+
+ sc_int_base sb(8);
+ // concat of part-selects
+ sb = ( a.range(7,4), a.range(3,0) );
+
+ cout << "sb = " << sb << endl;
+
+ ( sx, sy ) = 17;
+
+ cout << "sx = " << sx << endl;
+ cout << "sy = " << sy << endl;
+
+ // concat and part-selects
+ ( sx, sy ) = ( a.range(7,4), a.range(3,0) );
+
+ cout << "sx = " << sx << endl;
+ cout << "sy = " << sy << endl;
+
+ sc_int_base s5(5);
+
+ s5 = ( sx , a[4] );
+
+ cout << "s5 = " << s5 << endl;
+
+ s5 = (a[4],sx);
+ cout << "s5 = " << s5 << endl;
+
+ sc_bv<8> sc8;
+ sc_bv<4> sc4;
+
+ // ( sc8.range(7,4), sc4 ) = 17;
+ ( sc8.range(7,4), sc4 ) = "00010001";
+
+ cout << "sc8 = " << sc8.to_int() << endl;
+ cout << "sc4 = " << sc4.to_int() << endl;
+
+ sc_int_base sia(8);
+
+
+ sc_uint_base u4(4);
+
+ // part-select on sc_uint
+ u4 = sx.range(3,0);
+
+ cout << "u4 = " << u4 << endl;
+
+ u4[3] = sx[0];
+
+ cout << "u4 = " << u4 << endl;
+
+ sx = (u4.range(1,0), u4.range(3,2));
+
+ cout << "sx = " << sx << endl;
+
+ sc_bv<8> bva;
+ sc_lv<8> lva;
+
+ // Mixing bv, lv on the RHS
+
+ bva = "10000000";
+ lva = "10000001";
+
+ b = bva & "1010";
+ cout << "b = " << b << endl;
+
+ // b = lva ^ bva;
+ b = sc_bv<8>( lva ^ bva );
+ cout << "b = " << b << endl;
+
+ //Mixing bv, lv on the LHS
+
+ bva = b;
+ lva = b;
+
+ cout << "bva = " << bva << endl;
+ cout << "lva = " << lva << endl;
+
+ bva = b & lva.to_int();
+
+ cout << "bva = " << bva << endl;
+
+
+ //Mixing sc_signed on LHS
+
+ sc_signed ss8(8);
+ ss8 = b;
+ cout << "ss8 = " << ss8 << endl;
+
+ ss8 = u4;
+ cout << "ss8 = " << ss8 << endl;
+
+ // Mixing sc_signed/sc_unsigned on RHS
+ sc_unsigned su8(8);
+
+ su8 = 8;
+ b = su8 + 1;
+
+ cout << "b = " << b << endl;
+
+ b = ss8 * su8;
+ b = ss8 ^ su8;
+ su8 = bva.to_int() | ss8;
+
+ cout << "b = " << b << endl;
+
+ // Having more than two concats
+
+ sc_int_base ai2(2);
+ sc_int_base bi4(4);
+ sc_int_base ci2(2);
+ sc_int_base di2(2);
+ sc_int_base ei8(8);
+ sc_int_base ei10(10);
+
+ ai2 = 2;
+ bi4 = 2;
+ ci2 = 2;
+ di2 = 2;
+
+ ei8 = (ai2, bi4, ci2 );
+
+ cout << "ei8 = " << ei8 << endl;
+
+ ei10 = (ai2, bi4, ci2 , di2);
+
+ cout << "ei10 = " << ei10 << endl;
+
+ // bit-true behavior
+ sc_int_base bs4(4);
+ sc_signed ds4(4);
+
+ bs4[3] = 1;
+ bs4[2] = 0;
+ bs4[1] = 0;
+ bs4[0] = 0;
+
+ ds4[3] = 1;
+ ds4[2] = 0;
+ ds4[1] = 0;
+ ds4[0] = 0;
+
+
+ cout << "bs4 = " << bs4 << endl;
+ cout << "ds4 = " << ds4 << endl;
+
+ return 0;
+
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/select.cpp
new file mode 100644
index 000000000..889841069
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/signed/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int_base Bx(WIDTH),By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c81b8ffe9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/golden/select.log
@@ -0,0 +1,33 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/select.cpp
new file mode 100644
index 000000000..804cf21eb
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/32bit/unsigned/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 32
+#define COUNT 100000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint_base Bx(WIDTH), By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/golden/select.log
new file mode 100644
index 000000000..c4375f21c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/golden/select.log
@@ -0,0 +1,65 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
+i = 63
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/select.cpp
new file mode 100644
index 000000000..794f4eeaa
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/signed/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 64
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_int_base Bx(WIDTH),By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/golden/select.log b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/golden/select.log
new file mode 100644
index 000000000..c4375f21c
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/golden/select.log
@@ -0,0 +1,65 @@
+SystemC Simulation
+i = 0
+i = 1
+i = 2
+i = 3
+i = 4
+i = 5
+i = 6
+i = 7
+i = 8
+i = 9
+i = 10
+i = 11
+i = 12
+i = 13
+i = 14
+i = 15
+i = 16
+i = 17
+i = 18
+i = 19
+i = 20
+i = 21
+i = 22
+i = 23
+i = 24
+i = 25
+i = 26
+i = 27
+i = 28
+i = 29
+i = 30
+i = 31
+i = 32
+i = 33
+i = 34
+i = 35
+i = 36
+i = 37
+i = 38
+i = 39
+i = 40
+i = 41
+i = 42
+i = 43
+i = 44
+i = 45
+i = 46
+i = 47
+i = 48
+i = 49
+i = 50
+i = 51
+i = 52
+i = 53
+i = 54
+i = 55
+i = 56
+i = 57
+i = 58
+i = 59
+i = 60
+i = 61
+i = 62
+i = 63
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/select.cpp b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/select.cpp
new file mode 100644
index 000000000..072d1b784
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_int_base/partselect/64bit/unsigned/select.cpp
@@ -0,0 +1,64 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ select.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 WIDTH 64
+#define COUNT 10000
+
+int sc_main( int ac, char* av[] )
+{
+ sc_uint_base Bx(WIDTH),By(WIDTH);
+
+ for(unsigned int i = 0; i < WIDTH; i++){
+ cout << "i = " << i << endl;
+ for(unsigned int j=0; j < COUNT; j++ ){
+
+ /* ( By.range(WIDTH-1, i+1), By.range(i,0) ) = Bx;
+ sc_assert( By == Bx );
+ */
+
+ Bx = j;
+ By.range(WIDTH-1,i) = Bx.range(WIDTH-1,i);
+ if(i >= 1)
+ By.range(i-1,0) = Bx.range(i-1,0);
+ sc_assert( Bx == By );
+ }
+ }
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/golden/test01.log
new file mode 100644
index 000000000..52572ed45
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/golden/test01.log
@@ -0,0 +1,4 @@
+SystemC Simulation
+
+Error: (E5) out of bounds: sc_bigint bit selection: index = 3 violates 0 <= index <= 2
+In file: <removed by verify.pl>
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/test01.cpp
new file mode 100644
index 000000000..7808733b7
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/bit_select/test01/test01.cpp
@@ -0,0 +1,11 @@
+#include "systemc.h"
+int sc_main(int argc, char** argv)
+{
+ sc_bigint<3> bi;
+
+ cout << bi[3] << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/golden/test01.log
new file mode 100644
index 000000000..c5f034b66
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/golden/test01.log
@@ -0,0 +1,5 @@
+SystemC Simulation
+
+Error: (E5) out of bounds: sc_bigint part selection: left = 3, right = 2
+ violates either (2 >= left >= 0) or (2 >= right >= 0)
+In file: <removed by verify.pl>
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/test01.cpp
new file mode 100644
index 000000000..f73acc6ac
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test01/test01.cpp
@@ -0,0 +1,13 @@
+#define SC_INCLUDE_FX
+
+#include "systemc.h"
+int sc_main(int argc, char** argv)
+{
+ sc_bigint<3> big;
+
+ cout << big(3,2) << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/golden/test02.log
new file mode 100644
index 000000000..7d77fe55e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/golden/test02.log
@@ -0,0 +1,3 @@
+SystemC Simulation
+0
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/test02.cpp
new file mode 100644
index 000000000..7a53a2ef3
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test02/test02.cpp
@@ -0,0 +1,13 @@
+#define SC_INCLUDE_FX
+
+#include "systemc.h"
+int sc_main(int argc, char** argv)
+{
+ sc_bigint<3> big;
+
+ cout << big(1,2) << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/golden/test03.log
new file mode 100644
index 000000000..fd3a70e1a
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/golden/test03.log
@@ -0,0 +1,7 @@
+SystemC Simulation
+0021 0021
+0021 0021
+21 21
+0021
+00021
+00021
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/test03.cpp
new file mode 100644
index 000000000..abb4b033f
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test03/test03.cpp
@@ -0,0 +1,71 @@
+/*****************************************************************************
+
+ 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 -- test for unsigned data values
+
+ Original Author:
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+#include "systemc.h"
+
+int sc_main(int argc, char** argv) {
+ sc_int<16> a, tmp;
+ sc_bigint<16> biga, bigtmp;
+ sc_biguint<6> bigu6;
+ sc_biguint<16> bigu16;
+
+ a = 97; // 0b1100001
+ biga = 97;
+ bigu6 = 97;
+
+ tmp = a.range( 5,0 ); // results in 33 - 0b100001, not sign extended
+ bigtmp = biga.range( 5,0 ); // results in 65505, sign extended
+ cout << hex << tmp << " " << bigtmp << endl;
+
+ tmp = biga.range( 5,0 ); // results in 33 - 0b100001, not sign extended
+ bigtmp = a.range( 5,0 ); // results in 65505, sign extended
+ cout << hex << tmp << " " << bigtmp << endl;
+
+ cout << hex << a.range(5,0) << " " << biga.range(5,0) << endl;
+
+ bigtmp = bigu6;
+ cout << hex << bigtmp << endl;
+
+ bigu16 = biga.range(5,0);
+ cout << bigu16 << endl;
+
+ bigu16 = a.range(5,0);
+ cout << hex << bigu16 << endl;
+
+ sc_start(1, SC_NS);
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/golden/test04.log b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/golden/test04.log
new file mode 100644
index 000000000..5905e23ba
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/golden/test04.log
@@ -0,0 +1,5 @@
+SystemC Simulation
+1234fa78
+12340a78
+12340a78
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/test04.cpp b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/test04.cpp
new file mode 100644
index 000000000..6a595ace1
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_signed/part_select/test04/test04.cpp
@@ -0,0 +1,60 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ test04.cpp -- test sign extension in part select assignments.
+
+ Original Author: Andy Goodrich, Forte Design Systems, 29 April 2008
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+#include "systemc.h"
+#define TERM(EXPR) cout << #EXPR << " " << hex << (EXPR) << endl
+
+
+int sc_main(int argc, char* argv[])
+{
+ sc_bigint<31> a;
+ sc_bigint<4> b = 0xa;
+ sc_bigint<5> c = 0x0a;
+ sc_biguint<4> d = 0x0a;
+ a = 0x12345678;
+ a.range(15,8) = b;
+ cout << hex << a << endl;
+ a = 0x12345678;
+ a.range(15,8) = c;
+ cout << hex << a << endl;
+ a = 0x12345678;
+ a.range(15,8) = d;
+ cout << hex << a << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/bsps1.cpp b/src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/bsps1.cpp
new file mode 100644
index 000000000..b11825a62
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/bsps1.cpp
@@ -0,0 +1,75 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ bsps1.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"
+
+int
+sc_main(int ac, char* av[])
+{
+ sc_int<32> x;
+
+ x = 0;
+ x[1] = 1;
+ x[2] = 1;
+ x[3] = 0;
+ x[4] = 0;
+ x[5] = 1;
+
+ sc_assert( x == 38 );
+ cout << x << endl;
+
+ x[5] = 0;
+ x[31] = 1;
+
+#if !defined( _MSC_VER )
+ sc_assert((uint64)x == 0xffffffff80000006ULL);
+#else
+ sc_assert((uint64)x == 0xffffffff80000006ui64);
+#endif
+ cout << x << endl;
+
+ x.range(31,5) = 10;
+ sc_assert(x == 326);
+ cout << x << endl;
+
+ x = 0;
+ x.range(21,7) = 9;
+ sc_assert(x == 1152);
+ cout << x << endl;
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/golden/bsps1.log b/src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/golden/bsps1.log
new file mode 100644
index 000000000..7b20c49d2
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_small/bsps1/golden/bsps1.log
@@ -0,0 +1,5 @@
+SystemC Simulation
+38
+-2147483642
+326
+1152
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_small/test_small/golden/test_small.log b/src/systemc/tests/systemc/datatypes/int/sc_small/test_small/golden/test_small.log
new file mode 100644
index 000000000..3a51f62c9
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_small/test_small/golden/test_small.log
@@ -0,0 +1,18 @@
+SystemC Simulation
+a = -8 b = 8
+a = -7 b = 9
+a = 7 b = 7
+a = 0 b = 0
+a = 0 b = 0
+a = -4 b = 4
+a = -4 b = 4
+a = 0 b = 0
+a = -4 b = 12
+a = -4 b = 12
+a = -2 b = 2 c = -2
+a = 0 b = 0
+a = -4 b = 4
+a = -8 b = 8
+a = -7 b = 9
+a = -8 b = 8
+a = 7 b = 7
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_small/test_small/test_small.cpp b/src/systemc/tests/systemc/datatypes/int/sc_small/test_small/test_small.cpp
new file mode 100644
index 000000000..d40bf8442
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_small/test_small/test_small.cpp
@@ -0,0 +1,120 @@
+/*****************************************************************************
+
+ 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_small.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"
+
+
+int sc_main(int argc, char* argv[])
+{
+ sc_int<4> a(8);
+ sc_uint<4> b(8);
+
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a += 1;
+ b += 1;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a -= 1;
+ b -= 1;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a *= 2;
+ b *= 2;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a = a * 2;
+ b = b * 2;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a /= 2;
+ b /= 2;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a = a/2;
+ b = b/2;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a &= 0x04;
+ b &= 0x04;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a |= 0x04;
+ b |= 0x04;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a ^= 0x04;
+ b ^= 0x04;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ int c = -8;
+ c %= 6;
+ a %= 6;
+ b %= 6;
+ cout << "a = " << a << " " << "b = " << b << " " << "c = " << c << endl;
+ a = 8;
+ b = 8;
+ a <<= 1;
+ b <<= 1;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ a >>= 1;
+ b >>= 1;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ a = 8;
+ b = 8;
+ cout << "a = " << a++ << " " << "b = " << b++ << endl;
+ a = 8;
+ b = 8;
+ cout << "a = " << ++a << " " << "b = " << ++b << endl;
+ a = 8;
+ b = 8;
+ cout << "a = " << a-- << " " << "b = " << b-- << endl;
+ a = 8;
+ b = 8;
+ cout << "a = " << --a << " " << "b = " << --b << endl;
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/golden/test01.log
new file mode 100644
index 000000000..912f0b58b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/golden/test01.log
@@ -0,0 +1,4 @@
+SystemC Simulation
+
+Error: (E5) out of bounds: sc_biguint bit selection: index = 3 violates 0 <= index <= 2
+In file: <removed by verify.pl>
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/test01.cpp
new file mode 100644
index 000000000..7881023b7
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/bit_select/test01/test01.cpp
@@ -0,0 +1,11 @@
+#include "systemc.h"
+int sc_main(int argc, char** argv)
+{
+ sc_biguint<3> bi;
+
+ cout << bi[3] << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/golden/minus.log b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/golden/minus.log
new file mode 100644
index 000000000..db9dc092e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/golden/minus.log
@@ -0,0 +1,5 @@
+SystemC Simulation
+a = 2 b = 4
+a - b = -2
+a - 4 = -2
+2 - b = -2
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/minus.cpp b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/minus.cpp
new file mode 100644
index 000000000..e6aa7341e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/minus/minus.cpp
@@ -0,0 +1,55 @@
+/*****************************************************************************
+
+ 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.
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ minus.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"
+
+
+int sc_main(int argc, char* argv[] )
+{
+ sc_unsigned a(3);
+ sc_unsigned b(3);
+
+
+ a = 2;
+ b = 4;
+ cout << "a = " << a << " " << "b = " << b << endl;
+ cout << "a - b = " << (a - b) << endl;
+ cout << "a - 4 = " << (a - 4) << endl;
+ cout << "2 - b = " << (2 - b) << endl;
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/golden/test01.log
new file mode 100644
index 000000000..ec36436ab
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/golden/test01.log
@@ -0,0 +1,5 @@
+SystemC Simulation
+
+Error: (E5) out of bounds: sc_biguint part selection: left = 3, right = 1
+ violates either (2 >= left >= 0) or (2 >= right >= 0)
+In file: <removed by verify.pl>
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/test01.cpp
new file mode 100644
index 000000000..c4a06e742
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test01/test01.cpp
@@ -0,0 +1,13 @@
+#define SC_INCLUDE_FX
+
+#include "systemc.h"
+int sc_main(int argc, char** argv)
+{
+ sc_biguint<3> big;
+
+ cout << big(3,1) << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/golden/test02.log
new file mode 100644
index 000000000..7d77fe55e
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/golden/test02.log
@@ -0,0 +1,3 @@
+SystemC Simulation
+0
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/test02.cpp
new file mode 100644
index 000000000..2cd2666ff
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test02/test02.cpp
@@ -0,0 +1,13 @@
+#define SC_INCLUDE_FX
+
+#include "systemc.h"
+int sc_main(int argc, char** argv)
+{
+ sc_biguint<3> big;
+
+ cout << big(1,2) << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
+
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/golden/test03.log
new file mode 100644
index 000000000..8c59f08ba
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/golden/test03.log
@@ -0,0 +1,5 @@
+SystemC Simulation
+12340a78
+12340a78
+12340a78
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/test03.cpp
new file mode 100644
index 000000000..7d92e3920
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/sc_unsigned/part_select/test03/test03.cpp
@@ -0,0 +1,60 @@
+/*****************************************************************************
+
+ 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 -- test sign extension in part select assignments.
+
+ Original Author: Andy Goodrich, Forte Design Systems, 29 April 2008
+
+ *****************************************************************************/
+
+/*****************************************************************************
+
+ MODIFICATION LOG - modifiers, enter your name, affiliation, date and
+ changes you are making here.
+
+ Name, Affiliation, Date:
+ Description of Modification:
+
+ *****************************************************************************/
+
+#include "systemc.h"
+#define TERM(EXPR) cout << #EXPR << " " << hex << (EXPR) << endl
+
+
+int sc_main(int argc, char* argv[])
+{
+ sc_biguint<31> a;
+ sc_bigint<4> b = 0xa;
+ sc_bigint<5> c = 0x0a;
+ sc_biguint<4> d = 0x0a;
+ a = 0x12345678;
+ a.range(15,8) = b;
+ cout << hex << a << endl;
+ a = 0x12345678;
+ a.range(15,8) = c;
+ cout << hex << a << endl;
+ a = 0x12345678;
+ a.range(15,8) = d;
+ cout << hex << a << endl;
+
+ cout << "Program completed" << endl;
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test01/golden/test01.log b/src/systemc/tests/systemc/datatypes/int/string_conversion/test01/golden/test01.log
new file mode 100644
index 000000000..414113f5b
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test01/golden/test01.log
@@ -0,0 +1,32 @@
+SystemC Simulation
+*** test_string_conversions
+sc_int
+-1
+0b11111111
+negative
+-0bsm00000001
+0o777
+negative
+-0osm001
+0xff
+negative
+-0xsm01
+-1
+0csd0000000-
+-1
+255
+sc_uint
+255
+0b011111111
+0bus11111111
+0bsm11111111
+0o377
+0ous377
+0osm377
+0x0ff
+0xusff
+0xsmff
+255
+0csd10000000-
+255
+255
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test01/test01.cpp b/src/systemc/tests/systemc/datatypes/int/string_conversion/test01/test01.cpp
new file mode 100644
index 000000000..93e6a01cf
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test01/test01.cpp
@@ -0,0 +1,200 @@
+/*****************************************************************************
+
+ 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 string conversion of sc_[u]int
+
+#include "systemc.h"
+
+void
+test_string_conversions()
+{
+ cout << "*** test_string_conversions" << endl;
+ {
+ cout << "sc_int" << endl;
+
+ sc_int<8> a = -1;
+ sc_int<8> b;
+ 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 );
+
+ sc_int<8> c( a.to_string().c_str() );
+ cout << c.to_string() << endl;
+
+ c.range( 7, 0 ) = a.to_string().c_str();
+ cout << c.range( 7, 0 ).to_string() << endl;
+ }
+ {
+ cout << "sc_uint" << endl;
+
+ sc_uint<8> a = -1;
+ sc_uint<8> b;
+ 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 );
+
+ sc_uint<8> c( a.to_string().c_str() );
+ cout << c.to_string() << endl;
+
+ c.range( 7, 0 ) = a.to_string().c_str();
+ cout << c.range( 7, 0 ).to_string() << endl;
+ }
+}
+
+int
+sc_main( int, char*[] )
+{
+ test_string_conversions();
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test02/golden/test02.log b/src/systemc/tests/systemc/datatypes/int/string_conversion/test02/golden/test02.log
new file mode 100644
index 000000000..569edd142
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test02/golden/test02.log
@@ -0,0 +1,32 @@
+SystemC Simulation
+*** test_string_conversions
+sc_bigint
+-1
+0b11111111
+negative
+-0bsm00000001
+0o777
+negative
+-0osm001
+0xff
+negative
+-0xsm01
+-1
+0csd0000000-
+-1
+255
+sc_biguint
+255
+0b011111111
+0bus11111111
+0bsm11111111
+0o377
+0ous377
+0osm377
+0x0ff
+0xusff
+0xsmff
+255
+0csd10000000-
+255
+255
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test02/test02.cpp b/src/systemc/tests/systemc/datatypes/int/string_conversion/test02/test02.cpp
new file mode 100644
index 000000000..3a7e825af
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test02/test02.cpp
@@ -0,0 +1,200 @@
+/*****************************************************************************
+
+ 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: 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 string conversion of sc_big[u]int
+
+#include "systemc.h"
+
+void
+test_string_conversions()
+{
+ cout << "*** test_string_conversions" << endl;
+ {
+ cout << "sc_bigint" << endl;
+
+ sc_bigint<8> a = -1;
+ sc_bigint<8> b;
+ 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 );
+
+ sc_bigint<8> c( a.to_string().c_str() );
+ cout << c.to_string() << endl;
+
+ c.range( 7, 0 ) = a.to_string().c_str();
+ cout << c.range( 7, 0 ).to_string() << endl;
+ }
+ {
+ cout << "sc_biguint" << endl;
+
+ sc_biguint<8> a = -1;
+ sc_biguint<8> b;
+ 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 );
+
+ sc_biguint<8> c( a.to_string().c_str() );
+ cout << c.to_string() << endl;
+
+ c.range( 7, 0 ) = a.to_string().c_str();
+ cout << c.range( 7, 0 ).to_string() << endl;
+ }
+}
+
+int
+sc_main( int, char*[] )
+{
+ test_string_conversions();
+
+ return 0;
+}
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/golden/test03.log b/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/golden/test03.log
new file mode 100644
index 000000000..abe5227d3
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/golden/test03.log
@@ -0,0 +1,1550 @@
+SystemC Simulation
+
+sc_bigint<8>
+ d: 0 o: 000 x: 00 d: 0d0 o: 0o000 x: 0x00
+ d: 1 o: 001 x: 01 d: 0d1 o: 0o001 x: 0x01
+ d: 2 o: 002 x: 02 d: 0d2 o: 0o002 x: 0x02
+ d: 3 o: 003 x: 03 d: 0d3 o: 0o003 x: 0x03
+ d: 4 o: 004 x: 04 d: 0d4 o: 0o004 x: 0x04
+ d: 5 o: 005 x: 05 d: 0d5 o: 0o005 x: 0x05
+ d: 6 o: 006 x: 06 d: 0d6 o: 0o006 x: 0x06
+ d: 7 o: 007 x: 07 d: 0d7 o: 0o007 x: 0x07
+ d: 8 o: 010 x: 08 d: 0d8 o: 0o010 x: 0x08
+ d: 9 o: 011 x: 09 d: 0d9 o: 0o011 x: 0x09
+ d: 10 o: 012 x: 0a d: 0d10 o: 0o012 x: 0x0a
+ d: 11 o: 013 x: 0b d: 0d11 o: 0o013 x: 0x0b
+ d: 12 o: 014 x: 0c d: 0d12 o: 0o014 x: 0x0c
+ d: 13 o: 015 x: 0d d: 0d13 o: 0o015 x: 0x0d
+ d: 14 o: 016 x: 0e d: 0d14 o: 0o016 x: 0x0e
+ d: 15 o: 017 x: 0f d: 0d15 o: 0o017 x: 0x0f
+ d: 16 o: 020 x: 10 d: 0d16 o: 0o020 x: 0x10
+ d: 17 o: 021 x: 11 d: 0d17 o: 0o021 x: 0x11
+ d: 18 o: 022 x: 12 d: 0d18 o: 0o022 x: 0x12
+ d: 19 o: 023 x: 13 d: 0d19 o: 0o023 x: 0x13
+ d: 20 o: 024 x: 14 d: 0d20 o: 0o024 x: 0x14
+ d: 21 o: 025 x: 15 d: 0d21 o: 0o025 x: 0x15
+ d: 22 o: 026 x: 16 d: 0d22 o: 0o026 x: 0x16
+ d: 23 o: 027 x: 17 d: 0d23 o: 0o027 x: 0x17
+ d: 24 o: 030 x: 18 d: 0d24 o: 0o030 x: 0x18
+ d: 25 o: 031 x: 19 d: 0d25 o: 0o031 x: 0x19
+ d: 26 o: 032 x: 1a d: 0d26 o: 0o032 x: 0x1a
+ d: 27 o: 033 x: 1b d: 0d27 o: 0o033 x: 0x1b
+ d: 28 o: 034 x: 1c d: 0d28 o: 0o034 x: 0x1c
+ d: 29 o: 035 x: 1d d: 0d29 o: 0o035 x: 0x1d
+ d: 30 o: 036 x: 1e d: 0d30 o: 0o036 x: 0x1e
+ d: 31 o: 037 x: 1f d: 0d31 o: 0o037 x: 0x1f
+ d: 32 o: 040 x: 20 d: 0d32 o: 0o040 x: 0x20
+ d: 33 o: 041 x: 21 d: 0d33 o: 0o041 x: 0x21
+ d: 34 o: 042 x: 22 d: 0d34 o: 0o042 x: 0x22
+ d: 35 o: 043 x: 23 d: 0d35 o: 0o043 x: 0x23
+ d: 36 o: 044 x: 24 d: 0d36 o: 0o044 x: 0x24
+ d: 37 o: 045 x: 25 d: 0d37 o: 0o045 x: 0x25
+ d: 38 o: 046 x: 26 d: 0d38 o: 0o046 x: 0x26
+ d: 39 o: 047 x: 27 d: 0d39 o: 0o047 x: 0x27
+ d: 40 o: 050 x: 28 d: 0d40 o: 0o050 x: 0x28
+ d: 41 o: 051 x: 29 d: 0d41 o: 0o051 x: 0x29
+ d: 42 o: 052 x: 2a d: 0d42 o: 0o052 x: 0x2a
+ d: 43 o: 053 x: 2b d: 0d43 o: 0o053 x: 0x2b
+ d: 44 o: 054 x: 2c d: 0d44 o: 0o054 x: 0x2c
+ d: 45 o: 055 x: 2d d: 0d45 o: 0o055 x: 0x2d
+ d: 46 o: 056 x: 2e d: 0d46 o: 0o056 x: 0x2e
+ d: 47 o: 057 x: 2f d: 0d47 o: 0o057 x: 0x2f
+ d: 48 o: 060 x: 30 d: 0d48 o: 0o060 x: 0x30
+ d: 49 o: 061 x: 31 d: 0d49 o: 0o061 x: 0x31
+ d: 50 o: 062 x: 32 d: 0d50 o: 0o062 x: 0x32
+ d: 51 o: 063 x: 33 d: 0d51 o: 0o063 x: 0x33
+ d: 52 o: 064 x: 34 d: 0d52 o: 0o064 x: 0x34
+ d: 53 o: 065 x: 35 d: 0d53 o: 0o065 x: 0x35
+ d: 54 o: 066 x: 36 d: 0d54 o: 0o066 x: 0x36
+ d: 55 o: 067 x: 37 d: 0d55 o: 0o067 x: 0x37
+ d: 56 o: 070 x: 38 d: 0d56 o: 0o070 x: 0x38
+ d: 57 o: 071 x: 39 d: 0d57 o: 0o071 x: 0x39
+ d: 58 o: 072 x: 3a d: 0d58 o: 0o072 x: 0x3a
+ d: 59 o: 073 x: 3b d: 0d59 o: 0o073 x: 0x3b
+ d: 60 o: 074 x: 3c d: 0d60 o: 0o074 x: 0x3c
+ d: 61 o: 075 x: 3d d: 0d61 o: 0o075 x: 0x3d
+ d: 62 o: 076 x: 3e d: 0d62 o: 0o076 x: 0x3e
+ d: 63 o: 077 x: 3f d: 0d63 o: 0o077 x: 0x3f
+ d: 64 o: 100 x: 40 d: 0d64 o: 0o100 x: 0x40
+ d: 65 o: 101 x: 41 d: 0d65 o: 0o101 x: 0x41
+ d: 66 o: 102 x: 42 d: 0d66 o: 0o102 x: 0x42
+ d: 67 o: 103 x: 43 d: 0d67 o: 0o103 x: 0x43
+ d: 68 o: 104 x: 44 d: 0d68 o: 0o104 x: 0x44
+ d: 69 o: 105 x: 45 d: 0d69 o: 0o105 x: 0x45
+ d: 70 o: 106 x: 46 d: 0d70 o: 0o106 x: 0x46
+ d: 71 o: 107 x: 47 d: 0d71 o: 0o107 x: 0x47
+ d: 72 o: 110 x: 48 d: 0d72 o: 0o110 x: 0x48
+ d: 73 o: 111 x: 49 d: 0d73 o: 0o111 x: 0x49
+ d: 74 o: 112 x: 4a d: 0d74 o: 0o112 x: 0x4a
+ d: 75 o: 113 x: 4b d: 0d75 o: 0o113 x: 0x4b
+ d: 76 o: 114 x: 4c d: 0d76 o: 0o114 x: 0x4c
+ d: 77 o: 115 x: 4d d: 0d77 o: 0o115 x: 0x4d
+ d: 78 o: 116 x: 4e d: 0d78 o: 0o116 x: 0x4e
+ d: 79 o: 117 x: 4f d: 0d79 o: 0o117 x: 0x4f
+ d: 80 o: 120 x: 50 d: 0d80 o: 0o120 x: 0x50
+ d: 81 o: 121 x: 51 d: 0d81 o: 0o121 x: 0x51
+ d: 82 o: 122 x: 52 d: 0d82 o: 0o122 x: 0x52
+ d: 83 o: 123 x: 53 d: 0d83 o: 0o123 x: 0x53
+ d: 84 o: 124 x: 54 d: 0d84 o: 0o124 x: 0x54
+ d: 85 o: 125 x: 55 d: 0d85 o: 0o125 x: 0x55
+ d: 86 o: 126 x: 56 d: 0d86 o: 0o126 x: 0x56
+ d: 87 o: 127 x: 57 d: 0d87 o: 0o127 x: 0x57
+ d: 88 o: 130 x: 58 d: 0d88 o: 0o130 x: 0x58
+ d: 89 o: 131 x: 59 d: 0d89 o: 0o131 x: 0x59
+ d: 90 o: 132 x: 5a d: 0d90 o: 0o132 x: 0x5a
+ d: 91 o: 133 x: 5b d: 0d91 o: 0o133 x: 0x5b
+ d: 92 o: 134 x: 5c d: 0d92 o: 0o134 x: 0x5c
+ d: 93 o: 135 x: 5d d: 0d93 o: 0o135 x: 0x5d
+ d: 94 o: 136 x: 5e d: 0d94 o: 0o136 x: 0x5e
+ d: 95 o: 137 x: 5f d: 0d95 o: 0o137 x: 0x5f
+ d: 96 o: 140 x: 60 d: 0d96 o: 0o140 x: 0x60
+ d: 97 o: 141 x: 61 d: 0d97 o: 0o141 x: 0x61
+ d: 98 o: 142 x: 62 d: 0d98 o: 0o142 x: 0x62
+ d: 99 o: 143 x: 63 d: 0d99 o: 0o143 x: 0x63
+ d: 100 o: 144 x: 64 d: 0d100 o: 0o144 x: 0x64
+ d: 101 o: 145 x: 65 d: 0d101 o: 0o145 x: 0x65
+ d: 102 o: 146 x: 66 d: 0d102 o: 0o146 x: 0x66
+ d: 103 o: 147 x: 67 d: 0d103 o: 0o147 x: 0x67
+ d: 104 o: 150 x: 68 d: 0d104 o: 0o150 x: 0x68
+ d: 105 o: 151 x: 69 d: 0d105 o: 0o151 x: 0x69
+ d: 106 o: 152 x: 6a d: 0d106 o: 0o152 x: 0x6a
+ d: 107 o: 153 x: 6b d: 0d107 o: 0o153 x: 0x6b
+ d: 108 o: 154 x: 6c d: 0d108 o: 0o154 x: 0x6c
+ d: 109 o: 155 x: 6d d: 0d109 o: 0o155 x: 0x6d
+ d: 110 o: 156 x: 6e d: 0d110 o: 0o156 x: 0x6e
+ d: 111 o: 157 x: 6f d: 0d111 o: 0o157 x: 0x6f
+ d: 112 o: 160 x: 70 d: 0d112 o: 0o160 x: 0x70
+ d: 113 o: 161 x: 71 d: 0d113 o: 0o161 x: 0x71
+ d: 114 o: 162 x: 72 d: 0d114 o: 0o162 x: 0x72
+ d: 115 o: 163 x: 73 d: 0d115 o: 0o163 x: 0x73
+ d: 116 o: 164 x: 74 d: 0d116 o: 0o164 x: 0x74
+ d: 117 o: 165 x: 75 d: 0d117 o: 0o165 x: 0x75
+ d: 118 o: 166 x: 76 d: 0d118 o: 0o166 x: 0x76
+ d: 119 o: 167 x: 77 d: 0d119 o: 0o167 x: 0x77
+ d: 120 o: 170 x: 78 d: 0d120 o: 0o170 x: 0x78
+ d: 121 o: 171 x: 79 d: 0d121 o: 0o171 x: 0x79
+ d: 122 o: 172 x: 7a d: 0d122 o: 0o172 x: 0x7a
+ d: 123 o: 173 x: 7b d: 0d123 o: 0o173 x: 0x7b
+ d: 124 o: 174 x: 7c d: 0d124 o: 0o174 x: 0x7c
+ d: 125 o: 175 x: 7d d: 0d125 o: 0o175 x: 0x7d
+ d: 126 o: 176 x: 7e d: 0d126 o: 0o176 x: 0x7e
+ d: 127 o: 177 x: 7f d: 0d127 o: 0o177 x: 0x7f
+ d: -128 o: 600 x: 80 d: -0d128 o: 0o600 x: 0x80
+ d: -127 o: 601 x: 81 d: -0d127 o: 0o601 x: 0x81
+ d: -126 o: 602 x: 82 d: -0d126 o: 0o602 x: 0x82
+ d: -125 o: 603 x: 83 d: -0d125 o: 0o603 x: 0x83
+ d: -124 o: 604 x: 84 d: -0d124 o: 0o604 x: 0x84
+ d: -123 o: 605 x: 85 d: -0d123 o: 0o605 x: 0x85
+ d: -122 o: 606 x: 86 d: -0d122 o: 0o606 x: 0x86
+ d: -121 o: 607 x: 87 d: -0d121 o: 0o607 x: 0x87
+ d: -120 o: 610 x: 88 d: -0d120 o: 0o610 x: 0x88
+ d: -119 o: 611 x: 89 d: -0d119 o: 0o611 x: 0x89
+ d: -118 o: 612 x: 8a d: -0d118 o: 0o612 x: 0x8a
+ d: -117 o: 613 x: 8b d: -0d117 o: 0o613 x: 0x8b
+ d: -116 o: 614 x: 8c d: -0d116 o: 0o614 x: 0x8c
+ d: -115 o: 615 x: 8d d: -0d115 o: 0o615 x: 0x8d
+ d: -114 o: 616 x: 8e d: -0d114 o: 0o616 x: 0x8e
+ d: -113 o: 617 x: 8f d: -0d113 o: 0o617 x: 0x8f
+ d: -112 o: 620 x: 90 d: -0d112 o: 0o620 x: 0x90
+ d: -111 o: 621 x: 91 d: -0d111 o: 0o621 x: 0x91
+ d: -110 o: 622 x: 92 d: -0d110 o: 0o622 x: 0x92
+ d: -109 o: 623 x: 93 d: -0d109 o: 0o623 x: 0x93
+ d: -108 o: 624 x: 94 d: -0d108 o: 0o624 x: 0x94
+ d: -107 o: 625 x: 95 d: -0d107 o: 0o625 x: 0x95
+ d: -106 o: 626 x: 96 d: -0d106 o: 0o626 x: 0x96
+ d: -105 o: 627 x: 97 d: -0d105 o: 0o627 x: 0x97
+ d: -104 o: 630 x: 98 d: -0d104 o: 0o630 x: 0x98
+ d: -103 o: 631 x: 99 d: -0d103 o: 0o631 x: 0x99
+ d: -102 o: 632 x: 9a d: -0d102 o: 0o632 x: 0x9a
+ d: -101 o: 633 x: 9b d: -0d101 o: 0o633 x: 0x9b
+ d: -100 o: 634 x: 9c d: -0d100 o: 0o634 x: 0x9c
+ d: -99 o: 635 x: 9d d: -0d99 o: 0o635 x: 0x9d
+ d: -98 o: 636 x: 9e d: -0d98 o: 0o636 x: 0x9e
+ d: -97 o: 637 x: 9f d: -0d97 o: 0o637 x: 0x9f
+ d: -96 o: 640 x: a0 d: -0d96 o: 0o640 x: 0xa0
+ d: -95 o: 641 x: a1 d: -0d95 o: 0o641 x: 0xa1
+ d: -94 o: 642 x: a2 d: -0d94 o: 0o642 x: 0xa2
+ d: -93 o: 643 x: a3 d: -0d93 o: 0o643 x: 0xa3
+ d: -92 o: 644 x: a4 d: -0d92 o: 0o644 x: 0xa4
+ d: -91 o: 645 x: a5 d: -0d91 o: 0o645 x: 0xa5
+ d: -90 o: 646 x: a6 d: -0d90 o: 0o646 x: 0xa6
+ d: -89 o: 647 x: a7 d: -0d89 o: 0o647 x: 0xa7
+ d: -88 o: 650 x: a8 d: -0d88 o: 0o650 x: 0xa8
+ d: -87 o: 651 x: a9 d: -0d87 o: 0o651 x: 0xa9
+ d: -86 o: 652 x: aa d: -0d86 o: 0o652 x: 0xaa
+ d: -85 o: 653 x: ab d: -0d85 o: 0o653 x: 0xab
+ d: -84 o: 654 x: ac d: -0d84 o: 0o654 x: 0xac
+ d: -83 o: 655 x: ad d: -0d83 o: 0o655 x: 0xad
+ d: -82 o: 656 x: ae d: -0d82 o: 0o656 x: 0xae
+ d: -81 o: 657 x: af d: -0d81 o: 0o657 x: 0xaf
+ d: -80 o: 660 x: b0 d: -0d80 o: 0o660 x: 0xb0
+ d: -79 o: 661 x: b1 d: -0d79 o: 0o661 x: 0xb1
+ d: -78 o: 662 x: b2 d: -0d78 o: 0o662 x: 0xb2
+ d: -77 o: 663 x: b3 d: -0d77 o: 0o663 x: 0xb3
+ d: -76 o: 664 x: b4 d: -0d76 o: 0o664 x: 0xb4
+ d: -75 o: 665 x: b5 d: -0d75 o: 0o665 x: 0xb5
+ d: -74 o: 666 x: b6 d: -0d74 o: 0o666 x: 0xb6
+ d: -73 o: 667 x: b7 d: -0d73 o: 0o667 x: 0xb7
+ d: -72 o: 670 x: b8 d: -0d72 o: 0o670 x: 0xb8
+ d: -71 o: 671 x: b9 d: -0d71 o: 0o671 x: 0xb9
+ d: -70 o: 672 x: ba d: -0d70 o: 0o672 x: 0xba
+ d: -69 o: 673 x: bb d: -0d69 o: 0o673 x: 0xbb
+ d: -68 o: 674 x: bc d: -0d68 o: 0o674 x: 0xbc
+ d: -67 o: 675 x: bd d: -0d67 o: 0o675 x: 0xbd
+ d: -66 o: 676 x: be d: -0d66 o: 0o676 x: 0xbe
+ d: -65 o: 677 x: bf d: -0d65 o: 0o677 x: 0xbf
+ d: -64 o: 700 x: c0 d: -0d64 o: 0o700 x: 0xc0
+ d: -63 o: 701 x: c1 d: -0d63 o: 0o701 x: 0xc1
+ d: -62 o: 702 x: c2 d: -0d62 o: 0o702 x: 0xc2
+ d: -61 o: 703 x: c3 d: -0d61 o: 0o703 x: 0xc3
+ d: -60 o: 704 x: c4 d: -0d60 o: 0o704 x: 0xc4
+ d: -59 o: 705 x: c5 d: -0d59 o: 0o705 x: 0xc5
+ d: -58 o: 706 x: c6 d: -0d58 o: 0o706 x: 0xc6
+ d: -57 o: 707 x: c7 d: -0d57 o: 0o707 x: 0xc7
+ d: -56 o: 710 x: c8 d: -0d56 o: 0o710 x: 0xc8
+ d: -55 o: 711 x: c9 d: -0d55 o: 0o711 x: 0xc9
+ d: -54 o: 712 x: ca d: -0d54 o: 0o712 x: 0xca
+ d: -53 o: 713 x: cb d: -0d53 o: 0o713 x: 0xcb
+ d: -52 o: 714 x: cc d: -0d52 o: 0o714 x: 0xcc
+ d: -51 o: 715 x: cd d: -0d51 o: 0o715 x: 0xcd
+ d: -50 o: 716 x: ce d: -0d50 o: 0o716 x: 0xce
+ d: -49 o: 717 x: cf d: -0d49 o: 0o717 x: 0xcf
+ d: -48 o: 720 x: d0 d: -0d48 o: 0o720 x: 0xd0
+ d: -47 o: 721 x: d1 d: -0d47 o: 0o721 x: 0xd1
+ d: -46 o: 722 x: d2 d: -0d46 o: 0o722 x: 0xd2
+ d: -45 o: 723 x: d3 d: -0d45 o: 0o723 x: 0xd3
+ d: -44 o: 724 x: d4 d: -0d44 o: 0o724 x: 0xd4
+ d: -43 o: 725 x: d5 d: -0d43 o: 0o725 x: 0xd5
+ d: -42 o: 726 x: d6 d: -0d42 o: 0o726 x: 0xd6
+ d: -41 o: 727 x: d7 d: -0d41 o: 0o727 x: 0xd7
+ d: -40 o: 730 x: d8 d: -0d40 o: 0o730 x: 0xd8
+ d: -39 o: 731 x: d9 d: -0d39 o: 0o731 x: 0xd9
+ d: -38 o: 732 x: da d: -0d38 o: 0o732 x: 0xda
+ d: -37 o: 733 x: db d: -0d37 o: 0o733 x: 0xdb
+ d: -36 o: 734 x: dc d: -0d36 o: 0o734 x: 0xdc
+ d: -35 o: 735 x: dd d: -0d35 o: 0o735 x: 0xdd
+ d: -34 o: 736 x: de d: -0d34 o: 0o736 x: 0xde
+ d: -33 o: 737 x: df d: -0d33 o: 0o737 x: 0xdf
+ d: -32 o: 740 x: e0 d: -0d32 o: 0o740 x: 0xe0
+ d: -31 o: 741 x: e1 d: -0d31 o: 0o741 x: 0xe1
+ d: -30 o: 742 x: e2 d: -0d30 o: 0o742 x: 0xe2
+ d: -29 o: 743 x: e3 d: -0d29 o: 0o743 x: 0xe3
+ d: -28 o: 744 x: e4 d: -0d28 o: 0o744 x: 0xe4
+ d: -27 o: 745 x: e5 d: -0d27 o: 0o745 x: 0xe5
+ d: -26 o: 746 x: e6 d: -0d26 o: 0o746 x: 0xe6
+ d: -25 o: 747 x: e7 d: -0d25 o: 0o747 x: 0xe7
+ d: -24 o: 750 x: e8 d: -0d24 o: 0o750 x: 0xe8
+ d: -23 o: 751 x: e9 d: -0d23 o: 0o751 x: 0xe9
+ d: -22 o: 752 x: ea d: -0d22 o: 0o752 x: 0xea
+ d: -21 o: 753 x: eb d: -0d21 o: 0o753 x: 0xeb
+ d: -20 o: 754 x: ec d: -0d20 o: 0o754 x: 0xec
+ d: -19 o: 755 x: ed d: -0d19 o: 0o755 x: 0xed
+ d: -18 o: 756 x: ee d: -0d18 o: 0o756 x: 0xee
+ d: -17 o: 757 x: ef d: -0d17 o: 0o757 x: 0xef
+ d: -16 o: 760 x: f0 d: -0d16 o: 0o760 x: 0xf0
+ d: -15 o: 761 x: f1 d: -0d15 o: 0o761 x: 0xf1
+ d: -14 o: 762 x: f2 d: -0d14 o: 0o762 x: 0xf2
+ d: -13 o: 763 x: f3 d: -0d13 o: 0o763 x: 0xf3
+ d: -12 o: 764 x: f4 d: -0d12 o: 0o764 x: 0xf4
+ d: -11 o: 765 x: f5 d: -0d11 o: 0o765 x: 0xf5
+ d: -10 o: 766 x: f6 d: -0d10 o: 0o766 x: 0xf6
+ d: -9 o: 767 x: f7 d: -0d9 o: 0o767 x: 0xf7
+ d: -8 o: 770 x: f8 d: -0d8 o: 0o770 x: 0xf8
+ d: -7 o: 771 x: f9 d: -0d7 o: 0o771 x: 0xf9
+ d: -6 o: 772 x: fa d: -0d6 o: 0o772 x: 0xfa
+ d: -5 o: 773 x: fb d: -0d5 o: 0o773 x: 0xfb
+ d: -4 o: 774 x: fc d: -0d4 o: 0o774 x: 0xfc
+ d: -3 o: 775 x: fd d: -0d3 o: 0o775 x: 0xfd
+ d: -2 o: 776 x: fe d: -0d2 o: 0o776 x: 0xfe
+ d: -1 o: 777 x: ff d: -0d1 o: 0o777 x: 0xff
+
+sc_biguint<8>
+ d: 0 o: 000 x: 000 d: 0d0 o: 0o000 x: 0x000
+ d: 1 o: 001 x: 001 d: 0d1 o: 0o001 x: 0x001
+ d: 2 o: 002 x: 002 d: 0d2 o: 0o002 x: 0x002
+ d: 3 o: 003 x: 003 d: 0d3 o: 0o003 x: 0x003
+ d: 4 o: 004 x: 004 d: 0d4 o: 0o004 x: 0x004
+ d: 5 o: 005 x: 005 d: 0d5 o: 0o005 x: 0x005
+ d: 6 o: 006 x: 006 d: 0d6 o: 0o006 x: 0x006
+ d: 7 o: 007 x: 007 d: 0d7 o: 0o007 x: 0x007
+ d: 8 o: 010 x: 008 d: 0d8 o: 0o010 x: 0x008
+ d: 9 o: 011 x: 009 d: 0d9 o: 0o011 x: 0x009
+ d: 10 o: 012 x: 00a d: 0d10 o: 0o012 x: 0x00a
+ d: 11 o: 013 x: 00b d: 0d11 o: 0o013 x: 0x00b
+ d: 12 o: 014 x: 00c d: 0d12 o: 0o014 x: 0x00c
+ d: 13 o: 015 x: 00d d: 0d13 o: 0o015 x: 0x00d
+ d: 14 o: 016 x: 00e d: 0d14 o: 0o016 x: 0x00e
+ d: 15 o: 017 x: 00f d: 0d15 o: 0o017 x: 0x00f
+ d: 16 o: 020 x: 010 d: 0d16 o: 0o020 x: 0x010
+ d: 17 o: 021 x: 011 d: 0d17 o: 0o021 x: 0x011
+ d: 18 o: 022 x: 012 d: 0d18 o: 0o022 x: 0x012
+ d: 19 o: 023 x: 013 d: 0d19 o: 0o023 x: 0x013
+ d: 20 o: 024 x: 014 d: 0d20 o: 0o024 x: 0x014
+ d: 21 o: 025 x: 015 d: 0d21 o: 0o025 x: 0x015
+ d: 22 o: 026 x: 016 d: 0d22 o: 0o026 x: 0x016
+ d: 23 o: 027 x: 017 d: 0d23 o: 0o027 x: 0x017
+ d: 24 o: 030 x: 018 d: 0d24 o: 0o030 x: 0x018
+ d: 25 o: 031 x: 019 d: 0d25 o: 0o031 x: 0x019
+ d: 26 o: 032 x: 01a d: 0d26 o: 0o032 x: 0x01a
+ d: 27 o: 033 x: 01b d: 0d27 o: 0o033 x: 0x01b
+ d: 28 o: 034 x: 01c d: 0d28 o: 0o034 x: 0x01c
+ d: 29 o: 035 x: 01d d: 0d29 o: 0o035 x: 0x01d
+ d: 30 o: 036 x: 01e d: 0d30 o: 0o036 x: 0x01e
+ d: 31 o: 037 x: 01f d: 0d31 o: 0o037 x: 0x01f
+ d: 32 o: 040 x: 020 d: 0d32 o: 0o040 x: 0x020
+ d: 33 o: 041 x: 021 d: 0d33 o: 0o041 x: 0x021
+ d: 34 o: 042 x: 022 d: 0d34 o: 0o042 x: 0x022
+ d: 35 o: 043 x: 023 d: 0d35 o: 0o043 x: 0x023
+ d: 36 o: 044 x: 024 d: 0d36 o: 0o044 x: 0x024
+ d: 37 o: 045 x: 025 d: 0d37 o: 0o045 x: 0x025
+ d: 38 o: 046 x: 026 d: 0d38 o: 0o046 x: 0x026
+ d: 39 o: 047 x: 027 d: 0d39 o: 0o047 x: 0x027
+ d: 40 o: 050 x: 028 d: 0d40 o: 0o050 x: 0x028
+ d: 41 o: 051 x: 029 d: 0d41 o: 0o051 x: 0x029
+ d: 42 o: 052 x: 02a d: 0d42 o: 0o052 x: 0x02a
+ d: 43 o: 053 x: 02b d: 0d43 o: 0o053 x: 0x02b
+ d: 44 o: 054 x: 02c d: 0d44 o: 0o054 x: 0x02c
+ d: 45 o: 055 x: 02d d: 0d45 o: 0o055 x: 0x02d
+ d: 46 o: 056 x: 02e d: 0d46 o: 0o056 x: 0x02e
+ d: 47 o: 057 x: 02f d: 0d47 o: 0o057 x: 0x02f
+ d: 48 o: 060 x: 030 d: 0d48 o: 0o060 x: 0x030
+ d: 49 o: 061 x: 031 d: 0d49 o: 0o061 x: 0x031
+ d: 50 o: 062 x: 032 d: 0d50 o: 0o062 x: 0x032
+ d: 51 o: 063 x: 033 d: 0d51 o: 0o063 x: 0x033
+ d: 52 o: 064 x: 034 d: 0d52 o: 0o064 x: 0x034
+ d: 53 o: 065 x: 035 d: 0d53 o: 0o065 x: 0x035
+ d: 54 o: 066 x: 036 d: 0d54 o: 0o066 x: 0x036
+ d: 55 o: 067 x: 037 d: 0d55 o: 0o067 x: 0x037
+ d: 56 o: 070 x: 038 d: 0d56 o: 0o070 x: 0x038
+ d: 57 o: 071 x: 039 d: 0d57 o: 0o071 x: 0x039
+ d: 58 o: 072 x: 03a d: 0d58 o: 0o072 x: 0x03a
+ d: 59 o: 073 x: 03b d: 0d59 o: 0o073 x: 0x03b
+ d: 60 o: 074 x: 03c d: 0d60 o: 0o074 x: 0x03c
+ d: 61 o: 075 x: 03d d: 0d61 o: 0o075 x: 0x03d
+ d: 62 o: 076 x: 03e d: 0d62 o: 0o076 x: 0x03e
+ d: 63 o: 077 x: 03f d: 0d63 o: 0o077 x: 0x03f
+ d: 64 o: 100 x: 040 d: 0d64 o: 0o100 x: 0x040
+ d: 65 o: 101 x: 041 d: 0d65 o: 0o101 x: 0x041
+ d: 66 o: 102 x: 042 d: 0d66 o: 0o102 x: 0x042
+ d: 67 o: 103 x: 043 d: 0d67 o: 0o103 x: 0x043
+ d: 68 o: 104 x: 044 d: 0d68 o: 0o104 x: 0x044
+ d: 69 o: 105 x: 045 d: 0d69 o: 0o105 x: 0x045
+ d: 70 o: 106 x: 046 d: 0d70 o: 0o106 x: 0x046
+ d: 71 o: 107 x: 047 d: 0d71 o: 0o107 x: 0x047
+ d: 72 o: 110 x: 048 d: 0d72 o: 0o110 x: 0x048
+ d: 73 o: 111 x: 049 d: 0d73 o: 0o111 x: 0x049
+ d: 74 o: 112 x: 04a d: 0d74 o: 0o112 x: 0x04a
+ d: 75 o: 113 x: 04b d: 0d75 o: 0o113 x: 0x04b
+ d: 76 o: 114 x: 04c d: 0d76 o: 0o114 x: 0x04c
+ d: 77 o: 115 x: 04d d: 0d77 o: 0o115 x: 0x04d
+ d: 78 o: 116 x: 04e d: 0d78 o: 0o116 x: 0x04e
+ d: 79 o: 117 x: 04f d: 0d79 o: 0o117 x: 0x04f
+ d: 80 o: 120 x: 050 d: 0d80 o: 0o120 x: 0x050
+ d: 81 o: 121 x: 051 d: 0d81 o: 0o121 x: 0x051
+ d: 82 o: 122 x: 052 d: 0d82 o: 0o122 x: 0x052
+ d: 83 o: 123 x: 053 d: 0d83 o: 0o123 x: 0x053
+ d: 84 o: 124 x: 054 d: 0d84 o: 0o124 x: 0x054
+ d: 85 o: 125 x: 055 d: 0d85 o: 0o125 x: 0x055
+ d: 86 o: 126 x: 056 d: 0d86 o: 0o126 x: 0x056
+ d: 87 o: 127 x: 057 d: 0d87 o: 0o127 x: 0x057
+ d: 88 o: 130 x: 058 d: 0d88 o: 0o130 x: 0x058
+ d: 89 o: 131 x: 059 d: 0d89 o: 0o131 x: 0x059
+ d: 90 o: 132 x: 05a d: 0d90 o: 0o132 x: 0x05a
+ d: 91 o: 133 x: 05b d: 0d91 o: 0o133 x: 0x05b
+ d: 92 o: 134 x: 05c d: 0d92 o: 0o134 x: 0x05c
+ d: 93 o: 135 x: 05d d: 0d93 o: 0o135 x: 0x05d
+ d: 94 o: 136 x: 05e d: 0d94 o: 0o136 x: 0x05e
+ d: 95 o: 137 x: 05f d: 0d95 o: 0o137 x: 0x05f
+ d: 96 o: 140 x: 060 d: 0d96 o: 0o140 x: 0x060
+ d: 97 o: 141 x: 061 d: 0d97 o: 0o141 x: 0x061
+ d: 98 o: 142 x: 062 d: 0d98 o: 0o142 x: 0x062
+ d: 99 o: 143 x: 063 d: 0d99 o: 0o143 x: 0x063
+ d: 100 o: 144 x: 064 d: 0d100 o: 0o144 x: 0x064
+ d: 101 o: 145 x: 065 d: 0d101 o: 0o145 x: 0x065
+ d: 102 o: 146 x: 066 d: 0d102 o: 0o146 x: 0x066
+ d: 103 o: 147 x: 067 d: 0d103 o: 0o147 x: 0x067
+ d: 104 o: 150 x: 068 d: 0d104 o: 0o150 x: 0x068
+ d: 105 o: 151 x: 069 d: 0d105 o: 0o151 x: 0x069
+ d: 106 o: 152 x: 06a d: 0d106 o: 0o152 x: 0x06a
+ d: 107 o: 153 x: 06b d: 0d107 o: 0o153 x: 0x06b
+ d: 108 o: 154 x: 06c d: 0d108 o: 0o154 x: 0x06c
+ d: 109 o: 155 x: 06d d: 0d109 o: 0o155 x: 0x06d
+ d: 110 o: 156 x: 06e d: 0d110 o: 0o156 x: 0x06e
+ d: 111 o: 157 x: 06f d: 0d111 o: 0o157 x: 0x06f
+ d: 112 o: 160 x: 070 d: 0d112 o: 0o160 x: 0x070
+ d: 113 o: 161 x: 071 d: 0d113 o: 0o161 x: 0x071
+ d: 114 o: 162 x: 072 d: 0d114 o: 0o162 x: 0x072
+ d: 115 o: 163 x: 073 d: 0d115 o: 0o163 x: 0x073
+ d: 116 o: 164 x: 074 d: 0d116 o: 0o164 x: 0x074
+ d: 117 o: 165 x: 075 d: 0d117 o: 0o165 x: 0x075
+ d: 118 o: 166 x: 076 d: 0d118 o: 0o166 x: 0x076
+ d: 119 o: 167 x: 077 d: 0d119 o: 0o167 x: 0x077
+ d: 120 o: 170 x: 078 d: 0d120 o: 0o170 x: 0x078
+ d: 121 o: 171 x: 079 d: 0d121 o: 0o171 x: 0x079
+ d: 122 o: 172 x: 07a d: 0d122 o: 0o172 x: 0x07a
+ d: 123 o: 173 x: 07b d: 0d123 o: 0o173 x: 0x07b
+ d: 124 o: 174 x: 07c d: 0d124 o: 0o174 x: 0x07c
+ d: 125 o: 175 x: 07d d: 0d125 o: 0o175 x: 0x07d
+ d: 126 o: 176 x: 07e d: 0d126 o: 0o176 x: 0x07e
+ d: 127 o: 177 x: 07f d: 0d127 o: 0o177 x: 0x07f
+ d: 128 o: 200 x: 080 d: 0d128 o: 0o200 x: 0x080
+ d: 129 o: 201 x: 081 d: 0d129 o: 0o201 x: 0x081
+ d: 130 o: 202 x: 082 d: 0d130 o: 0o202 x: 0x082
+ d: 131 o: 203 x: 083 d: 0d131 o: 0o203 x: 0x083
+ d: 132 o: 204 x: 084 d: 0d132 o: 0o204 x: 0x084
+ d: 133 o: 205 x: 085 d: 0d133 o: 0o205 x: 0x085
+ d: 134 o: 206 x: 086 d: 0d134 o: 0o206 x: 0x086
+ d: 135 o: 207 x: 087 d: 0d135 o: 0o207 x: 0x087
+ d: 136 o: 210 x: 088 d: 0d136 o: 0o210 x: 0x088
+ d: 137 o: 211 x: 089 d: 0d137 o: 0o211 x: 0x089
+ d: 138 o: 212 x: 08a d: 0d138 o: 0o212 x: 0x08a
+ d: 139 o: 213 x: 08b d: 0d139 o: 0o213 x: 0x08b
+ d: 140 o: 214 x: 08c d: 0d140 o: 0o214 x: 0x08c
+ d: 141 o: 215 x: 08d d: 0d141 o: 0o215 x: 0x08d
+ d: 142 o: 216 x: 08e d: 0d142 o: 0o216 x: 0x08e
+ d: 143 o: 217 x: 08f d: 0d143 o: 0o217 x: 0x08f
+ d: 144 o: 220 x: 090 d: 0d144 o: 0o220 x: 0x090
+ d: 145 o: 221 x: 091 d: 0d145 o: 0o221 x: 0x091
+ d: 146 o: 222 x: 092 d: 0d146 o: 0o222 x: 0x092
+ d: 147 o: 223 x: 093 d: 0d147 o: 0o223 x: 0x093
+ d: 148 o: 224 x: 094 d: 0d148 o: 0o224 x: 0x094
+ d: 149 o: 225 x: 095 d: 0d149 o: 0o225 x: 0x095
+ d: 150 o: 226 x: 096 d: 0d150 o: 0o226 x: 0x096
+ d: 151 o: 227 x: 097 d: 0d151 o: 0o227 x: 0x097
+ d: 152 o: 230 x: 098 d: 0d152 o: 0o230 x: 0x098
+ d: 153 o: 231 x: 099 d: 0d153 o: 0o231 x: 0x099
+ d: 154 o: 232 x: 09a d: 0d154 o: 0o232 x: 0x09a
+ d: 155 o: 233 x: 09b d: 0d155 o: 0o233 x: 0x09b
+ d: 156 o: 234 x: 09c d: 0d156 o: 0o234 x: 0x09c
+ d: 157 o: 235 x: 09d d: 0d157 o: 0o235 x: 0x09d
+ d: 158 o: 236 x: 09e d: 0d158 o: 0o236 x: 0x09e
+ d: 159 o: 237 x: 09f d: 0d159 o: 0o237 x: 0x09f
+ d: 160 o: 240 x: 0a0 d: 0d160 o: 0o240 x: 0x0a0
+ d: 161 o: 241 x: 0a1 d: 0d161 o: 0o241 x: 0x0a1
+ d: 162 o: 242 x: 0a2 d: 0d162 o: 0o242 x: 0x0a2
+ d: 163 o: 243 x: 0a3 d: 0d163 o: 0o243 x: 0x0a3
+ d: 164 o: 244 x: 0a4 d: 0d164 o: 0o244 x: 0x0a4
+ d: 165 o: 245 x: 0a5 d: 0d165 o: 0o245 x: 0x0a5
+ d: 166 o: 246 x: 0a6 d: 0d166 o: 0o246 x: 0x0a6
+ d: 167 o: 247 x: 0a7 d: 0d167 o: 0o247 x: 0x0a7
+ d: 168 o: 250 x: 0a8 d: 0d168 o: 0o250 x: 0x0a8
+ d: 169 o: 251 x: 0a9 d: 0d169 o: 0o251 x: 0x0a9
+ d: 170 o: 252 x: 0aa d: 0d170 o: 0o252 x: 0x0aa
+ d: 171 o: 253 x: 0ab d: 0d171 o: 0o253 x: 0x0ab
+ d: 172 o: 254 x: 0ac d: 0d172 o: 0o254 x: 0x0ac
+ d: 173 o: 255 x: 0ad d: 0d173 o: 0o255 x: 0x0ad
+ d: 174 o: 256 x: 0ae d: 0d174 o: 0o256 x: 0x0ae
+ d: 175 o: 257 x: 0af d: 0d175 o: 0o257 x: 0x0af
+ d: 176 o: 260 x: 0b0 d: 0d176 o: 0o260 x: 0x0b0
+ d: 177 o: 261 x: 0b1 d: 0d177 o: 0o261 x: 0x0b1
+ d: 178 o: 262 x: 0b2 d: 0d178 o: 0o262 x: 0x0b2
+ d: 179 o: 263 x: 0b3 d: 0d179 o: 0o263 x: 0x0b3
+ d: 180 o: 264 x: 0b4 d: 0d180 o: 0o264 x: 0x0b4
+ d: 181 o: 265 x: 0b5 d: 0d181 o: 0o265 x: 0x0b5
+ d: 182 o: 266 x: 0b6 d: 0d182 o: 0o266 x: 0x0b6
+ d: 183 o: 267 x: 0b7 d: 0d183 o: 0o267 x: 0x0b7
+ d: 184 o: 270 x: 0b8 d: 0d184 o: 0o270 x: 0x0b8
+ d: 185 o: 271 x: 0b9 d: 0d185 o: 0o271 x: 0x0b9
+ d: 186 o: 272 x: 0ba d: 0d186 o: 0o272 x: 0x0ba
+ d: 187 o: 273 x: 0bb d: 0d187 o: 0o273 x: 0x0bb
+ d: 188 o: 274 x: 0bc d: 0d188 o: 0o274 x: 0x0bc
+ d: 189 o: 275 x: 0bd d: 0d189 o: 0o275 x: 0x0bd
+ d: 190 o: 276 x: 0be d: 0d190 o: 0o276 x: 0x0be
+ d: 191 o: 277 x: 0bf d: 0d191 o: 0o277 x: 0x0bf
+ d: 192 o: 300 x: 0c0 d: 0d192 o: 0o300 x: 0x0c0
+ d: 193 o: 301 x: 0c1 d: 0d193 o: 0o301 x: 0x0c1
+ d: 194 o: 302 x: 0c2 d: 0d194 o: 0o302 x: 0x0c2
+ d: 195 o: 303 x: 0c3 d: 0d195 o: 0o303 x: 0x0c3
+ d: 196 o: 304 x: 0c4 d: 0d196 o: 0o304 x: 0x0c4
+ d: 197 o: 305 x: 0c5 d: 0d197 o: 0o305 x: 0x0c5
+ d: 198 o: 306 x: 0c6 d: 0d198 o: 0o306 x: 0x0c6
+ d: 199 o: 307 x: 0c7 d: 0d199 o: 0o307 x: 0x0c7
+ d: 200 o: 310 x: 0c8 d: 0d200 o: 0o310 x: 0x0c8
+ d: 201 o: 311 x: 0c9 d: 0d201 o: 0o311 x: 0x0c9
+ d: 202 o: 312 x: 0ca d: 0d202 o: 0o312 x: 0x0ca
+ d: 203 o: 313 x: 0cb d: 0d203 o: 0o313 x: 0x0cb
+ d: 204 o: 314 x: 0cc d: 0d204 o: 0o314 x: 0x0cc
+ d: 205 o: 315 x: 0cd d: 0d205 o: 0o315 x: 0x0cd
+ d: 206 o: 316 x: 0ce d: 0d206 o: 0o316 x: 0x0ce
+ d: 207 o: 317 x: 0cf d: 0d207 o: 0o317 x: 0x0cf
+ d: 208 o: 320 x: 0d0 d: 0d208 o: 0o320 x: 0x0d0
+ d: 209 o: 321 x: 0d1 d: 0d209 o: 0o321 x: 0x0d1
+ d: 210 o: 322 x: 0d2 d: 0d210 o: 0o322 x: 0x0d2
+ d: 211 o: 323 x: 0d3 d: 0d211 o: 0o323 x: 0x0d3
+ d: 212 o: 324 x: 0d4 d: 0d212 o: 0o324 x: 0x0d4
+ d: 213 o: 325 x: 0d5 d: 0d213 o: 0o325 x: 0x0d5
+ d: 214 o: 326 x: 0d6 d: 0d214 o: 0o326 x: 0x0d6
+ d: 215 o: 327 x: 0d7 d: 0d215 o: 0o327 x: 0x0d7
+ d: 216 o: 330 x: 0d8 d: 0d216 o: 0o330 x: 0x0d8
+ d: 217 o: 331 x: 0d9 d: 0d217 o: 0o331 x: 0x0d9
+ d: 218 o: 332 x: 0da d: 0d218 o: 0o332 x: 0x0da
+ d: 219 o: 333 x: 0db d: 0d219 o: 0o333 x: 0x0db
+ d: 220 o: 334 x: 0dc d: 0d220 o: 0o334 x: 0x0dc
+ d: 221 o: 335 x: 0dd d: 0d221 o: 0o335 x: 0x0dd
+ d: 222 o: 336 x: 0de d: 0d222 o: 0o336 x: 0x0de
+ d: 223 o: 337 x: 0df d: 0d223 o: 0o337 x: 0x0df
+ d: 224 o: 340 x: 0e0 d: 0d224 o: 0o340 x: 0x0e0
+ d: 225 o: 341 x: 0e1 d: 0d225 o: 0o341 x: 0x0e1
+ d: 226 o: 342 x: 0e2 d: 0d226 o: 0o342 x: 0x0e2
+ d: 227 o: 343 x: 0e3 d: 0d227 o: 0o343 x: 0x0e3
+ d: 228 o: 344 x: 0e4 d: 0d228 o: 0o344 x: 0x0e4
+ d: 229 o: 345 x: 0e5 d: 0d229 o: 0o345 x: 0x0e5
+ d: 230 o: 346 x: 0e6 d: 0d230 o: 0o346 x: 0x0e6
+ d: 231 o: 347 x: 0e7 d: 0d231 o: 0o347 x: 0x0e7
+ d: 232 o: 350 x: 0e8 d: 0d232 o: 0o350 x: 0x0e8
+ d: 233 o: 351 x: 0e9 d: 0d233 o: 0o351 x: 0x0e9
+ d: 234 o: 352 x: 0ea d: 0d234 o: 0o352 x: 0x0ea
+ d: 235 o: 353 x: 0eb d: 0d235 o: 0o353 x: 0x0eb
+ d: 236 o: 354 x: 0ec d: 0d236 o: 0o354 x: 0x0ec
+ d: 237 o: 355 x: 0ed d: 0d237 o: 0o355 x: 0x0ed
+ d: 238 o: 356 x: 0ee d: 0d238 o: 0o356 x: 0x0ee
+ d: 239 o: 357 x: 0ef d: 0d239 o: 0o357 x: 0x0ef
+ d: 240 o: 360 x: 0f0 d: 0d240 o: 0o360 x: 0x0f0
+ d: 241 o: 361 x: 0f1 d: 0d241 o: 0o361 x: 0x0f1
+ d: 242 o: 362 x: 0f2 d: 0d242 o: 0o362 x: 0x0f2
+ d: 243 o: 363 x: 0f3 d: 0d243 o: 0o363 x: 0x0f3
+ d: 244 o: 364 x: 0f4 d: 0d244 o: 0o364 x: 0x0f4
+ d: 245 o: 365 x: 0f5 d: 0d245 o: 0o365 x: 0x0f5
+ d: 246 o: 366 x: 0f6 d: 0d246 o: 0o366 x: 0x0f6
+ d: 247 o: 367 x: 0f7 d: 0d247 o: 0o367 x: 0x0f7
+ d: 248 o: 370 x: 0f8 d: 0d248 o: 0o370 x: 0x0f8
+ d: 249 o: 371 x: 0f9 d: 0d249 o: 0o371 x: 0x0f9
+ d: 250 o: 372 x: 0fa d: 0d250 o: 0o372 x: 0x0fa
+ d: 251 o: 373 x: 0fb d: 0d251 o: 0o373 x: 0x0fb
+ d: 252 o: 374 x: 0fc d: 0d252 o: 0o374 x: 0x0fc
+ d: 253 o: 375 x: 0fd d: 0d253 o: 0o375 x: 0x0fd
+ d: 254 o: 376 x: 0fe d: 0d254 o: 0o376 x: 0x0fe
+ d: 255 o: 377 x: 0ff d: 0d255 o: 0o377 x: 0x0ff
+
+sc_int<8>
+ d: 0 o: 000 x: 00 d: 0d0 o: 0o000 x: 0x00
+ d: 1 o: 001 x: 01 d: 0d1 o: 0o001 x: 0x01
+ d: 2 o: 002 x: 02 d: 0d2 o: 0o002 x: 0x02
+ d: 3 o: 003 x: 03 d: 0d3 o: 0o003 x: 0x03
+ d: 4 o: 004 x: 04 d: 0d4 o: 0o004 x: 0x04
+ d: 5 o: 005 x: 05 d: 0d5 o: 0o005 x: 0x05
+ d: 6 o: 006 x: 06 d: 0d6 o: 0o006 x: 0x06
+ d: 7 o: 007 x: 07 d: 0d7 o: 0o007 x: 0x07
+ d: 8 o: 010 x: 08 d: 0d8 o: 0o010 x: 0x08
+ d: 9 o: 011 x: 09 d: 0d9 o: 0o011 x: 0x09
+ d: 10 o: 012 x: 0a d: 0d10 o: 0o012 x: 0x0a
+ d: 11 o: 013 x: 0b d: 0d11 o: 0o013 x: 0x0b
+ d: 12 o: 014 x: 0c d: 0d12 o: 0o014 x: 0x0c
+ d: 13 o: 015 x: 0d d: 0d13 o: 0o015 x: 0x0d
+ d: 14 o: 016 x: 0e d: 0d14 o: 0o016 x: 0x0e
+ d: 15 o: 017 x: 0f d: 0d15 o: 0o017 x: 0x0f
+ d: 16 o: 020 x: 10 d: 0d16 o: 0o020 x: 0x10
+ d: 17 o: 021 x: 11 d: 0d17 o: 0o021 x: 0x11
+ d: 18 o: 022 x: 12 d: 0d18 o: 0o022 x: 0x12
+ d: 19 o: 023 x: 13 d: 0d19 o: 0o023 x: 0x13
+ d: 20 o: 024 x: 14 d: 0d20 o: 0o024 x: 0x14
+ d: 21 o: 025 x: 15 d: 0d21 o: 0o025 x: 0x15
+ d: 22 o: 026 x: 16 d: 0d22 o: 0o026 x: 0x16
+ d: 23 o: 027 x: 17 d: 0d23 o: 0o027 x: 0x17
+ d: 24 o: 030 x: 18 d: 0d24 o: 0o030 x: 0x18
+ d: 25 o: 031 x: 19 d: 0d25 o: 0o031 x: 0x19
+ d: 26 o: 032 x: 1a d: 0d26 o: 0o032 x: 0x1a
+ d: 27 o: 033 x: 1b d: 0d27 o: 0o033 x: 0x1b
+ d: 28 o: 034 x: 1c d: 0d28 o: 0o034 x: 0x1c
+ d: 29 o: 035 x: 1d d: 0d29 o: 0o035 x: 0x1d
+ d: 30 o: 036 x: 1e d: 0d30 o: 0o036 x: 0x1e
+ d: 31 o: 037 x: 1f d: 0d31 o: 0o037 x: 0x1f
+ d: 32 o: 040 x: 20 d: 0d32 o: 0o040 x: 0x20
+ d: 33 o: 041 x: 21 d: 0d33 o: 0o041 x: 0x21
+ d: 34 o: 042 x: 22 d: 0d34 o: 0o042 x: 0x22
+ d: 35 o: 043 x: 23 d: 0d35 o: 0o043 x: 0x23
+ d: 36 o: 044 x: 24 d: 0d36 o: 0o044 x: 0x24
+ d: 37 o: 045 x: 25 d: 0d37 o: 0o045 x: 0x25
+ d: 38 o: 046 x: 26 d: 0d38 o: 0o046 x: 0x26
+ d: 39 o: 047 x: 27 d: 0d39 o: 0o047 x: 0x27
+ d: 40 o: 050 x: 28 d: 0d40 o: 0o050 x: 0x28
+ d: 41 o: 051 x: 29 d: 0d41 o: 0o051 x: 0x29
+ d: 42 o: 052 x: 2a d: 0d42 o: 0o052 x: 0x2a
+ d: 43 o: 053 x: 2b d: 0d43 o: 0o053 x: 0x2b
+ d: 44 o: 054 x: 2c d: 0d44 o: 0o054 x: 0x2c
+ d: 45 o: 055 x: 2d d: 0d45 o: 0o055 x: 0x2d
+ d: 46 o: 056 x: 2e d: 0d46 o: 0o056 x: 0x2e
+ d: 47 o: 057 x: 2f d: 0d47 o: 0o057 x: 0x2f
+ d: 48 o: 060 x: 30 d: 0d48 o: 0o060 x: 0x30
+ d: 49 o: 061 x: 31 d: 0d49 o: 0o061 x: 0x31
+ d: 50 o: 062 x: 32 d: 0d50 o: 0o062 x: 0x32
+ d: 51 o: 063 x: 33 d: 0d51 o: 0o063 x: 0x33
+ d: 52 o: 064 x: 34 d: 0d52 o: 0o064 x: 0x34
+ d: 53 o: 065 x: 35 d: 0d53 o: 0o065 x: 0x35
+ d: 54 o: 066 x: 36 d: 0d54 o: 0o066 x: 0x36
+ d: 55 o: 067 x: 37 d: 0d55 o: 0o067 x: 0x37
+ d: 56 o: 070 x: 38 d: 0d56 o: 0o070 x: 0x38
+ d: 57 o: 071 x: 39 d: 0d57 o: 0o071 x: 0x39
+ d: 58 o: 072 x: 3a d: 0d58 o: 0o072 x: 0x3a
+ d: 59 o: 073 x: 3b d: 0d59 o: 0o073 x: 0x3b
+ d: 60 o: 074 x: 3c d: 0d60 o: 0o074 x: 0x3c
+ d: 61 o: 075 x: 3d d: 0d61 o: 0o075 x: 0x3d
+ d: 62 o: 076 x: 3e d: 0d62 o: 0o076 x: 0x3e
+ d: 63 o: 077 x: 3f d: 0d63 o: 0o077 x: 0x3f
+ d: 64 o: 100 x: 40 d: 0d64 o: 0o100 x: 0x40
+ d: 65 o: 101 x: 41 d: 0d65 o: 0o101 x: 0x41
+ d: 66 o: 102 x: 42 d: 0d66 o: 0o102 x: 0x42
+ d: 67 o: 103 x: 43 d: 0d67 o: 0o103 x: 0x43
+ d: 68 o: 104 x: 44 d: 0d68 o: 0o104 x: 0x44
+ d: 69 o: 105 x: 45 d: 0d69 o: 0o105 x: 0x45
+ d: 70 o: 106 x: 46 d: 0d70 o: 0o106 x: 0x46
+ d: 71 o: 107 x: 47 d: 0d71 o: 0o107 x: 0x47
+ d: 72 o: 110 x: 48 d: 0d72 o: 0o110 x: 0x48
+ d: 73 o: 111 x: 49 d: 0d73 o: 0o111 x: 0x49
+ d: 74 o: 112 x: 4a d: 0d74 o: 0o112 x: 0x4a
+ d: 75 o: 113 x: 4b d: 0d75 o: 0o113 x: 0x4b
+ d: 76 o: 114 x: 4c d: 0d76 o: 0o114 x: 0x4c
+ d: 77 o: 115 x: 4d d: 0d77 o: 0o115 x: 0x4d
+ d: 78 o: 116 x: 4e d: 0d78 o: 0o116 x: 0x4e
+ d: 79 o: 117 x: 4f d: 0d79 o: 0o117 x: 0x4f
+ d: 80 o: 120 x: 50 d: 0d80 o: 0o120 x: 0x50
+ d: 81 o: 121 x: 51 d: 0d81 o: 0o121 x: 0x51
+ d: 82 o: 122 x: 52 d: 0d82 o: 0o122 x: 0x52
+ d: 83 o: 123 x: 53 d: 0d83 o: 0o123 x: 0x53
+ d: 84 o: 124 x: 54 d: 0d84 o: 0o124 x: 0x54
+ d: 85 o: 125 x: 55 d: 0d85 o: 0o125 x: 0x55
+ d: 86 o: 126 x: 56 d: 0d86 o: 0o126 x: 0x56
+ d: 87 o: 127 x: 57 d: 0d87 o: 0o127 x: 0x57
+ d: 88 o: 130 x: 58 d: 0d88 o: 0o130 x: 0x58
+ d: 89 o: 131 x: 59 d: 0d89 o: 0o131 x: 0x59
+ d: 90 o: 132 x: 5a d: 0d90 o: 0o132 x: 0x5a
+ d: 91 o: 133 x: 5b d: 0d91 o: 0o133 x: 0x5b
+ d: 92 o: 134 x: 5c d: 0d92 o: 0o134 x: 0x5c
+ d: 93 o: 135 x: 5d d: 0d93 o: 0o135 x: 0x5d
+ d: 94 o: 136 x: 5e d: 0d94 o: 0o136 x: 0x5e
+ d: 95 o: 137 x: 5f d: 0d95 o: 0o137 x: 0x5f
+ d: 96 o: 140 x: 60 d: 0d96 o: 0o140 x: 0x60
+ d: 97 o: 141 x: 61 d: 0d97 o: 0o141 x: 0x61
+ d: 98 o: 142 x: 62 d: 0d98 o: 0o142 x: 0x62
+ d: 99 o: 143 x: 63 d: 0d99 o: 0o143 x: 0x63
+ d: 100 o: 144 x: 64 d: 0d100 o: 0o144 x: 0x64
+ d: 101 o: 145 x: 65 d: 0d101 o: 0o145 x: 0x65
+ d: 102 o: 146 x: 66 d: 0d102 o: 0o146 x: 0x66
+ d: 103 o: 147 x: 67 d: 0d103 o: 0o147 x: 0x67
+ d: 104 o: 150 x: 68 d: 0d104 o: 0o150 x: 0x68
+ d: 105 o: 151 x: 69 d: 0d105 o: 0o151 x: 0x69
+ d: 106 o: 152 x: 6a d: 0d106 o: 0o152 x: 0x6a
+ d: 107 o: 153 x: 6b d: 0d107 o: 0o153 x: 0x6b
+ d: 108 o: 154 x: 6c d: 0d108 o: 0o154 x: 0x6c
+ d: 109 o: 155 x: 6d d: 0d109 o: 0o155 x: 0x6d
+ d: 110 o: 156 x: 6e d: 0d110 o: 0o156 x: 0x6e
+ d: 111 o: 157 x: 6f d: 0d111 o: 0o157 x: 0x6f
+ d: 112 o: 160 x: 70 d: 0d112 o: 0o160 x: 0x70
+ d: 113 o: 161 x: 71 d: 0d113 o: 0o161 x: 0x71
+ d: 114 o: 162 x: 72 d: 0d114 o: 0o162 x: 0x72
+ d: 115 o: 163 x: 73 d: 0d115 o: 0o163 x: 0x73
+ d: 116 o: 164 x: 74 d: 0d116 o: 0o164 x: 0x74
+ d: 117 o: 165 x: 75 d: 0d117 o: 0o165 x: 0x75
+ d: 118 o: 166 x: 76 d: 0d118 o: 0o166 x: 0x76
+ d: 119 o: 167 x: 77 d: 0d119 o: 0o167 x: 0x77
+ d: 120 o: 170 x: 78 d: 0d120 o: 0o170 x: 0x78
+ d: 121 o: 171 x: 79 d: 0d121 o: 0o171 x: 0x79
+ d: 122 o: 172 x: 7a d: 0d122 o: 0o172 x: 0x7a
+ d: 123 o: 173 x: 7b d: 0d123 o: 0o173 x: 0x7b
+ d: 124 o: 174 x: 7c d: 0d124 o: 0o174 x: 0x7c
+ d: 125 o: 175 x: 7d d: 0d125 o: 0o175 x: 0x7d
+ d: 126 o: 176 x: 7e d: 0d126 o: 0o176 x: 0x7e
+ d: 127 o: 177 x: 7f d: 0d127 o: 0o177 x: 0x7f
+ d: -128 o: 600 x: 80 d: -0d128 o: 0o600 x: 0x80
+ d: -127 o: 601 x: 81 d: -0d127 o: 0o601 x: 0x81
+ d: -126 o: 602 x: 82 d: -0d126 o: 0o602 x: 0x82
+ d: -125 o: 603 x: 83 d: -0d125 o: 0o603 x: 0x83
+ d: -124 o: 604 x: 84 d: -0d124 o: 0o604 x: 0x84
+ d: -123 o: 605 x: 85 d: -0d123 o: 0o605 x: 0x85
+ d: -122 o: 606 x: 86 d: -0d122 o: 0o606 x: 0x86
+ d: -121 o: 607 x: 87 d: -0d121 o: 0o607 x: 0x87
+ d: -120 o: 610 x: 88 d: -0d120 o: 0o610 x: 0x88
+ d: -119 o: 611 x: 89 d: -0d119 o: 0o611 x: 0x89
+ d: -118 o: 612 x: 8a d: -0d118 o: 0o612 x: 0x8a
+ d: -117 o: 613 x: 8b d: -0d117 o: 0o613 x: 0x8b
+ d: -116 o: 614 x: 8c d: -0d116 o: 0o614 x: 0x8c
+ d: -115 o: 615 x: 8d d: -0d115 o: 0o615 x: 0x8d
+ d: -114 o: 616 x: 8e d: -0d114 o: 0o616 x: 0x8e
+ d: -113 o: 617 x: 8f d: -0d113 o: 0o617 x: 0x8f
+ d: -112 o: 620 x: 90 d: -0d112 o: 0o620 x: 0x90
+ d: -111 o: 621 x: 91 d: -0d111 o: 0o621 x: 0x91
+ d: -110 o: 622 x: 92 d: -0d110 o: 0o622 x: 0x92
+ d: -109 o: 623 x: 93 d: -0d109 o: 0o623 x: 0x93
+ d: -108 o: 624 x: 94 d: -0d108 o: 0o624 x: 0x94
+ d: -107 o: 625 x: 95 d: -0d107 o: 0o625 x: 0x95
+ d: -106 o: 626 x: 96 d: -0d106 o: 0o626 x: 0x96
+ d: -105 o: 627 x: 97 d: -0d105 o: 0o627 x: 0x97
+ d: -104 o: 630 x: 98 d: -0d104 o: 0o630 x: 0x98
+ d: -103 o: 631 x: 99 d: -0d103 o: 0o631 x: 0x99
+ d: -102 o: 632 x: 9a d: -0d102 o: 0o632 x: 0x9a
+ d: -101 o: 633 x: 9b d: -0d101 o: 0o633 x: 0x9b
+ d: -100 o: 634 x: 9c d: -0d100 o: 0o634 x: 0x9c
+ d: -99 o: 635 x: 9d d: -0d99 o: 0o635 x: 0x9d
+ d: -98 o: 636 x: 9e d: -0d98 o: 0o636 x: 0x9e
+ d: -97 o: 637 x: 9f d: -0d97 o: 0o637 x: 0x9f
+ d: -96 o: 640 x: a0 d: -0d96 o: 0o640 x: 0xa0
+ d: -95 o: 641 x: a1 d: -0d95 o: 0o641 x: 0xa1
+ d: -94 o: 642 x: a2 d: -0d94 o: 0o642 x: 0xa2
+ d: -93 o: 643 x: a3 d: -0d93 o: 0o643 x: 0xa3
+ d: -92 o: 644 x: a4 d: -0d92 o: 0o644 x: 0xa4
+ d: -91 o: 645 x: a5 d: -0d91 o: 0o645 x: 0xa5
+ d: -90 o: 646 x: a6 d: -0d90 o: 0o646 x: 0xa6
+ d: -89 o: 647 x: a7 d: -0d89 o: 0o647 x: 0xa7
+ d: -88 o: 650 x: a8 d: -0d88 o: 0o650 x: 0xa8
+ d: -87 o: 651 x: a9 d: -0d87 o: 0o651 x: 0xa9
+ d: -86 o: 652 x: aa d: -0d86 o: 0o652 x: 0xaa
+ d: -85 o: 653 x: ab d: -0d85 o: 0o653 x: 0xab
+ d: -84 o: 654 x: ac d: -0d84 o: 0o654 x: 0xac
+ d: -83 o: 655 x: ad d: -0d83 o: 0o655 x: 0xad
+ d: -82 o: 656 x: ae d: -0d82 o: 0o656 x: 0xae
+ d: -81 o: 657 x: af d: -0d81 o: 0o657 x: 0xaf
+ d: -80 o: 660 x: b0 d: -0d80 o: 0o660 x: 0xb0
+ d: -79 o: 661 x: b1 d: -0d79 o: 0o661 x: 0xb1
+ d: -78 o: 662 x: b2 d: -0d78 o: 0o662 x: 0xb2
+ d: -77 o: 663 x: b3 d: -0d77 o: 0o663 x: 0xb3
+ d: -76 o: 664 x: b4 d: -0d76 o: 0o664 x: 0xb4
+ d: -75 o: 665 x: b5 d: -0d75 o: 0o665 x: 0xb5
+ d: -74 o: 666 x: b6 d: -0d74 o: 0o666 x: 0xb6
+ d: -73 o: 667 x: b7 d: -0d73 o: 0o667 x: 0xb7
+ d: -72 o: 670 x: b8 d: -0d72 o: 0o670 x: 0xb8
+ d: -71 o: 671 x: b9 d: -0d71 o: 0o671 x: 0xb9
+ d: -70 o: 672 x: ba d: -0d70 o: 0o672 x: 0xba
+ d: -69 o: 673 x: bb d: -0d69 o: 0o673 x: 0xbb
+ d: -68 o: 674 x: bc d: -0d68 o: 0o674 x: 0xbc
+ d: -67 o: 675 x: bd d: -0d67 o: 0o675 x: 0xbd
+ d: -66 o: 676 x: be d: -0d66 o: 0o676 x: 0xbe
+ d: -65 o: 677 x: bf d: -0d65 o: 0o677 x: 0xbf
+ d: -64 o: 700 x: c0 d: -0d64 o: 0o700 x: 0xc0
+ d: -63 o: 701 x: c1 d: -0d63 o: 0o701 x: 0xc1
+ d: -62 o: 702 x: c2 d: -0d62 o: 0o702 x: 0xc2
+ d: -61 o: 703 x: c3 d: -0d61 o: 0o703 x: 0xc3
+ d: -60 o: 704 x: c4 d: -0d60 o: 0o704 x: 0xc4
+ d: -59 o: 705 x: c5 d: -0d59 o: 0o705 x: 0xc5
+ d: -58 o: 706 x: c6 d: -0d58 o: 0o706 x: 0xc6
+ d: -57 o: 707 x: c7 d: -0d57 o: 0o707 x: 0xc7
+ d: -56 o: 710 x: c8 d: -0d56 o: 0o710 x: 0xc8
+ d: -55 o: 711 x: c9 d: -0d55 o: 0o711 x: 0xc9
+ d: -54 o: 712 x: ca d: -0d54 o: 0o712 x: 0xca
+ d: -53 o: 713 x: cb d: -0d53 o: 0o713 x: 0xcb
+ d: -52 o: 714 x: cc d: -0d52 o: 0o714 x: 0xcc
+ d: -51 o: 715 x: cd d: -0d51 o: 0o715 x: 0xcd
+ d: -50 o: 716 x: ce d: -0d50 o: 0o716 x: 0xce
+ d: -49 o: 717 x: cf d: -0d49 o: 0o717 x: 0xcf
+ d: -48 o: 720 x: d0 d: -0d48 o: 0o720 x: 0xd0
+ d: -47 o: 721 x: d1 d: -0d47 o: 0o721 x: 0xd1
+ d: -46 o: 722 x: d2 d: -0d46 o: 0o722 x: 0xd2
+ d: -45 o: 723 x: d3 d: -0d45 o: 0o723 x: 0xd3
+ d: -44 o: 724 x: d4 d: -0d44 o: 0o724 x: 0xd4
+ d: -43 o: 725 x: d5 d: -0d43 o: 0o725 x: 0xd5
+ d: -42 o: 726 x: d6 d: -0d42 o: 0o726 x: 0xd6
+ d: -41 o: 727 x: d7 d: -0d41 o: 0o727 x: 0xd7
+ d: -40 o: 730 x: d8 d: -0d40 o: 0o730 x: 0xd8
+ d: -39 o: 731 x: d9 d: -0d39 o: 0o731 x: 0xd9
+ d: -38 o: 732 x: da d: -0d38 o: 0o732 x: 0xda
+ d: -37 o: 733 x: db d: -0d37 o: 0o733 x: 0xdb
+ d: -36 o: 734 x: dc d: -0d36 o: 0o734 x: 0xdc
+ d: -35 o: 735 x: dd d: -0d35 o: 0o735 x: 0xdd
+ d: -34 o: 736 x: de d: -0d34 o: 0o736 x: 0xde
+ d: -33 o: 737 x: df d: -0d33 o: 0o737 x: 0xdf
+ d: -32 o: 740 x: e0 d: -0d32 o: 0o740 x: 0xe0
+ d: -31 o: 741 x: e1 d: -0d31 o: 0o741 x: 0xe1
+ d: -30 o: 742 x: e2 d: -0d30 o: 0o742 x: 0xe2
+ d: -29 o: 743 x: e3 d: -0d29 o: 0o743 x: 0xe3
+ d: -28 o: 744 x: e4 d: -0d28 o: 0o744 x: 0xe4
+ d: -27 o: 745 x: e5 d: -0d27 o: 0o745 x: 0xe5
+ d: -26 o: 746 x: e6 d: -0d26 o: 0o746 x: 0xe6
+ d: -25 o: 747 x: e7 d: -0d25 o: 0o747 x: 0xe7
+ d: -24 o: 750 x: e8 d: -0d24 o: 0o750 x: 0xe8
+ d: -23 o: 751 x: e9 d: -0d23 o: 0o751 x: 0xe9
+ d: -22 o: 752 x: ea d: -0d22 o: 0o752 x: 0xea
+ d: -21 o: 753 x: eb d: -0d21 o: 0o753 x: 0xeb
+ d: -20 o: 754 x: ec d: -0d20 o: 0o754 x: 0xec
+ d: -19 o: 755 x: ed d: -0d19 o: 0o755 x: 0xed
+ d: -18 o: 756 x: ee d: -0d18 o: 0o756 x: 0xee
+ d: -17 o: 757 x: ef d: -0d17 o: 0o757 x: 0xef
+ d: -16 o: 760 x: f0 d: -0d16 o: 0o760 x: 0xf0
+ d: -15 o: 761 x: f1 d: -0d15 o: 0o761 x: 0xf1
+ d: -14 o: 762 x: f2 d: -0d14 o: 0o762 x: 0xf2
+ d: -13 o: 763 x: f3 d: -0d13 o: 0o763 x: 0xf3
+ d: -12 o: 764 x: f4 d: -0d12 o: 0o764 x: 0xf4
+ d: -11 o: 765 x: f5 d: -0d11 o: 0o765 x: 0xf5
+ d: -10 o: 766 x: f6 d: -0d10 o: 0o766 x: 0xf6
+ d: -9 o: 767 x: f7 d: -0d9 o: 0o767 x: 0xf7
+ d: -8 o: 770 x: f8 d: -0d8 o: 0o770 x: 0xf8
+ d: -7 o: 771 x: f9 d: -0d7 o: 0o771 x: 0xf9
+ d: -6 o: 772 x: fa d: -0d6 o: 0o772 x: 0xfa
+ d: -5 o: 773 x: fb d: -0d5 o: 0o773 x: 0xfb
+ d: -4 o: 774 x: fc d: -0d4 o: 0o774 x: 0xfc
+ d: -3 o: 775 x: fd d: -0d3 o: 0o775 x: 0xfd
+ d: -2 o: 776 x: fe d: -0d2 o: 0o776 x: 0xfe
+ d: -1 o: 777 x: ff d: -0d1 o: 0o777 x: 0xff
+
+sc_uint<8>
+ d: 0 o: 000 x: 000 d: 0d0 o: 0o000 x: 0x000
+ d: 1 o: 001 x: 001 d: 0d1 o: 0o001 x: 0x001
+ d: 2 o: 002 x: 002 d: 0d2 o: 0o002 x: 0x002
+ d: 3 o: 003 x: 003 d: 0d3 o: 0o003 x: 0x003
+ d: 4 o: 004 x: 004 d: 0d4 o: 0o004 x: 0x004
+ d: 5 o: 005 x: 005 d: 0d5 o: 0o005 x: 0x005
+ d: 6 o: 006 x: 006 d: 0d6 o: 0o006 x: 0x006
+ d: 7 o: 007 x: 007 d: 0d7 o: 0o007 x: 0x007
+ d: 8 o: 010 x: 008 d: 0d8 o: 0o010 x: 0x008
+ d: 9 o: 011 x: 009 d: 0d9 o: 0o011 x: 0x009
+ d: 10 o: 012 x: 00a d: 0d10 o: 0o012 x: 0x00a
+ d: 11 o: 013 x: 00b d: 0d11 o: 0o013 x: 0x00b
+ d: 12 o: 014 x: 00c d: 0d12 o: 0o014 x: 0x00c
+ d: 13 o: 015 x: 00d d: 0d13 o: 0o015 x: 0x00d
+ d: 14 o: 016 x: 00e d: 0d14 o: 0o016 x: 0x00e
+ d: 15 o: 017 x: 00f d: 0d15 o: 0o017 x: 0x00f
+ d: 16 o: 020 x: 010 d: 0d16 o: 0o020 x: 0x010
+ d: 17 o: 021 x: 011 d: 0d17 o: 0o021 x: 0x011
+ d: 18 o: 022 x: 012 d: 0d18 o: 0o022 x: 0x012
+ d: 19 o: 023 x: 013 d: 0d19 o: 0o023 x: 0x013
+ d: 20 o: 024 x: 014 d: 0d20 o: 0o024 x: 0x014
+ d: 21 o: 025 x: 015 d: 0d21 o: 0o025 x: 0x015
+ d: 22 o: 026 x: 016 d: 0d22 o: 0o026 x: 0x016
+ d: 23 o: 027 x: 017 d: 0d23 o: 0o027 x: 0x017
+ d: 24 o: 030 x: 018 d: 0d24 o: 0o030 x: 0x018
+ d: 25 o: 031 x: 019 d: 0d25 o: 0o031 x: 0x019
+ d: 26 o: 032 x: 01a d: 0d26 o: 0o032 x: 0x01a
+ d: 27 o: 033 x: 01b d: 0d27 o: 0o033 x: 0x01b
+ d: 28 o: 034 x: 01c d: 0d28 o: 0o034 x: 0x01c
+ d: 29 o: 035 x: 01d d: 0d29 o: 0o035 x: 0x01d
+ d: 30 o: 036 x: 01e d: 0d30 o: 0o036 x: 0x01e
+ d: 31 o: 037 x: 01f d: 0d31 o: 0o037 x: 0x01f
+ d: 32 o: 040 x: 020 d: 0d32 o: 0o040 x: 0x020
+ d: 33 o: 041 x: 021 d: 0d33 o: 0o041 x: 0x021
+ d: 34 o: 042 x: 022 d: 0d34 o: 0o042 x: 0x022
+ d: 35 o: 043 x: 023 d: 0d35 o: 0o043 x: 0x023
+ d: 36 o: 044 x: 024 d: 0d36 o: 0o044 x: 0x024
+ d: 37 o: 045 x: 025 d: 0d37 o: 0o045 x: 0x025
+ d: 38 o: 046 x: 026 d: 0d38 o: 0o046 x: 0x026
+ d: 39 o: 047 x: 027 d: 0d39 o: 0o047 x: 0x027
+ d: 40 o: 050 x: 028 d: 0d40 o: 0o050 x: 0x028
+ d: 41 o: 051 x: 029 d: 0d41 o: 0o051 x: 0x029
+ d: 42 o: 052 x: 02a d: 0d42 o: 0o052 x: 0x02a
+ d: 43 o: 053 x: 02b d: 0d43 o: 0o053 x: 0x02b
+ d: 44 o: 054 x: 02c d: 0d44 o: 0o054 x: 0x02c
+ d: 45 o: 055 x: 02d d: 0d45 o: 0o055 x: 0x02d
+ d: 46 o: 056 x: 02e d: 0d46 o: 0o056 x: 0x02e
+ d: 47 o: 057 x: 02f d: 0d47 o: 0o057 x: 0x02f
+ d: 48 o: 060 x: 030 d: 0d48 o: 0o060 x: 0x030
+ d: 49 o: 061 x: 031 d: 0d49 o: 0o061 x: 0x031
+ d: 50 o: 062 x: 032 d: 0d50 o: 0o062 x: 0x032
+ d: 51 o: 063 x: 033 d: 0d51 o: 0o063 x: 0x033
+ d: 52 o: 064 x: 034 d: 0d52 o: 0o064 x: 0x034
+ d: 53 o: 065 x: 035 d: 0d53 o: 0o065 x: 0x035
+ d: 54 o: 066 x: 036 d: 0d54 o: 0o066 x: 0x036
+ d: 55 o: 067 x: 037 d: 0d55 o: 0o067 x: 0x037
+ d: 56 o: 070 x: 038 d: 0d56 o: 0o070 x: 0x038
+ d: 57 o: 071 x: 039 d: 0d57 o: 0o071 x: 0x039
+ d: 58 o: 072 x: 03a d: 0d58 o: 0o072 x: 0x03a
+ d: 59 o: 073 x: 03b d: 0d59 o: 0o073 x: 0x03b
+ d: 60 o: 074 x: 03c d: 0d60 o: 0o074 x: 0x03c
+ d: 61 o: 075 x: 03d d: 0d61 o: 0o075 x: 0x03d
+ d: 62 o: 076 x: 03e d: 0d62 o: 0o076 x: 0x03e
+ d: 63 o: 077 x: 03f d: 0d63 o: 0o077 x: 0x03f
+ d: 64 o: 100 x: 040 d: 0d64 o: 0o100 x: 0x040
+ d: 65 o: 101 x: 041 d: 0d65 o: 0o101 x: 0x041
+ d: 66 o: 102 x: 042 d: 0d66 o: 0o102 x: 0x042
+ d: 67 o: 103 x: 043 d: 0d67 o: 0o103 x: 0x043
+ d: 68 o: 104 x: 044 d: 0d68 o: 0o104 x: 0x044
+ d: 69 o: 105 x: 045 d: 0d69 o: 0o105 x: 0x045
+ d: 70 o: 106 x: 046 d: 0d70 o: 0o106 x: 0x046
+ d: 71 o: 107 x: 047 d: 0d71 o: 0o107 x: 0x047
+ d: 72 o: 110 x: 048 d: 0d72 o: 0o110 x: 0x048
+ d: 73 o: 111 x: 049 d: 0d73 o: 0o111 x: 0x049
+ d: 74 o: 112 x: 04a d: 0d74 o: 0o112 x: 0x04a
+ d: 75 o: 113 x: 04b d: 0d75 o: 0o113 x: 0x04b
+ d: 76 o: 114 x: 04c d: 0d76 o: 0o114 x: 0x04c
+ d: 77 o: 115 x: 04d d: 0d77 o: 0o115 x: 0x04d
+ d: 78 o: 116 x: 04e d: 0d78 o: 0o116 x: 0x04e
+ d: 79 o: 117 x: 04f d: 0d79 o: 0o117 x: 0x04f
+ d: 80 o: 120 x: 050 d: 0d80 o: 0o120 x: 0x050
+ d: 81 o: 121 x: 051 d: 0d81 o: 0o121 x: 0x051
+ d: 82 o: 122 x: 052 d: 0d82 o: 0o122 x: 0x052
+ d: 83 o: 123 x: 053 d: 0d83 o: 0o123 x: 0x053
+ d: 84 o: 124 x: 054 d: 0d84 o: 0o124 x: 0x054
+ d: 85 o: 125 x: 055 d: 0d85 o: 0o125 x: 0x055
+ d: 86 o: 126 x: 056 d: 0d86 o: 0o126 x: 0x056
+ d: 87 o: 127 x: 057 d: 0d87 o: 0o127 x: 0x057
+ d: 88 o: 130 x: 058 d: 0d88 o: 0o130 x: 0x058
+ d: 89 o: 131 x: 059 d: 0d89 o: 0o131 x: 0x059
+ d: 90 o: 132 x: 05a d: 0d90 o: 0o132 x: 0x05a
+ d: 91 o: 133 x: 05b d: 0d91 o: 0o133 x: 0x05b
+ d: 92 o: 134 x: 05c d: 0d92 o: 0o134 x: 0x05c
+ d: 93 o: 135 x: 05d d: 0d93 o: 0o135 x: 0x05d
+ d: 94 o: 136 x: 05e d: 0d94 o: 0o136 x: 0x05e
+ d: 95 o: 137 x: 05f d: 0d95 o: 0o137 x: 0x05f
+ d: 96 o: 140 x: 060 d: 0d96 o: 0o140 x: 0x060
+ d: 97 o: 141 x: 061 d: 0d97 o: 0o141 x: 0x061
+ d: 98 o: 142 x: 062 d: 0d98 o: 0o142 x: 0x062
+ d: 99 o: 143 x: 063 d: 0d99 o: 0o143 x: 0x063
+ d: 100 o: 144 x: 064 d: 0d100 o: 0o144 x: 0x064
+ d: 101 o: 145 x: 065 d: 0d101 o: 0o145 x: 0x065
+ d: 102 o: 146 x: 066 d: 0d102 o: 0o146 x: 0x066
+ d: 103 o: 147 x: 067 d: 0d103 o: 0o147 x: 0x067
+ d: 104 o: 150 x: 068 d: 0d104 o: 0o150 x: 0x068
+ d: 105 o: 151 x: 069 d: 0d105 o: 0o151 x: 0x069
+ d: 106 o: 152 x: 06a d: 0d106 o: 0o152 x: 0x06a
+ d: 107 o: 153 x: 06b d: 0d107 o: 0o153 x: 0x06b
+ d: 108 o: 154 x: 06c d: 0d108 o: 0o154 x: 0x06c
+ d: 109 o: 155 x: 06d d: 0d109 o: 0o155 x: 0x06d
+ d: 110 o: 156 x: 06e d: 0d110 o: 0o156 x: 0x06e
+ d: 111 o: 157 x: 06f d: 0d111 o: 0o157 x: 0x06f
+ d: 112 o: 160 x: 070 d: 0d112 o: 0o160 x: 0x070
+ d: 113 o: 161 x: 071 d: 0d113 o: 0o161 x: 0x071
+ d: 114 o: 162 x: 072 d: 0d114 o: 0o162 x: 0x072
+ d: 115 o: 163 x: 073 d: 0d115 o: 0o163 x: 0x073
+ d: 116 o: 164 x: 074 d: 0d116 o: 0o164 x: 0x074
+ d: 117 o: 165 x: 075 d: 0d117 o: 0o165 x: 0x075
+ d: 118 o: 166 x: 076 d: 0d118 o: 0o166 x: 0x076
+ d: 119 o: 167 x: 077 d: 0d119 o: 0o167 x: 0x077
+ d: 120 o: 170 x: 078 d: 0d120 o: 0o170 x: 0x078
+ d: 121 o: 171 x: 079 d: 0d121 o: 0o171 x: 0x079
+ d: 122 o: 172 x: 07a d: 0d122 o: 0o172 x: 0x07a
+ d: 123 o: 173 x: 07b d: 0d123 o: 0o173 x: 0x07b
+ d: 124 o: 174 x: 07c d: 0d124 o: 0o174 x: 0x07c
+ d: 125 o: 175 x: 07d d: 0d125 o: 0o175 x: 0x07d
+ d: 126 o: 176 x: 07e d: 0d126 o: 0o176 x: 0x07e
+ d: 127 o: 177 x: 07f d: 0d127 o: 0o177 x: 0x07f
+ d: 128 o: 200 x: 080 d: 0d128 o: 0o200 x: 0x080
+ d: 129 o: 201 x: 081 d: 0d129 o: 0o201 x: 0x081
+ d: 130 o: 202 x: 082 d: 0d130 o: 0o202 x: 0x082
+ d: 131 o: 203 x: 083 d: 0d131 o: 0o203 x: 0x083
+ d: 132 o: 204 x: 084 d: 0d132 o: 0o204 x: 0x084
+ d: 133 o: 205 x: 085 d: 0d133 o: 0o205 x: 0x085
+ d: 134 o: 206 x: 086 d: 0d134 o: 0o206 x: 0x086
+ d: 135 o: 207 x: 087 d: 0d135 o: 0o207 x: 0x087
+ d: 136 o: 210 x: 088 d: 0d136 o: 0o210 x: 0x088
+ d: 137 o: 211 x: 089 d: 0d137 o: 0o211 x: 0x089
+ d: 138 o: 212 x: 08a d: 0d138 o: 0o212 x: 0x08a
+ d: 139 o: 213 x: 08b d: 0d139 o: 0o213 x: 0x08b
+ d: 140 o: 214 x: 08c d: 0d140 o: 0o214 x: 0x08c
+ d: 141 o: 215 x: 08d d: 0d141 o: 0o215 x: 0x08d
+ d: 142 o: 216 x: 08e d: 0d142 o: 0o216 x: 0x08e
+ d: 143 o: 217 x: 08f d: 0d143 o: 0o217 x: 0x08f
+ d: 144 o: 220 x: 090 d: 0d144 o: 0o220 x: 0x090
+ d: 145 o: 221 x: 091 d: 0d145 o: 0o221 x: 0x091
+ d: 146 o: 222 x: 092 d: 0d146 o: 0o222 x: 0x092
+ d: 147 o: 223 x: 093 d: 0d147 o: 0o223 x: 0x093
+ d: 148 o: 224 x: 094 d: 0d148 o: 0o224 x: 0x094
+ d: 149 o: 225 x: 095 d: 0d149 o: 0o225 x: 0x095
+ d: 150 o: 226 x: 096 d: 0d150 o: 0o226 x: 0x096
+ d: 151 o: 227 x: 097 d: 0d151 o: 0o227 x: 0x097
+ d: 152 o: 230 x: 098 d: 0d152 o: 0o230 x: 0x098
+ d: 153 o: 231 x: 099 d: 0d153 o: 0o231 x: 0x099
+ d: 154 o: 232 x: 09a d: 0d154 o: 0o232 x: 0x09a
+ d: 155 o: 233 x: 09b d: 0d155 o: 0o233 x: 0x09b
+ d: 156 o: 234 x: 09c d: 0d156 o: 0o234 x: 0x09c
+ d: 157 o: 235 x: 09d d: 0d157 o: 0o235 x: 0x09d
+ d: 158 o: 236 x: 09e d: 0d158 o: 0o236 x: 0x09e
+ d: 159 o: 237 x: 09f d: 0d159 o: 0o237 x: 0x09f
+ d: 160 o: 240 x: 0a0 d: 0d160 o: 0o240 x: 0x0a0
+ d: 161 o: 241 x: 0a1 d: 0d161 o: 0o241 x: 0x0a1
+ d: 162 o: 242 x: 0a2 d: 0d162 o: 0o242 x: 0x0a2
+ d: 163 o: 243 x: 0a3 d: 0d163 o: 0o243 x: 0x0a3
+ d: 164 o: 244 x: 0a4 d: 0d164 o: 0o244 x: 0x0a4
+ d: 165 o: 245 x: 0a5 d: 0d165 o: 0o245 x: 0x0a5
+ d: 166 o: 246 x: 0a6 d: 0d166 o: 0o246 x: 0x0a6
+ d: 167 o: 247 x: 0a7 d: 0d167 o: 0o247 x: 0x0a7
+ d: 168 o: 250 x: 0a8 d: 0d168 o: 0o250 x: 0x0a8
+ d: 169 o: 251 x: 0a9 d: 0d169 o: 0o251 x: 0x0a9
+ d: 170 o: 252 x: 0aa d: 0d170 o: 0o252 x: 0x0aa
+ d: 171 o: 253 x: 0ab d: 0d171 o: 0o253 x: 0x0ab
+ d: 172 o: 254 x: 0ac d: 0d172 o: 0o254 x: 0x0ac
+ d: 173 o: 255 x: 0ad d: 0d173 o: 0o255 x: 0x0ad
+ d: 174 o: 256 x: 0ae d: 0d174 o: 0o256 x: 0x0ae
+ d: 175 o: 257 x: 0af d: 0d175 o: 0o257 x: 0x0af
+ d: 176 o: 260 x: 0b0 d: 0d176 o: 0o260 x: 0x0b0
+ d: 177 o: 261 x: 0b1 d: 0d177 o: 0o261 x: 0x0b1
+ d: 178 o: 262 x: 0b2 d: 0d178 o: 0o262 x: 0x0b2
+ d: 179 o: 263 x: 0b3 d: 0d179 o: 0o263 x: 0x0b3
+ d: 180 o: 264 x: 0b4 d: 0d180 o: 0o264 x: 0x0b4
+ d: 181 o: 265 x: 0b5 d: 0d181 o: 0o265 x: 0x0b5
+ d: 182 o: 266 x: 0b6 d: 0d182 o: 0o266 x: 0x0b6
+ d: 183 o: 267 x: 0b7 d: 0d183 o: 0o267 x: 0x0b7
+ d: 184 o: 270 x: 0b8 d: 0d184 o: 0o270 x: 0x0b8
+ d: 185 o: 271 x: 0b9 d: 0d185 o: 0o271 x: 0x0b9
+ d: 186 o: 272 x: 0ba d: 0d186 o: 0o272 x: 0x0ba
+ d: 187 o: 273 x: 0bb d: 0d187 o: 0o273 x: 0x0bb
+ d: 188 o: 274 x: 0bc d: 0d188 o: 0o274 x: 0x0bc
+ d: 189 o: 275 x: 0bd d: 0d189 o: 0o275 x: 0x0bd
+ d: 190 o: 276 x: 0be d: 0d190 o: 0o276 x: 0x0be
+ d: 191 o: 277 x: 0bf d: 0d191 o: 0o277 x: 0x0bf
+ d: 192 o: 300 x: 0c0 d: 0d192 o: 0o300 x: 0x0c0
+ d: 193 o: 301 x: 0c1 d: 0d193 o: 0o301 x: 0x0c1
+ d: 194 o: 302 x: 0c2 d: 0d194 o: 0o302 x: 0x0c2
+ d: 195 o: 303 x: 0c3 d: 0d195 o: 0o303 x: 0x0c3
+ d: 196 o: 304 x: 0c4 d: 0d196 o: 0o304 x: 0x0c4
+ d: 197 o: 305 x: 0c5 d: 0d197 o: 0o305 x: 0x0c5
+ d: 198 o: 306 x: 0c6 d: 0d198 o: 0o306 x: 0x0c6
+ d: 199 o: 307 x: 0c7 d: 0d199 o: 0o307 x: 0x0c7
+ d: 200 o: 310 x: 0c8 d: 0d200 o: 0o310 x: 0x0c8
+ d: 201 o: 311 x: 0c9 d: 0d201 o: 0o311 x: 0x0c9
+ d: 202 o: 312 x: 0ca d: 0d202 o: 0o312 x: 0x0ca
+ d: 203 o: 313 x: 0cb d: 0d203 o: 0o313 x: 0x0cb
+ d: 204 o: 314 x: 0cc d: 0d204 o: 0o314 x: 0x0cc
+ d: 205 o: 315 x: 0cd d: 0d205 o: 0o315 x: 0x0cd
+ d: 206 o: 316 x: 0ce d: 0d206 o: 0o316 x: 0x0ce
+ d: 207 o: 317 x: 0cf d: 0d207 o: 0o317 x: 0x0cf
+ d: 208 o: 320 x: 0d0 d: 0d208 o: 0o320 x: 0x0d0
+ d: 209 o: 321 x: 0d1 d: 0d209 o: 0o321 x: 0x0d1
+ d: 210 o: 322 x: 0d2 d: 0d210 o: 0o322 x: 0x0d2
+ d: 211 o: 323 x: 0d3 d: 0d211 o: 0o323 x: 0x0d3
+ d: 212 o: 324 x: 0d4 d: 0d212 o: 0o324 x: 0x0d4
+ d: 213 o: 325 x: 0d5 d: 0d213 o: 0o325 x: 0x0d5
+ d: 214 o: 326 x: 0d6 d: 0d214 o: 0o326 x: 0x0d6
+ d: 215 o: 327 x: 0d7 d: 0d215 o: 0o327 x: 0x0d7
+ d: 216 o: 330 x: 0d8 d: 0d216 o: 0o330 x: 0x0d8
+ d: 217 o: 331 x: 0d9 d: 0d217 o: 0o331 x: 0x0d9
+ d: 218 o: 332 x: 0da d: 0d218 o: 0o332 x: 0x0da
+ d: 219 o: 333 x: 0db d: 0d219 o: 0o333 x: 0x0db
+ d: 220 o: 334 x: 0dc d: 0d220 o: 0o334 x: 0x0dc
+ d: 221 o: 335 x: 0dd d: 0d221 o: 0o335 x: 0x0dd
+ d: 222 o: 336 x: 0de d: 0d222 o: 0o336 x: 0x0de
+ d: 223 o: 337 x: 0df d: 0d223 o: 0o337 x: 0x0df
+ d: 224 o: 340 x: 0e0 d: 0d224 o: 0o340 x: 0x0e0
+ d: 225 o: 341 x: 0e1 d: 0d225 o: 0o341 x: 0x0e1
+ d: 226 o: 342 x: 0e2 d: 0d226 o: 0o342 x: 0x0e2
+ d: 227 o: 343 x: 0e3 d: 0d227 o: 0o343 x: 0x0e3
+ d: 228 o: 344 x: 0e4 d: 0d228 o: 0o344 x: 0x0e4
+ d: 229 o: 345 x: 0e5 d: 0d229 o: 0o345 x: 0x0e5
+ d: 230 o: 346 x: 0e6 d: 0d230 o: 0o346 x: 0x0e6
+ d: 231 o: 347 x: 0e7 d: 0d231 o: 0o347 x: 0x0e7
+ d: 232 o: 350 x: 0e8 d: 0d232 o: 0o350 x: 0x0e8
+ d: 233 o: 351 x: 0e9 d: 0d233 o: 0o351 x: 0x0e9
+ d: 234 o: 352 x: 0ea d: 0d234 o: 0o352 x: 0x0ea
+ d: 235 o: 353 x: 0eb d: 0d235 o: 0o353 x: 0x0eb
+ d: 236 o: 354 x: 0ec d: 0d236 o: 0o354 x: 0x0ec
+ d: 237 o: 355 x: 0ed d: 0d237 o: 0o355 x: 0x0ed
+ d: 238 o: 356 x: 0ee d: 0d238 o: 0o356 x: 0x0ee
+ d: 239 o: 357 x: 0ef d: 0d239 o: 0o357 x: 0x0ef
+ d: 240 o: 360 x: 0f0 d: 0d240 o: 0o360 x: 0x0f0
+ d: 241 o: 361 x: 0f1 d: 0d241 o: 0o361 x: 0x0f1
+ d: 242 o: 362 x: 0f2 d: 0d242 o: 0o362 x: 0x0f2
+ d: 243 o: 363 x: 0f3 d: 0d243 o: 0o363 x: 0x0f3
+ d: 244 o: 364 x: 0f4 d: 0d244 o: 0o364 x: 0x0f4
+ d: 245 o: 365 x: 0f5 d: 0d245 o: 0o365 x: 0x0f5
+ d: 246 o: 366 x: 0f6 d: 0d246 o: 0o366 x: 0x0f6
+ d: 247 o: 367 x: 0f7 d: 0d247 o: 0o367 x: 0x0f7
+ d: 248 o: 370 x: 0f8 d: 0d248 o: 0o370 x: 0x0f8
+ d: 249 o: 371 x: 0f9 d: 0d249 o: 0o371 x: 0x0f9
+ d: 250 o: 372 x: 0fa d: 0d250 o: 0o372 x: 0x0fa
+ d: 251 o: 373 x: 0fb d: 0d251 o: 0o373 x: 0x0fb
+ d: 252 o: 374 x: 0fc d: 0d252 o: 0o374 x: 0x0fc
+ d: 253 o: 375 x: 0fd d: 0d253 o: 0o375 x: 0x0fd
+ d: 254 o: 376 x: 0fe d: 0d254 o: 0o376 x: 0x0fe
+ d: 255 o: 377 x: 0ff d: 0d255 o: 0o377 x: 0x0ff
+
+sc_lv<8>
+ d: 00000000 o: 000 x: 000 d: 00000000 o: 0o000 x: 0x000
+ d: 00000001 o: 001 x: 001 d: 00000001 o: 0o001 x: 0x001
+ d: 00000010 o: 002 x: 002 d: 00000010 o: 0o002 x: 0x002
+ d: 00000011 o: 003 x: 003 d: 00000011 o: 0o003 x: 0x003
+ d: 00000100 o: 004 x: 004 d: 00000100 o: 0o004 x: 0x004
+ d: 00000101 o: 005 x: 005 d: 00000101 o: 0o005 x: 0x005
+ d: 00000110 o: 006 x: 006 d: 00000110 o: 0o006 x: 0x006
+ d: 00000111 o: 007 x: 007 d: 00000111 o: 0o007 x: 0x007
+ d: 00001000 o: 010 x: 008 d: 00001000 o: 0o010 x: 0x008
+ d: 00001001 o: 011 x: 009 d: 00001001 o: 0o011 x: 0x009
+ d: 00001010 o: 012 x: 00a d: 00001010 o: 0o012 x: 0x00a
+ d: 00001011 o: 013 x: 00b d: 00001011 o: 0o013 x: 0x00b
+ d: 00001100 o: 014 x: 00c d: 00001100 o: 0o014 x: 0x00c
+ d: 00001101 o: 015 x: 00d d: 00001101 o: 0o015 x: 0x00d
+ d: 00001110 o: 016 x: 00e d: 00001110 o: 0o016 x: 0x00e
+ d: 00001111 o: 017 x: 00f d: 00001111 o: 0o017 x: 0x00f
+ d: 00010000 o: 020 x: 010 d: 00010000 o: 0o020 x: 0x010
+ d: 00010001 o: 021 x: 011 d: 00010001 o: 0o021 x: 0x011
+ d: 00010010 o: 022 x: 012 d: 00010010 o: 0o022 x: 0x012
+ d: 00010011 o: 023 x: 013 d: 00010011 o: 0o023 x: 0x013
+ d: 00010100 o: 024 x: 014 d: 00010100 o: 0o024 x: 0x014
+ d: 00010101 o: 025 x: 015 d: 00010101 o: 0o025 x: 0x015
+ d: 00010110 o: 026 x: 016 d: 00010110 o: 0o026 x: 0x016
+ d: 00010111 o: 027 x: 017 d: 00010111 o: 0o027 x: 0x017
+ d: 00011000 o: 030 x: 018 d: 00011000 o: 0o030 x: 0x018
+ d: 00011001 o: 031 x: 019 d: 00011001 o: 0o031 x: 0x019
+ d: 00011010 o: 032 x: 01a d: 00011010 o: 0o032 x: 0x01a
+ d: 00011011 o: 033 x: 01b d: 00011011 o: 0o033 x: 0x01b
+ d: 00011100 o: 034 x: 01c d: 00011100 o: 0o034 x: 0x01c
+ d: 00011101 o: 035 x: 01d d: 00011101 o: 0o035 x: 0x01d
+ d: 00011110 o: 036 x: 01e d: 00011110 o: 0o036 x: 0x01e
+ d: 00011111 o: 037 x: 01f d: 00011111 o: 0o037 x: 0x01f
+ d: 00100000 o: 040 x: 020 d: 00100000 o: 0o040 x: 0x020
+ d: 00100001 o: 041 x: 021 d: 00100001 o: 0o041 x: 0x021
+ d: 00100010 o: 042 x: 022 d: 00100010 o: 0o042 x: 0x022
+ d: 00100011 o: 043 x: 023 d: 00100011 o: 0o043 x: 0x023
+ d: 00100100 o: 044 x: 024 d: 00100100 o: 0o044 x: 0x024
+ d: 00100101 o: 045 x: 025 d: 00100101 o: 0o045 x: 0x025
+ d: 00100110 o: 046 x: 026 d: 00100110 o: 0o046 x: 0x026
+ d: 00100111 o: 047 x: 027 d: 00100111 o: 0o047 x: 0x027
+ d: 00101000 o: 050 x: 028 d: 00101000 o: 0o050 x: 0x028
+ d: 00101001 o: 051 x: 029 d: 00101001 o: 0o051 x: 0x029
+ d: 00101010 o: 052 x: 02a d: 00101010 o: 0o052 x: 0x02a
+ d: 00101011 o: 053 x: 02b d: 00101011 o: 0o053 x: 0x02b
+ d: 00101100 o: 054 x: 02c d: 00101100 o: 0o054 x: 0x02c
+ d: 00101101 o: 055 x: 02d d: 00101101 o: 0o055 x: 0x02d
+ d: 00101110 o: 056 x: 02e d: 00101110 o: 0o056 x: 0x02e
+ d: 00101111 o: 057 x: 02f d: 00101111 o: 0o057 x: 0x02f
+ d: 00110000 o: 060 x: 030 d: 00110000 o: 0o060 x: 0x030
+ d: 00110001 o: 061 x: 031 d: 00110001 o: 0o061 x: 0x031
+ d: 00110010 o: 062 x: 032 d: 00110010 o: 0o062 x: 0x032
+ d: 00110011 o: 063 x: 033 d: 00110011 o: 0o063 x: 0x033
+ d: 00110100 o: 064 x: 034 d: 00110100 o: 0o064 x: 0x034
+ d: 00110101 o: 065 x: 035 d: 00110101 o: 0o065 x: 0x035
+ d: 00110110 o: 066 x: 036 d: 00110110 o: 0o066 x: 0x036
+ d: 00110111 o: 067 x: 037 d: 00110111 o: 0o067 x: 0x037
+ d: 00111000 o: 070 x: 038 d: 00111000 o: 0o070 x: 0x038
+ d: 00111001 o: 071 x: 039 d: 00111001 o: 0o071 x: 0x039
+ d: 00111010 o: 072 x: 03a d: 00111010 o: 0o072 x: 0x03a
+ d: 00111011 o: 073 x: 03b d: 00111011 o: 0o073 x: 0x03b
+ d: 00111100 o: 074 x: 03c d: 00111100 o: 0o074 x: 0x03c
+ d: 00111101 o: 075 x: 03d d: 00111101 o: 0o075 x: 0x03d
+ d: 00111110 o: 076 x: 03e d: 00111110 o: 0o076 x: 0x03e
+ d: 00111111 o: 077 x: 03f d: 00111111 o: 0o077 x: 0x03f
+ d: 01000000 o: 100 x: 040 d: 01000000 o: 0o100 x: 0x040
+ d: 01000001 o: 101 x: 041 d: 01000001 o: 0o101 x: 0x041
+ d: 01000010 o: 102 x: 042 d: 01000010 o: 0o102 x: 0x042
+ d: 01000011 o: 103 x: 043 d: 01000011 o: 0o103 x: 0x043
+ d: 01000100 o: 104 x: 044 d: 01000100 o: 0o104 x: 0x044
+ d: 01000101 o: 105 x: 045 d: 01000101 o: 0o105 x: 0x045
+ d: 01000110 o: 106 x: 046 d: 01000110 o: 0o106 x: 0x046
+ d: 01000111 o: 107 x: 047 d: 01000111 o: 0o107 x: 0x047
+ d: 01001000 o: 110 x: 048 d: 01001000 o: 0o110 x: 0x048
+ d: 01001001 o: 111 x: 049 d: 01001001 o: 0o111 x: 0x049
+ d: 01001010 o: 112 x: 04a d: 01001010 o: 0o112 x: 0x04a
+ d: 01001011 o: 113 x: 04b d: 01001011 o: 0o113 x: 0x04b
+ d: 01001100 o: 114 x: 04c d: 01001100 o: 0o114 x: 0x04c
+ d: 01001101 o: 115 x: 04d d: 01001101 o: 0o115 x: 0x04d
+ d: 01001110 o: 116 x: 04e d: 01001110 o: 0o116 x: 0x04e
+ d: 01001111 o: 117 x: 04f d: 01001111 o: 0o117 x: 0x04f
+ d: 01010000 o: 120 x: 050 d: 01010000 o: 0o120 x: 0x050
+ d: 01010001 o: 121 x: 051 d: 01010001 o: 0o121 x: 0x051
+ d: 01010010 o: 122 x: 052 d: 01010010 o: 0o122 x: 0x052
+ d: 01010011 o: 123 x: 053 d: 01010011 o: 0o123 x: 0x053
+ d: 01010100 o: 124 x: 054 d: 01010100 o: 0o124 x: 0x054
+ d: 01010101 o: 125 x: 055 d: 01010101 o: 0o125 x: 0x055
+ d: 01010110 o: 126 x: 056 d: 01010110 o: 0o126 x: 0x056
+ d: 01010111 o: 127 x: 057 d: 01010111 o: 0o127 x: 0x057
+ d: 01011000 o: 130 x: 058 d: 01011000 o: 0o130 x: 0x058
+ d: 01011001 o: 131 x: 059 d: 01011001 o: 0o131 x: 0x059
+ d: 01011010 o: 132 x: 05a d: 01011010 o: 0o132 x: 0x05a
+ d: 01011011 o: 133 x: 05b d: 01011011 o: 0o133 x: 0x05b
+ d: 01011100 o: 134 x: 05c d: 01011100 o: 0o134 x: 0x05c
+ d: 01011101 o: 135 x: 05d d: 01011101 o: 0o135 x: 0x05d
+ d: 01011110 o: 136 x: 05e d: 01011110 o: 0o136 x: 0x05e
+ d: 01011111 o: 137 x: 05f d: 01011111 o: 0o137 x: 0x05f
+ d: 01100000 o: 140 x: 060 d: 01100000 o: 0o140 x: 0x060
+ d: 01100001 o: 141 x: 061 d: 01100001 o: 0o141 x: 0x061
+ d: 01100010 o: 142 x: 062 d: 01100010 o: 0o142 x: 0x062
+ d: 01100011 o: 143 x: 063 d: 01100011 o: 0o143 x: 0x063
+ d: 01100100 o: 144 x: 064 d: 01100100 o: 0o144 x: 0x064
+ d: 01100101 o: 145 x: 065 d: 01100101 o: 0o145 x: 0x065
+ d: 01100110 o: 146 x: 066 d: 01100110 o: 0o146 x: 0x066
+ d: 01100111 o: 147 x: 067 d: 01100111 o: 0o147 x: 0x067
+ d: 01101000 o: 150 x: 068 d: 01101000 o: 0o150 x: 0x068
+ d: 01101001 o: 151 x: 069 d: 01101001 o: 0o151 x: 0x069
+ d: 01101010 o: 152 x: 06a d: 01101010 o: 0o152 x: 0x06a
+ d: 01101011 o: 153 x: 06b d: 01101011 o: 0o153 x: 0x06b
+ d: 01101100 o: 154 x: 06c d: 01101100 o: 0o154 x: 0x06c
+ d: 01101101 o: 155 x: 06d d: 01101101 o: 0o155 x: 0x06d
+ d: 01101110 o: 156 x: 06e d: 01101110 o: 0o156 x: 0x06e
+ d: 01101111 o: 157 x: 06f d: 01101111 o: 0o157 x: 0x06f
+ d: 01110000 o: 160 x: 070 d: 01110000 o: 0o160 x: 0x070
+ d: 01110001 o: 161 x: 071 d: 01110001 o: 0o161 x: 0x071
+ d: 01110010 o: 162 x: 072 d: 01110010 o: 0o162 x: 0x072
+ d: 01110011 o: 163 x: 073 d: 01110011 o: 0o163 x: 0x073
+ d: 01110100 o: 164 x: 074 d: 01110100 o: 0o164 x: 0x074
+ d: 01110101 o: 165 x: 075 d: 01110101 o: 0o165 x: 0x075
+ d: 01110110 o: 166 x: 076 d: 01110110 o: 0o166 x: 0x076
+ d: 01110111 o: 167 x: 077 d: 01110111 o: 0o167 x: 0x077
+ d: 01111000 o: 170 x: 078 d: 01111000 o: 0o170 x: 0x078
+ d: 01111001 o: 171 x: 079 d: 01111001 o: 0o171 x: 0x079
+ d: 01111010 o: 172 x: 07a d: 01111010 o: 0o172 x: 0x07a
+ d: 01111011 o: 173 x: 07b d: 01111011 o: 0o173 x: 0x07b
+ d: 01111100 o: 174 x: 07c d: 01111100 o: 0o174 x: 0x07c
+ d: 01111101 o: 175 x: 07d d: 01111101 o: 0o175 x: 0x07d
+ d: 01111110 o: 176 x: 07e d: 01111110 o: 0o176 x: 0x07e
+ d: 01111111 o: 177 x: 07f d: 01111111 o: 0o177 x: 0x07f
+ d: 10000000 o: 200 x: 080 d: 10000000 o: 0o200 x: 0x080
+ d: 10000001 o: 201 x: 081 d: 10000001 o: 0o201 x: 0x081
+ d: 10000010 o: 202 x: 082 d: 10000010 o: 0o202 x: 0x082
+ d: 10000011 o: 203 x: 083 d: 10000011 o: 0o203 x: 0x083
+ d: 10000100 o: 204 x: 084 d: 10000100 o: 0o204 x: 0x084
+ d: 10000101 o: 205 x: 085 d: 10000101 o: 0o205 x: 0x085
+ d: 10000110 o: 206 x: 086 d: 10000110 o: 0o206 x: 0x086
+ d: 10000111 o: 207 x: 087 d: 10000111 o: 0o207 x: 0x087
+ d: 10001000 o: 210 x: 088 d: 10001000 o: 0o210 x: 0x088
+ d: 10001001 o: 211 x: 089 d: 10001001 o: 0o211 x: 0x089
+ d: 10001010 o: 212 x: 08a d: 10001010 o: 0o212 x: 0x08a
+ d: 10001011 o: 213 x: 08b d: 10001011 o: 0o213 x: 0x08b
+ d: 10001100 o: 214 x: 08c d: 10001100 o: 0o214 x: 0x08c
+ d: 10001101 o: 215 x: 08d d: 10001101 o: 0o215 x: 0x08d
+ d: 10001110 o: 216 x: 08e d: 10001110 o: 0o216 x: 0x08e
+ d: 10001111 o: 217 x: 08f d: 10001111 o: 0o217 x: 0x08f
+ d: 10010000 o: 220 x: 090 d: 10010000 o: 0o220 x: 0x090
+ d: 10010001 o: 221 x: 091 d: 10010001 o: 0o221 x: 0x091
+ d: 10010010 o: 222 x: 092 d: 10010010 o: 0o222 x: 0x092
+ d: 10010011 o: 223 x: 093 d: 10010011 o: 0o223 x: 0x093
+ d: 10010100 o: 224 x: 094 d: 10010100 o: 0o224 x: 0x094
+ d: 10010101 o: 225 x: 095 d: 10010101 o: 0o225 x: 0x095
+ d: 10010110 o: 226 x: 096 d: 10010110 o: 0o226 x: 0x096
+ d: 10010111 o: 227 x: 097 d: 10010111 o: 0o227 x: 0x097
+ d: 10011000 o: 230 x: 098 d: 10011000 o: 0o230 x: 0x098
+ d: 10011001 o: 231 x: 099 d: 10011001 o: 0o231 x: 0x099
+ d: 10011010 o: 232 x: 09a d: 10011010 o: 0o232 x: 0x09a
+ d: 10011011 o: 233 x: 09b d: 10011011 o: 0o233 x: 0x09b
+ d: 10011100 o: 234 x: 09c d: 10011100 o: 0o234 x: 0x09c
+ d: 10011101 o: 235 x: 09d d: 10011101 o: 0o235 x: 0x09d
+ d: 10011110 o: 236 x: 09e d: 10011110 o: 0o236 x: 0x09e
+ d: 10011111 o: 237 x: 09f d: 10011111 o: 0o237 x: 0x09f
+ d: 10100000 o: 240 x: 0a0 d: 10100000 o: 0o240 x: 0x0a0
+ d: 10100001 o: 241 x: 0a1 d: 10100001 o: 0o241 x: 0x0a1
+ d: 10100010 o: 242 x: 0a2 d: 10100010 o: 0o242 x: 0x0a2
+ d: 10100011 o: 243 x: 0a3 d: 10100011 o: 0o243 x: 0x0a3
+ d: 10100100 o: 244 x: 0a4 d: 10100100 o: 0o244 x: 0x0a4
+ d: 10100101 o: 245 x: 0a5 d: 10100101 o: 0o245 x: 0x0a5
+ d: 10100110 o: 246 x: 0a6 d: 10100110 o: 0o246 x: 0x0a6
+ d: 10100111 o: 247 x: 0a7 d: 10100111 o: 0o247 x: 0x0a7
+ d: 10101000 o: 250 x: 0a8 d: 10101000 o: 0o250 x: 0x0a8
+ d: 10101001 o: 251 x: 0a9 d: 10101001 o: 0o251 x: 0x0a9
+ d: 10101010 o: 252 x: 0aa d: 10101010 o: 0o252 x: 0x0aa
+ d: 10101011 o: 253 x: 0ab d: 10101011 o: 0o253 x: 0x0ab
+ d: 10101100 o: 254 x: 0ac d: 10101100 o: 0o254 x: 0x0ac
+ d: 10101101 o: 255 x: 0ad d: 10101101 o: 0o255 x: 0x0ad
+ d: 10101110 o: 256 x: 0ae d: 10101110 o: 0o256 x: 0x0ae
+ d: 10101111 o: 257 x: 0af d: 10101111 o: 0o257 x: 0x0af
+ d: 10110000 o: 260 x: 0b0 d: 10110000 o: 0o260 x: 0x0b0
+ d: 10110001 o: 261 x: 0b1 d: 10110001 o: 0o261 x: 0x0b1
+ d: 10110010 o: 262 x: 0b2 d: 10110010 o: 0o262 x: 0x0b2
+ d: 10110011 o: 263 x: 0b3 d: 10110011 o: 0o263 x: 0x0b3
+ d: 10110100 o: 264 x: 0b4 d: 10110100 o: 0o264 x: 0x0b4
+ d: 10110101 o: 265 x: 0b5 d: 10110101 o: 0o265 x: 0x0b5
+ d: 10110110 o: 266 x: 0b6 d: 10110110 o: 0o266 x: 0x0b6
+ d: 10110111 o: 267 x: 0b7 d: 10110111 o: 0o267 x: 0x0b7
+ d: 10111000 o: 270 x: 0b8 d: 10111000 o: 0o270 x: 0x0b8
+ d: 10111001 o: 271 x: 0b9 d: 10111001 o: 0o271 x: 0x0b9
+ d: 10111010 o: 272 x: 0ba d: 10111010 o: 0o272 x: 0x0ba
+ d: 10111011 o: 273 x: 0bb d: 10111011 o: 0o273 x: 0x0bb
+ d: 10111100 o: 274 x: 0bc d: 10111100 o: 0o274 x: 0x0bc
+ d: 10111101 o: 275 x: 0bd d: 10111101 o: 0o275 x: 0x0bd
+ d: 10111110 o: 276 x: 0be d: 10111110 o: 0o276 x: 0x0be
+ d: 10111111 o: 277 x: 0bf d: 10111111 o: 0o277 x: 0x0bf
+ d: 11000000 o: 300 x: 0c0 d: 11000000 o: 0o300 x: 0x0c0
+ d: 11000001 o: 301 x: 0c1 d: 11000001 o: 0o301 x: 0x0c1
+ d: 11000010 o: 302 x: 0c2 d: 11000010 o: 0o302 x: 0x0c2
+ d: 11000011 o: 303 x: 0c3 d: 11000011 o: 0o303 x: 0x0c3
+ d: 11000100 o: 304 x: 0c4 d: 11000100 o: 0o304 x: 0x0c4
+ d: 11000101 o: 305 x: 0c5 d: 11000101 o: 0o305 x: 0x0c5
+ d: 11000110 o: 306 x: 0c6 d: 11000110 o: 0o306 x: 0x0c6
+ d: 11000111 o: 307 x: 0c7 d: 11000111 o: 0o307 x: 0x0c7
+ d: 11001000 o: 310 x: 0c8 d: 11001000 o: 0o310 x: 0x0c8
+ d: 11001001 o: 311 x: 0c9 d: 11001001 o: 0o311 x: 0x0c9
+ d: 11001010 o: 312 x: 0ca d: 11001010 o: 0o312 x: 0x0ca
+ d: 11001011 o: 313 x: 0cb d: 11001011 o: 0o313 x: 0x0cb
+ d: 11001100 o: 314 x: 0cc d: 11001100 o: 0o314 x: 0x0cc
+ d: 11001101 o: 315 x: 0cd d: 11001101 o: 0o315 x: 0x0cd
+ d: 11001110 o: 316 x: 0ce d: 11001110 o: 0o316 x: 0x0ce
+ d: 11001111 o: 317 x: 0cf d: 11001111 o: 0o317 x: 0x0cf
+ d: 11010000 o: 320 x: 0d0 d: 11010000 o: 0o320 x: 0x0d0
+ d: 11010001 o: 321 x: 0d1 d: 11010001 o: 0o321 x: 0x0d1
+ d: 11010010 o: 322 x: 0d2 d: 11010010 o: 0o322 x: 0x0d2
+ d: 11010011 o: 323 x: 0d3 d: 11010011 o: 0o323 x: 0x0d3
+ d: 11010100 o: 324 x: 0d4 d: 11010100 o: 0o324 x: 0x0d4
+ d: 11010101 o: 325 x: 0d5 d: 11010101 o: 0o325 x: 0x0d5
+ d: 11010110 o: 326 x: 0d6 d: 11010110 o: 0o326 x: 0x0d6
+ d: 11010111 o: 327 x: 0d7 d: 11010111 o: 0o327 x: 0x0d7
+ d: 11011000 o: 330 x: 0d8 d: 11011000 o: 0o330 x: 0x0d8
+ d: 11011001 o: 331 x: 0d9 d: 11011001 o: 0o331 x: 0x0d9
+ d: 11011010 o: 332 x: 0da d: 11011010 o: 0o332 x: 0x0da
+ d: 11011011 o: 333 x: 0db d: 11011011 o: 0o333 x: 0x0db
+ d: 11011100 o: 334 x: 0dc d: 11011100 o: 0o334 x: 0x0dc
+ d: 11011101 o: 335 x: 0dd d: 11011101 o: 0o335 x: 0x0dd
+ d: 11011110 o: 336 x: 0de d: 11011110 o: 0o336 x: 0x0de
+ d: 11011111 o: 337 x: 0df d: 11011111 o: 0o337 x: 0x0df
+ d: 11100000 o: 340 x: 0e0 d: 11100000 o: 0o340 x: 0x0e0
+ d: 11100001 o: 341 x: 0e1 d: 11100001 o: 0o341 x: 0x0e1
+ d: 11100010 o: 342 x: 0e2 d: 11100010 o: 0o342 x: 0x0e2
+ d: 11100011 o: 343 x: 0e3 d: 11100011 o: 0o343 x: 0x0e3
+ d: 11100100 o: 344 x: 0e4 d: 11100100 o: 0o344 x: 0x0e4
+ d: 11100101 o: 345 x: 0e5 d: 11100101 o: 0o345 x: 0x0e5
+ d: 11100110 o: 346 x: 0e6 d: 11100110 o: 0o346 x: 0x0e6
+ d: 11100111 o: 347 x: 0e7 d: 11100111 o: 0o347 x: 0x0e7
+ d: 11101000 o: 350 x: 0e8 d: 11101000 o: 0o350 x: 0x0e8
+ d: 11101001 o: 351 x: 0e9 d: 11101001 o: 0o351 x: 0x0e9
+ d: 11101010 o: 352 x: 0ea d: 11101010 o: 0o352 x: 0x0ea
+ d: 11101011 o: 353 x: 0eb d: 11101011 o: 0o353 x: 0x0eb
+ d: 11101100 o: 354 x: 0ec d: 11101100 o: 0o354 x: 0x0ec
+ d: 11101101 o: 355 x: 0ed d: 11101101 o: 0o355 x: 0x0ed
+ d: 11101110 o: 356 x: 0ee d: 11101110 o: 0o356 x: 0x0ee
+ d: 11101111 o: 357 x: 0ef d: 11101111 o: 0o357 x: 0x0ef
+ d: 11110000 o: 360 x: 0f0 d: 11110000 o: 0o360 x: 0x0f0
+ d: 11110001 o: 361 x: 0f1 d: 11110001 o: 0o361 x: 0x0f1
+ d: 11110010 o: 362 x: 0f2 d: 11110010 o: 0o362 x: 0x0f2
+ d: 11110011 o: 363 x: 0f3 d: 11110011 o: 0o363 x: 0x0f3
+ d: 11110100 o: 364 x: 0f4 d: 11110100 o: 0o364 x: 0x0f4
+ d: 11110101 o: 365 x: 0f5 d: 11110101 o: 0o365 x: 0x0f5
+ d: 11110110 o: 366 x: 0f6 d: 11110110 o: 0o366 x: 0x0f6
+ d: 11110111 o: 367 x: 0f7 d: 11110111 o: 0o367 x: 0x0f7
+ d: 11111000 o: 370 x: 0f8 d: 11111000 o: 0o370 x: 0x0f8
+ d: 11111001 o: 371 x: 0f9 d: 11111001 o: 0o371 x: 0x0f9
+ d: 11111010 o: 372 x: 0fa d: 11111010 o: 0o372 x: 0x0fa
+ d: 11111011 o: 373 x: 0fb d: 11111011 o: 0o373 x: 0x0fb
+ d: 11111100 o: 374 x: 0fc d: 11111100 o: 0o374 x: 0x0fc
+ d: 11111101 o: 375 x: 0fd d: 11111101 o: 0o375 x: 0x0fd
+ d: 11111110 o: 376 x: 0fe d: 11111110 o: 0o376 x: 0x0fe
+ d: 11111111 o: 377 x: 0ff d: 11111111 o: 0o377 x: 0x0ff
+
+sc_bv<8>
+ d: 00000000 o: 000 x: 000 d: 00000000 o: 0o000 x: 0x000
+ d: 00000001 o: 001 x: 001 d: 00000001 o: 0o001 x: 0x001
+ d: 00000010 o: 002 x: 002 d: 00000010 o: 0o002 x: 0x002
+ d: 00000011 o: 003 x: 003 d: 00000011 o: 0o003 x: 0x003
+ d: 00000100 o: 004 x: 004 d: 00000100 o: 0o004 x: 0x004
+ d: 00000101 o: 005 x: 005 d: 00000101 o: 0o005 x: 0x005
+ d: 00000110 o: 006 x: 006 d: 00000110 o: 0o006 x: 0x006
+ d: 00000111 o: 007 x: 007 d: 00000111 o: 0o007 x: 0x007
+ d: 00001000 o: 010 x: 008 d: 00001000 o: 0o010 x: 0x008
+ d: 00001001 o: 011 x: 009 d: 00001001 o: 0o011 x: 0x009
+ d: 00001010 o: 012 x: 00a d: 00001010 o: 0o012 x: 0x00a
+ d: 00001011 o: 013 x: 00b d: 00001011 o: 0o013 x: 0x00b
+ d: 00001100 o: 014 x: 00c d: 00001100 o: 0o014 x: 0x00c
+ d: 00001101 o: 015 x: 00d d: 00001101 o: 0o015 x: 0x00d
+ d: 00001110 o: 016 x: 00e d: 00001110 o: 0o016 x: 0x00e
+ d: 00001111 o: 017 x: 00f d: 00001111 o: 0o017 x: 0x00f
+ d: 00010000 o: 020 x: 010 d: 00010000 o: 0o020 x: 0x010
+ d: 00010001 o: 021 x: 011 d: 00010001 o: 0o021 x: 0x011
+ d: 00010010 o: 022 x: 012 d: 00010010 o: 0o022 x: 0x012
+ d: 00010011 o: 023 x: 013 d: 00010011 o: 0o023 x: 0x013
+ d: 00010100 o: 024 x: 014 d: 00010100 o: 0o024 x: 0x014
+ d: 00010101 o: 025 x: 015 d: 00010101 o: 0o025 x: 0x015
+ d: 00010110 o: 026 x: 016 d: 00010110 o: 0o026 x: 0x016
+ d: 00010111 o: 027 x: 017 d: 00010111 o: 0o027 x: 0x017
+ d: 00011000 o: 030 x: 018 d: 00011000 o: 0o030 x: 0x018
+ d: 00011001 o: 031 x: 019 d: 00011001 o: 0o031 x: 0x019
+ d: 00011010 o: 032 x: 01a d: 00011010 o: 0o032 x: 0x01a
+ d: 00011011 o: 033 x: 01b d: 00011011 o: 0o033 x: 0x01b
+ d: 00011100 o: 034 x: 01c d: 00011100 o: 0o034 x: 0x01c
+ d: 00011101 o: 035 x: 01d d: 00011101 o: 0o035 x: 0x01d
+ d: 00011110 o: 036 x: 01e d: 00011110 o: 0o036 x: 0x01e
+ d: 00011111 o: 037 x: 01f d: 00011111 o: 0o037 x: 0x01f
+ d: 00100000 o: 040 x: 020 d: 00100000 o: 0o040 x: 0x020
+ d: 00100001 o: 041 x: 021 d: 00100001 o: 0o041 x: 0x021
+ d: 00100010 o: 042 x: 022 d: 00100010 o: 0o042 x: 0x022
+ d: 00100011 o: 043 x: 023 d: 00100011 o: 0o043 x: 0x023
+ d: 00100100 o: 044 x: 024 d: 00100100 o: 0o044 x: 0x024
+ d: 00100101 o: 045 x: 025 d: 00100101 o: 0o045 x: 0x025
+ d: 00100110 o: 046 x: 026 d: 00100110 o: 0o046 x: 0x026
+ d: 00100111 o: 047 x: 027 d: 00100111 o: 0o047 x: 0x027
+ d: 00101000 o: 050 x: 028 d: 00101000 o: 0o050 x: 0x028
+ d: 00101001 o: 051 x: 029 d: 00101001 o: 0o051 x: 0x029
+ d: 00101010 o: 052 x: 02a d: 00101010 o: 0o052 x: 0x02a
+ d: 00101011 o: 053 x: 02b d: 00101011 o: 0o053 x: 0x02b
+ d: 00101100 o: 054 x: 02c d: 00101100 o: 0o054 x: 0x02c
+ d: 00101101 o: 055 x: 02d d: 00101101 o: 0o055 x: 0x02d
+ d: 00101110 o: 056 x: 02e d: 00101110 o: 0o056 x: 0x02e
+ d: 00101111 o: 057 x: 02f d: 00101111 o: 0o057 x: 0x02f
+ d: 00110000 o: 060 x: 030 d: 00110000 o: 0o060 x: 0x030
+ d: 00110001 o: 061 x: 031 d: 00110001 o: 0o061 x: 0x031
+ d: 00110010 o: 062 x: 032 d: 00110010 o: 0o062 x: 0x032
+ d: 00110011 o: 063 x: 033 d: 00110011 o: 0o063 x: 0x033
+ d: 00110100 o: 064 x: 034 d: 00110100 o: 0o064 x: 0x034
+ d: 00110101 o: 065 x: 035 d: 00110101 o: 0o065 x: 0x035
+ d: 00110110 o: 066 x: 036 d: 00110110 o: 0o066 x: 0x036
+ d: 00110111 o: 067 x: 037 d: 00110111 o: 0o067 x: 0x037
+ d: 00111000 o: 070 x: 038 d: 00111000 o: 0o070 x: 0x038
+ d: 00111001 o: 071 x: 039 d: 00111001 o: 0o071 x: 0x039
+ d: 00111010 o: 072 x: 03a d: 00111010 o: 0o072 x: 0x03a
+ d: 00111011 o: 073 x: 03b d: 00111011 o: 0o073 x: 0x03b
+ d: 00111100 o: 074 x: 03c d: 00111100 o: 0o074 x: 0x03c
+ d: 00111101 o: 075 x: 03d d: 00111101 o: 0o075 x: 0x03d
+ d: 00111110 o: 076 x: 03e d: 00111110 o: 0o076 x: 0x03e
+ d: 00111111 o: 077 x: 03f d: 00111111 o: 0o077 x: 0x03f
+ d: 01000000 o: 100 x: 040 d: 01000000 o: 0o100 x: 0x040
+ d: 01000001 o: 101 x: 041 d: 01000001 o: 0o101 x: 0x041
+ d: 01000010 o: 102 x: 042 d: 01000010 o: 0o102 x: 0x042
+ d: 01000011 o: 103 x: 043 d: 01000011 o: 0o103 x: 0x043
+ d: 01000100 o: 104 x: 044 d: 01000100 o: 0o104 x: 0x044
+ d: 01000101 o: 105 x: 045 d: 01000101 o: 0o105 x: 0x045
+ d: 01000110 o: 106 x: 046 d: 01000110 o: 0o106 x: 0x046
+ d: 01000111 o: 107 x: 047 d: 01000111 o: 0o107 x: 0x047
+ d: 01001000 o: 110 x: 048 d: 01001000 o: 0o110 x: 0x048
+ d: 01001001 o: 111 x: 049 d: 01001001 o: 0o111 x: 0x049
+ d: 01001010 o: 112 x: 04a d: 01001010 o: 0o112 x: 0x04a
+ d: 01001011 o: 113 x: 04b d: 01001011 o: 0o113 x: 0x04b
+ d: 01001100 o: 114 x: 04c d: 01001100 o: 0o114 x: 0x04c
+ d: 01001101 o: 115 x: 04d d: 01001101 o: 0o115 x: 0x04d
+ d: 01001110 o: 116 x: 04e d: 01001110 o: 0o116 x: 0x04e
+ d: 01001111 o: 117 x: 04f d: 01001111 o: 0o117 x: 0x04f
+ d: 01010000 o: 120 x: 050 d: 01010000 o: 0o120 x: 0x050
+ d: 01010001 o: 121 x: 051 d: 01010001 o: 0o121 x: 0x051
+ d: 01010010 o: 122 x: 052 d: 01010010 o: 0o122 x: 0x052
+ d: 01010011 o: 123 x: 053 d: 01010011 o: 0o123 x: 0x053
+ d: 01010100 o: 124 x: 054 d: 01010100 o: 0o124 x: 0x054
+ d: 01010101 o: 125 x: 055 d: 01010101 o: 0o125 x: 0x055
+ d: 01010110 o: 126 x: 056 d: 01010110 o: 0o126 x: 0x056
+ d: 01010111 o: 127 x: 057 d: 01010111 o: 0o127 x: 0x057
+ d: 01011000 o: 130 x: 058 d: 01011000 o: 0o130 x: 0x058
+ d: 01011001 o: 131 x: 059 d: 01011001 o: 0o131 x: 0x059
+ d: 01011010 o: 132 x: 05a d: 01011010 o: 0o132 x: 0x05a
+ d: 01011011 o: 133 x: 05b d: 01011011 o: 0o133 x: 0x05b
+ d: 01011100 o: 134 x: 05c d: 01011100 o: 0o134 x: 0x05c
+ d: 01011101 o: 135 x: 05d d: 01011101 o: 0o135 x: 0x05d
+ d: 01011110 o: 136 x: 05e d: 01011110 o: 0o136 x: 0x05e
+ d: 01011111 o: 137 x: 05f d: 01011111 o: 0o137 x: 0x05f
+ d: 01100000 o: 140 x: 060 d: 01100000 o: 0o140 x: 0x060
+ d: 01100001 o: 141 x: 061 d: 01100001 o: 0o141 x: 0x061
+ d: 01100010 o: 142 x: 062 d: 01100010 o: 0o142 x: 0x062
+ d: 01100011 o: 143 x: 063 d: 01100011 o: 0o143 x: 0x063
+ d: 01100100 o: 144 x: 064 d: 01100100 o: 0o144 x: 0x064
+ d: 01100101 o: 145 x: 065 d: 01100101 o: 0o145 x: 0x065
+ d: 01100110 o: 146 x: 066 d: 01100110 o: 0o146 x: 0x066
+ d: 01100111 o: 147 x: 067 d: 01100111 o: 0o147 x: 0x067
+ d: 01101000 o: 150 x: 068 d: 01101000 o: 0o150 x: 0x068
+ d: 01101001 o: 151 x: 069 d: 01101001 o: 0o151 x: 0x069
+ d: 01101010 o: 152 x: 06a d: 01101010 o: 0o152 x: 0x06a
+ d: 01101011 o: 153 x: 06b d: 01101011 o: 0o153 x: 0x06b
+ d: 01101100 o: 154 x: 06c d: 01101100 o: 0o154 x: 0x06c
+ d: 01101101 o: 155 x: 06d d: 01101101 o: 0o155 x: 0x06d
+ d: 01101110 o: 156 x: 06e d: 01101110 o: 0o156 x: 0x06e
+ d: 01101111 o: 157 x: 06f d: 01101111 o: 0o157 x: 0x06f
+ d: 01110000 o: 160 x: 070 d: 01110000 o: 0o160 x: 0x070
+ d: 01110001 o: 161 x: 071 d: 01110001 o: 0o161 x: 0x071
+ d: 01110010 o: 162 x: 072 d: 01110010 o: 0o162 x: 0x072
+ d: 01110011 o: 163 x: 073 d: 01110011 o: 0o163 x: 0x073
+ d: 01110100 o: 164 x: 074 d: 01110100 o: 0o164 x: 0x074
+ d: 01110101 o: 165 x: 075 d: 01110101 o: 0o165 x: 0x075
+ d: 01110110 o: 166 x: 076 d: 01110110 o: 0o166 x: 0x076
+ d: 01110111 o: 167 x: 077 d: 01110111 o: 0o167 x: 0x077
+ d: 01111000 o: 170 x: 078 d: 01111000 o: 0o170 x: 0x078
+ d: 01111001 o: 171 x: 079 d: 01111001 o: 0o171 x: 0x079
+ d: 01111010 o: 172 x: 07a d: 01111010 o: 0o172 x: 0x07a
+ d: 01111011 o: 173 x: 07b d: 01111011 o: 0o173 x: 0x07b
+ d: 01111100 o: 174 x: 07c d: 01111100 o: 0o174 x: 0x07c
+ d: 01111101 o: 175 x: 07d d: 01111101 o: 0o175 x: 0x07d
+ d: 01111110 o: 176 x: 07e d: 01111110 o: 0o176 x: 0x07e
+ d: 01111111 o: 177 x: 07f d: 01111111 o: 0o177 x: 0x07f
+ d: 10000000 o: 200 x: 080 d: 10000000 o: 0o200 x: 0x080
+ d: 10000001 o: 201 x: 081 d: 10000001 o: 0o201 x: 0x081
+ d: 10000010 o: 202 x: 082 d: 10000010 o: 0o202 x: 0x082
+ d: 10000011 o: 203 x: 083 d: 10000011 o: 0o203 x: 0x083
+ d: 10000100 o: 204 x: 084 d: 10000100 o: 0o204 x: 0x084
+ d: 10000101 o: 205 x: 085 d: 10000101 o: 0o205 x: 0x085
+ d: 10000110 o: 206 x: 086 d: 10000110 o: 0o206 x: 0x086
+ d: 10000111 o: 207 x: 087 d: 10000111 o: 0o207 x: 0x087
+ d: 10001000 o: 210 x: 088 d: 10001000 o: 0o210 x: 0x088
+ d: 10001001 o: 211 x: 089 d: 10001001 o: 0o211 x: 0x089
+ d: 10001010 o: 212 x: 08a d: 10001010 o: 0o212 x: 0x08a
+ d: 10001011 o: 213 x: 08b d: 10001011 o: 0o213 x: 0x08b
+ d: 10001100 o: 214 x: 08c d: 10001100 o: 0o214 x: 0x08c
+ d: 10001101 o: 215 x: 08d d: 10001101 o: 0o215 x: 0x08d
+ d: 10001110 o: 216 x: 08e d: 10001110 o: 0o216 x: 0x08e
+ d: 10001111 o: 217 x: 08f d: 10001111 o: 0o217 x: 0x08f
+ d: 10010000 o: 220 x: 090 d: 10010000 o: 0o220 x: 0x090
+ d: 10010001 o: 221 x: 091 d: 10010001 o: 0o221 x: 0x091
+ d: 10010010 o: 222 x: 092 d: 10010010 o: 0o222 x: 0x092
+ d: 10010011 o: 223 x: 093 d: 10010011 o: 0o223 x: 0x093
+ d: 10010100 o: 224 x: 094 d: 10010100 o: 0o224 x: 0x094
+ d: 10010101 o: 225 x: 095 d: 10010101 o: 0o225 x: 0x095
+ d: 10010110 o: 226 x: 096 d: 10010110 o: 0o226 x: 0x096
+ d: 10010111 o: 227 x: 097 d: 10010111 o: 0o227 x: 0x097
+ d: 10011000 o: 230 x: 098 d: 10011000 o: 0o230 x: 0x098
+ d: 10011001 o: 231 x: 099 d: 10011001 o: 0o231 x: 0x099
+ d: 10011010 o: 232 x: 09a d: 10011010 o: 0o232 x: 0x09a
+ d: 10011011 o: 233 x: 09b d: 10011011 o: 0o233 x: 0x09b
+ d: 10011100 o: 234 x: 09c d: 10011100 o: 0o234 x: 0x09c
+ d: 10011101 o: 235 x: 09d d: 10011101 o: 0o235 x: 0x09d
+ d: 10011110 o: 236 x: 09e d: 10011110 o: 0o236 x: 0x09e
+ d: 10011111 o: 237 x: 09f d: 10011111 o: 0o237 x: 0x09f
+ d: 10100000 o: 240 x: 0a0 d: 10100000 o: 0o240 x: 0x0a0
+ d: 10100001 o: 241 x: 0a1 d: 10100001 o: 0o241 x: 0x0a1
+ d: 10100010 o: 242 x: 0a2 d: 10100010 o: 0o242 x: 0x0a2
+ d: 10100011 o: 243 x: 0a3 d: 10100011 o: 0o243 x: 0x0a3
+ d: 10100100 o: 244 x: 0a4 d: 10100100 o: 0o244 x: 0x0a4
+ d: 10100101 o: 245 x: 0a5 d: 10100101 o: 0o245 x: 0x0a5
+ d: 10100110 o: 246 x: 0a6 d: 10100110 o: 0o246 x: 0x0a6
+ d: 10100111 o: 247 x: 0a7 d: 10100111 o: 0o247 x: 0x0a7
+ d: 10101000 o: 250 x: 0a8 d: 10101000 o: 0o250 x: 0x0a8
+ d: 10101001 o: 251 x: 0a9 d: 10101001 o: 0o251 x: 0x0a9
+ d: 10101010 o: 252 x: 0aa d: 10101010 o: 0o252 x: 0x0aa
+ d: 10101011 o: 253 x: 0ab d: 10101011 o: 0o253 x: 0x0ab
+ d: 10101100 o: 254 x: 0ac d: 10101100 o: 0o254 x: 0x0ac
+ d: 10101101 o: 255 x: 0ad d: 10101101 o: 0o255 x: 0x0ad
+ d: 10101110 o: 256 x: 0ae d: 10101110 o: 0o256 x: 0x0ae
+ d: 10101111 o: 257 x: 0af d: 10101111 o: 0o257 x: 0x0af
+ d: 10110000 o: 260 x: 0b0 d: 10110000 o: 0o260 x: 0x0b0
+ d: 10110001 o: 261 x: 0b1 d: 10110001 o: 0o261 x: 0x0b1
+ d: 10110010 o: 262 x: 0b2 d: 10110010 o: 0o262 x: 0x0b2
+ d: 10110011 o: 263 x: 0b3 d: 10110011 o: 0o263 x: 0x0b3
+ d: 10110100 o: 264 x: 0b4 d: 10110100 o: 0o264 x: 0x0b4
+ d: 10110101 o: 265 x: 0b5 d: 10110101 o: 0o265 x: 0x0b5
+ d: 10110110 o: 266 x: 0b6 d: 10110110 o: 0o266 x: 0x0b6
+ d: 10110111 o: 267 x: 0b7 d: 10110111 o: 0o267 x: 0x0b7
+ d: 10111000 o: 270 x: 0b8 d: 10111000 o: 0o270 x: 0x0b8
+ d: 10111001 o: 271 x: 0b9 d: 10111001 o: 0o271 x: 0x0b9
+ d: 10111010 o: 272 x: 0ba d: 10111010 o: 0o272 x: 0x0ba
+ d: 10111011 o: 273 x: 0bb d: 10111011 o: 0o273 x: 0x0bb
+ d: 10111100 o: 274 x: 0bc d: 10111100 o: 0o274 x: 0x0bc
+ d: 10111101 o: 275 x: 0bd d: 10111101 o: 0o275 x: 0x0bd
+ d: 10111110 o: 276 x: 0be d: 10111110 o: 0o276 x: 0x0be
+ d: 10111111 o: 277 x: 0bf d: 10111111 o: 0o277 x: 0x0bf
+ d: 11000000 o: 300 x: 0c0 d: 11000000 o: 0o300 x: 0x0c0
+ d: 11000001 o: 301 x: 0c1 d: 11000001 o: 0o301 x: 0x0c1
+ d: 11000010 o: 302 x: 0c2 d: 11000010 o: 0o302 x: 0x0c2
+ d: 11000011 o: 303 x: 0c3 d: 11000011 o: 0o303 x: 0x0c3
+ d: 11000100 o: 304 x: 0c4 d: 11000100 o: 0o304 x: 0x0c4
+ d: 11000101 o: 305 x: 0c5 d: 11000101 o: 0o305 x: 0x0c5
+ d: 11000110 o: 306 x: 0c6 d: 11000110 o: 0o306 x: 0x0c6
+ d: 11000111 o: 307 x: 0c7 d: 11000111 o: 0o307 x: 0x0c7
+ d: 11001000 o: 310 x: 0c8 d: 11001000 o: 0o310 x: 0x0c8
+ d: 11001001 o: 311 x: 0c9 d: 11001001 o: 0o311 x: 0x0c9
+ d: 11001010 o: 312 x: 0ca d: 11001010 o: 0o312 x: 0x0ca
+ d: 11001011 o: 313 x: 0cb d: 11001011 o: 0o313 x: 0x0cb
+ d: 11001100 o: 314 x: 0cc d: 11001100 o: 0o314 x: 0x0cc
+ d: 11001101 o: 315 x: 0cd d: 11001101 o: 0o315 x: 0x0cd
+ d: 11001110 o: 316 x: 0ce d: 11001110 o: 0o316 x: 0x0ce
+ d: 11001111 o: 317 x: 0cf d: 11001111 o: 0o317 x: 0x0cf
+ d: 11010000 o: 320 x: 0d0 d: 11010000 o: 0o320 x: 0x0d0
+ d: 11010001 o: 321 x: 0d1 d: 11010001 o: 0o321 x: 0x0d1
+ d: 11010010 o: 322 x: 0d2 d: 11010010 o: 0o322 x: 0x0d2
+ d: 11010011 o: 323 x: 0d3 d: 11010011 o: 0o323 x: 0x0d3
+ d: 11010100 o: 324 x: 0d4 d: 11010100 o: 0o324 x: 0x0d4
+ d: 11010101 o: 325 x: 0d5 d: 11010101 o: 0o325 x: 0x0d5
+ d: 11010110 o: 326 x: 0d6 d: 11010110 o: 0o326 x: 0x0d6
+ d: 11010111 o: 327 x: 0d7 d: 11010111 o: 0o327 x: 0x0d7
+ d: 11011000 o: 330 x: 0d8 d: 11011000 o: 0o330 x: 0x0d8
+ d: 11011001 o: 331 x: 0d9 d: 11011001 o: 0o331 x: 0x0d9
+ d: 11011010 o: 332 x: 0da d: 11011010 o: 0o332 x: 0x0da
+ d: 11011011 o: 333 x: 0db d: 11011011 o: 0o333 x: 0x0db
+ d: 11011100 o: 334 x: 0dc d: 11011100 o: 0o334 x: 0x0dc
+ d: 11011101 o: 335 x: 0dd d: 11011101 o: 0o335 x: 0x0dd
+ d: 11011110 o: 336 x: 0de d: 11011110 o: 0o336 x: 0x0de
+ d: 11011111 o: 337 x: 0df d: 11011111 o: 0o337 x: 0x0df
+ d: 11100000 o: 340 x: 0e0 d: 11100000 o: 0o340 x: 0x0e0
+ d: 11100001 o: 341 x: 0e1 d: 11100001 o: 0o341 x: 0x0e1
+ d: 11100010 o: 342 x: 0e2 d: 11100010 o: 0o342 x: 0x0e2
+ d: 11100011 o: 343 x: 0e3 d: 11100011 o: 0o343 x: 0x0e3
+ d: 11100100 o: 344 x: 0e4 d: 11100100 o: 0o344 x: 0x0e4
+ d: 11100101 o: 345 x: 0e5 d: 11100101 o: 0o345 x: 0x0e5
+ d: 11100110 o: 346 x: 0e6 d: 11100110 o: 0o346 x: 0x0e6
+ d: 11100111 o: 347 x: 0e7 d: 11100111 o: 0o347 x: 0x0e7
+ d: 11101000 o: 350 x: 0e8 d: 11101000 o: 0o350 x: 0x0e8
+ d: 11101001 o: 351 x: 0e9 d: 11101001 o: 0o351 x: 0x0e9
+ d: 11101010 o: 352 x: 0ea d: 11101010 o: 0o352 x: 0x0ea
+ d: 11101011 o: 353 x: 0eb d: 11101011 o: 0o353 x: 0x0eb
+ d: 11101100 o: 354 x: 0ec d: 11101100 o: 0o354 x: 0x0ec
+ d: 11101101 o: 355 x: 0ed d: 11101101 o: 0o355 x: 0x0ed
+ d: 11101110 o: 356 x: 0ee d: 11101110 o: 0o356 x: 0x0ee
+ d: 11101111 o: 357 x: 0ef d: 11101111 o: 0o357 x: 0x0ef
+ d: 11110000 o: 360 x: 0f0 d: 11110000 o: 0o360 x: 0x0f0
+ d: 11110001 o: 361 x: 0f1 d: 11110001 o: 0o361 x: 0x0f1
+ d: 11110010 o: 362 x: 0f2 d: 11110010 o: 0o362 x: 0x0f2
+ d: 11110011 o: 363 x: 0f3 d: 11110011 o: 0o363 x: 0x0f3
+ d: 11110100 o: 364 x: 0f4 d: 11110100 o: 0o364 x: 0x0f4
+ d: 11110101 o: 365 x: 0f5 d: 11110101 o: 0o365 x: 0x0f5
+ d: 11110110 o: 366 x: 0f6 d: 11110110 o: 0o366 x: 0x0f6
+ d: 11110111 o: 367 x: 0f7 d: 11110111 o: 0o367 x: 0x0f7
+ d: 11111000 o: 370 x: 0f8 d: 11111000 o: 0o370 x: 0x0f8
+ d: 11111001 o: 371 x: 0f9 d: 11111001 o: 0o371 x: 0x0f9
+ d: 11111010 o: 372 x: 0fa d: 11111010 o: 0o372 x: 0x0fa
+ d: 11111011 o: 373 x: 0fb d: 11111011 o: 0o373 x: 0x0fb
+ d: 11111100 o: 374 x: 0fc d: 11111100 o: 0o374 x: 0x0fc
+ d: 11111101 o: 375 x: 0fd d: 11111101 o: 0o375 x: 0x0fd
+ d: 11111110 o: 376 x: 0fe d: 11111110 o: 0o376 x: 0x0fe
+ d: 11111111 o: 377 x: 0ff d: 11111111 o: 0o377 x: 0x0ff
+Program completed
diff --git a/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp b/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp
new file mode 100644
index 000000000..a075ba525
--- /dev/null
+++ b/src/systemc/tests/systemc/datatypes/int/string_conversion/test03/test03.cpp
@@ -0,0 +1,43 @@
+#include "systemc.h"
+
+inline void flags_value()
+{
+ ios::fmtflags flags = cout.flags();
+ cout << hex << flags << dec << endl;
+ if ( sc_io_show_base(cout) ) cout << "showbase" << endl;
+}
+
+#define TEST(BASE) \
+{ \
+ BASE x; \
+ cout << endl << #BASE << endl; \
+ for ( i = 0; i < 256; i++ ) \
+ { \
+ x = i; \
+ cout << " "; \
+ cout << std::noshowbase; \
+ cout << dec << " d: " << x; \
+ cout << oct << " o: " << x; \
+ cout << hex << " x: " << x; \
+ cout << std::showbase; \
+ cout << dec << " d: " << x; \
+ cout << oct << " o: " << x; \
+ cout << hex << " x: " << x; \
+ cout << endl; \
+ } \
+}
+int sc_main(int argc, char* argv[])
+{
+ int i;
+ sc_biguint<8> x;
+
+ TEST(sc_bigint<8>)
+ TEST(sc_biguint<8>)
+ TEST(sc_int<8>)
+ TEST(sc_uint<8>)
+ TEST(sc_lv<8>)
+ TEST(sc_bv<8>)
+ cerr << "Program completed" << endl;
+
+ return 0;
+}