Go to the documentation of this file.
65 #ifndef __SYSTEMC_EXT_DT_INT_SC_NBDEFS_HH__
66 #define __SYSTEMC_EXT_DT_INT_SC_NBDEFS_HH__
99 #define SC_NEG -1 // Negative number
100 #define SC_ZERO 0 // Zero
101 #define SC_POS 1 // Positive number
102 #define SC_NOSIGN 2 // Uninitialized sc_signed number
104 typedef unsigned char uchar;
111 #define BITS_PER_BYTE 8
112 #define BYTE_RADIX 256
113 #define BYTE_MASK 255
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)
147 static const int MAX_NDIGITS =
DIV_CEIL(SC_MAX_NBITS) + 2;
167 #if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
168 typedef long long int64;
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
214 #endif // __SYSTEMC_EXT_DT_INT_SC_NBDEFS_HH__
static const uint64 UINT64_ZERO
static const uint64 UINT_ONE
static const uint64 UINT64_ONE
static const uint64 UINT64_32ONES
static const uint64 UINT_ZERO
#define ULL(N)
uint64_t constant
static const small_type NB_DEFAULT_BASE
Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17