65#ifndef __SYSTEMC_EXT_DT_INT_SC_NBDEFS_HH__
66#define __SYSTEMC_EXT_DT_INT_SC_NBDEFS_HH__
111#define BITS_PER_BYTE 8
112#define BYTE_RADIX 256
117#define LOG2_BITS_PER_BYTE 3
122#define BYTES_PER_DIGIT_TYPE 4
123#define BITS_PER_DIGIT_TYPE 32
126#define BYTES_PER_DIGIT 4
127#define BITS_PER_DIGIT 30
128#define DIGIT_RADIX (1ul << BITS_PER_DIGIT)
129#define DIGIT_MASK (DIGIT_RADIX - 1)
135#define BITS_PER_HALF_DIGIT (BITS_PER_DIGIT / 2)
136#define HALF_DIGIT_RADIX (1ul << BITS_PER_HALF_DIGIT)
137#define HALF_DIGIT_MASK (HALF_DIGIT_RADIX - 1)
140#define DIV_CEIL2(x, y) (((x) - 1) / (y) + 1)
144#define DIV_CEIL(x) DIV_CEIL2(x, BITS_PER_DIGIT)
147static const int MAX_NDIGITS =
DIV_CEIL(SC_MAX_NBITS) + 2;
167#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
168typedef long long int64;
169typedef unsigned long long uint64;
182#define BITS_PER_CHAR 8
183#define BITS_PER_INT (sizeof(int) * BITS_PER_CHAR)
184#define BITS_PER_LONG (sizeof(long) * BITS_PER_CHAR)
185#define BITS_PER_INT64 (sizeof(::sc_dt::int64) * BITS_PER_CHAR)
186#define BITS_PER_UINT (sizeof(unsigned int) * BITS_PER_CHAR)
187#define BITS_PER_ULONG (sizeof(unsigned long) * BITS_PER_CHAR)
188#define BITS_PER_UINT64 (sizeof(::sc_dt::uint64) * BITS_PER_CHAR)
191#define DIGITS_PER_CHAR 1
192#define DIGITS_PER_INT ((BITS_PER_INT + 29) / 30)
193#define DIGITS_PER_LONG ((BITS_PER_LONG + 29) / 30)
194#define DIGITS_PER_INT64 ((BITS_PER_INT64 + 29) / 30)
195#define DIGITS_PER_UINT ((BITS_PER_UINT + 29) / 30)
196#define DIGITS_PER_ULONG ((BITS_PER_ULONG + 29) / 30)
197#define DIGITS_PER_UINT64 ((BITS_PER_UINT64 + 29) / 30)
208#define SC_INTWIDTH 64
static const uint64 UINT_ONE
static const small_type NB_DEFAULT_BASE
static const uint64 UINT64_ONE
static const uint64 UINT64_ZERO
static const uint64 UINT_ZERO
static const uint64 UINT64_32ONES