65template <
int W>
class sc_biguint;
68template <
int W>
class sc_bigint;
87#if !defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
107 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
109 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
115 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
117 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
123 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
125 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
128 { *
this = (int)flag; }
131 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
133 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
140 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
142 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
149 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
151 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
157 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
159 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
165 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
167 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
174 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
176 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
179 { a->to_sc_unsigned(*
this); }
182 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
184 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
190 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
192 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
198 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
200 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
206 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
208 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
214 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
216 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
222 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
224 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
230 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
232 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
238 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
240 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
246 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
248 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
254 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
256 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
262 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
264 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
270 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
272 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
280 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
282 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
288 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
290 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
296 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
298 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
304 #if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
306 #elif defined(SC_BIGINT_CONFIG_BASE_CLASS_HAS_STORAGE)
342 { a->to_sc_unsigned(*
this);
return *
this; }
383 const sc_biguint<W>&
operator = (
const sc_fxval_fast& v )
386 const sc_biguint<W>&
operator = (
const sc_fxnum& v )
389 const sc_biguint<W>&
operator = (
const sc_fxnum_fast& v )
418 result = (int)
digit[0];
428 result = (
unsigned int)
digit[0];
429 if ( W < 32 ) { result &= ~((~0u)<<W); }
459 if ( W < 64 ) { result &= ~(~UINT64_ZERO << W); }
477 unsigned long result = (
sizeof(
unsigned long) < 5 ) ?
to_uint() :
to_uint64();
643#if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_STORAGE)
648#elif defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
658#if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
704#if defined(SC_BIGINT_CONFIG_TEMPLATE_CLASS_HAS_NO_BASE_CLASS)
#define SC_DIGIT_INDEX(BIT_INDEX)
#define SC_BIT_INDEX(BIT)
#define SC_DIGIT_COUNT(BIT_WIDTH)
#define SC_BASE_VEC_DIGITS
unsigned long long uint64
sc_biguint(const sc_generic_base< T > &a)
sc_unsigned_bitref & bit(int i)
sc_biguint(const sc_bigint< WO > &v)
const sc_biguint< W > & operator-=(const sc_signed &v)
const sc_unsigned operator<<(const sc_unsigned &v) const
const sc_unsigned_subref_r & range(int i, int j) const
int get_actual_length() const
const sc_unsigned operator>>(int v) const
const std::string to_string(sc_numrep numrep=SC_DEC) const
sc_biguint(const char *v)
const sc_unsigned_bitref_r & bit(int i) const
sc_unsigned_subref & operator()(int i, int j)
sc_biguint(const sc_signed &v)
unsigned long to_ulong() const
const sc_biguint< W > & operator%=(const sc_signed &v)
const sc_biguint< W > & operator|=(const sc_signed &v)
const sc_biguint< W > & operator>>=(int v)
unsigned int to_uint() const
sc_digit * get_raw() const
sc_unsigned_bitref & operator[](int i)
sc_biguint(const sc_unsigned_subref &v)
sc_biguint(unsigned long v)
const sc_biguint< W > & operator&=(const sc_signed &v)
const sc_digit * get_digits() const
sc_biguint(unsigned int v)
const sc_biguint< W > & operator=(const sc_biguint< W > &v)
sc_biguint< W > & operator++()
const sc_biguint< W > & operator/=(const sc_signed &v)
sc_biguint(const sc_biguint< WO > &v)
const sc_biguint< W > & operator<<=(const sc_signed &v)
const sc_biguint< W > & operator<<=(int v)
const sc_bigint< W+1 > operator-()
sc_unsigned_subref & range(int i, int j)
sc_digit compile_time_digits[DIV_CEIL(W+1)>SC_BASE_VEC_DIGITS?DIV_CEIL(W+1):1]
const sc_biguint< W > & operator>>=(const sc_unsigned &v)
sc_biguint(const sc_unsigned &v)
sc_biguint(const sc_lv_base &v)
sc_biguint(const sc_signed_subref &v)
const sc_biguint< W > & operator+=(const sc_signed &v)
const sc_unsigned operator<<(int v) const
const sc_unsigned operator<<(const sc_signed &v) const
const sc_unsigned & sc_unsigned_proxy() const
sc_unsigned & sc_unsigned_proxy()
sc_biguint(const sc_bv_base &v)
const sc_biguint< W > & operator>>=(const sc_signed &v)
const sc_biguint< W > & operator<<=(const sc_unsigned &v)
sc_biguint(const sc_biguint< W > &v)
const sc_biguint< W > & operator*=(const sc_signed &v)
const sc_bigint< W+1 > operator~()
sc_biguint< W > & operator--()
const sc_unsigned operator>>(const sc_signed &v) const
const sc_biguint< W > & operator^=(const sc_signed &v)
const std::string to_string(sc_numrep numrep, bool w_prefix) const
const sc_unsigned operator>>(const sc_unsigned &v) const
virtual int concat_length(bool *xz_present_p) const
const std::string to_string(sc_numrep numrep=SC_DEC) const
sc_unsigned_subref & range(int i, int j)
sc_unsigned_bitref & bit(int i)
sc_unsigned(int nb=sc_length_param().len())