Go to the documentation of this file.
99 #ifndef __SYSTEMC_EXT_DT_INT_SC_UNSIGNED_HH__
100 #define __SYSTEMC_EXT_DT_INT_SC_UNSIGNED_HH__
104 #include "../misc/sc_value_base.hh"
105 #include "../sc_temporary.hh"
115 class sc_unsigned_bitref_r;
116 class sc_unsigned_bitref;
117 class sc_unsigned_subref_r;
118 class sc_unsigned_subref;
127 class sc_int_subref_r;
128 class sc_uint_subref_r;
130 class sc_signed_subref_r;
142 extern template class sc_vpool<sc_dt::sc_unsigned_bitref>;
143 extern template class sc_vpool<sc_dt::sc_unsigned_subref>;
144 extern template class sc_vpool<sc_dt::sc_unsigned>;
166 int vnb,
int vnd,
const sc_digit *vd);
170 int vnb,
int vnd,
const sc_digit *vd);
174 int vnb,
int vnd,
const sc_digit *vd);
197 sc_signed
operator + (
const sc_unsigned &
u,
const sc_signed &
v);
198 sc_signed
operator + (
const sc_signed &
u,
const sc_unsigned &
v);
200 sc_unsigned
operator + (
const sc_unsigned &
u,
const sc_unsigned &
v);
204 sc_unsigned
operator + (
const sc_unsigned &
u,
unsigned long v);
206 inline sc_unsigned
operator + (
const sc_unsigned &
u,
unsigned int v);
211 sc_unsigned
operator + (
unsigned long u,
const sc_unsigned &
v);
213 inline sc_unsigned
operator + (
unsigned int u,
const sc_unsigned &
v);
215 sc_unsigned
operator + (
const sc_unsigned &
u,
const sc_uint_base &
v);
216 sc_signed
operator + (
const sc_unsigned &
u,
const sc_int_base &
v);
217 sc_unsigned
operator + (
const sc_uint_base &
u,
const sc_unsigned &
v);
218 sc_signed
operator + (
const sc_int_base &
u,
const sc_unsigned &
v);
221 sc_signed
operator - (
const sc_unsigned &
u,
const sc_signed &
v);
222 sc_signed
operator - (
const sc_signed &
u,
const sc_unsigned &
v);
224 sc_signed
operator - (
const sc_unsigned &
u,
const sc_unsigned &
v);
228 sc_signed
operator - (
const sc_unsigned &
u,
unsigned long v);
230 sc_signed
operator - (
const sc_unsigned &
u,
unsigned int v);
235 sc_signed
operator - (
unsigned long u,
const sc_unsigned &
v);
237 sc_signed
operator - (
unsigned int u,
const sc_unsigned &
v);
239 sc_signed
operator - (
const sc_unsigned &
u,
const sc_uint_base &
v);
240 sc_signed
operator - (
const sc_unsigned &
u,
const sc_int_base &
v);
241 sc_signed
operator - (
const sc_uint_base &
u,
const sc_unsigned &
v);
242 sc_signed
operator - (
const sc_int_base &
u,
const sc_unsigned &
v);
245 sc_signed
operator * (
const sc_unsigned &
u,
const sc_signed &
v);
246 sc_signed
operator * (
const sc_signed &
u,
const sc_unsigned &
v);
248 sc_unsigned
operator * (
const sc_unsigned &
u,
const sc_unsigned &
v);
252 sc_unsigned
operator * (
const sc_unsigned &
u,
unsigned long v);
254 inline sc_unsigned
operator * (
const sc_unsigned &
u,
unsigned int v);
259 sc_unsigned
operator * (
unsigned long u,
const sc_unsigned &
v);
261 inline sc_unsigned
operator * (
unsigned int u,
const sc_unsigned &
v);
263 sc_unsigned
operator * (
const sc_unsigned &
u,
const sc_uint_base &
v);
264 sc_signed
operator * (
const sc_unsigned &
u,
const sc_int_base &
v);
265 sc_unsigned
operator * (
const sc_uint_base &
u,
const sc_unsigned &
v);
266 sc_signed
operator * (
const sc_int_base &
u,
const sc_unsigned &
v);
269 sc_signed
operator / (
const sc_unsigned &
u,
const sc_signed &
v);
270 sc_signed
operator / (
const sc_signed &
u,
const sc_unsigned &
v);
272 sc_unsigned
operator / (
const sc_unsigned &
u,
const sc_unsigned &
v);
276 sc_unsigned
operator / (
const sc_unsigned &
u,
unsigned long v);
278 inline sc_unsigned
operator / (
const sc_unsigned &
u,
unsigned int v);
283 sc_unsigned
operator / (
unsigned long u,
const sc_unsigned &
v);
285 inline sc_unsigned
operator / (
unsigned int u,
const sc_unsigned &
v);
287 sc_unsigned
operator / (
const sc_unsigned &
u,
const sc_uint_base &
v);
288 sc_signed
operator / (
const sc_unsigned &
u,
const sc_int_base &
v);
289 sc_unsigned
operator / (
const sc_uint_base &
u,
const sc_unsigned &
v);
290 sc_signed
operator / (
const sc_int_base &
u,
const sc_unsigned &
v);
293 sc_signed
operator % (
const sc_unsigned &
u,
const sc_signed &
v);
294 sc_signed
operator % (
const sc_signed &
u,
const sc_unsigned &
v);
296 sc_unsigned
operator % (
const sc_unsigned &
u,
const sc_unsigned &
v);
300 sc_unsigned
operator % (
const sc_unsigned &
u,
unsigned long v);
302 inline sc_unsigned
operator % (
const sc_unsigned &
u,
unsigned int v);
307 sc_unsigned
operator % (
unsigned long u,
const sc_unsigned &
v);
309 inline sc_unsigned
operator % (
unsigned int u,
const sc_unsigned &
v);
311 sc_unsigned
operator % (
const sc_unsigned &
u,
const sc_uint_base &
v);
312 sc_signed
operator % (
const sc_unsigned &
u,
const sc_int_base &
v);
313 sc_unsigned
operator % (
const sc_uint_base &
u,
const sc_unsigned &
v);
314 sc_signed
operator % (
const sc_int_base &
u,
const sc_unsigned &
v);
319 sc_signed
operator & (
const sc_unsigned &
u,
const sc_signed &
v);
320 sc_signed
operator & (
const sc_signed &
u,
const sc_unsigned &
v);
322 sc_unsigned
operator & (
const sc_unsigned &
u,
const sc_unsigned &
v);
326 sc_unsigned
operator & (
const sc_unsigned &
u,
unsigned long v);
328 inline sc_unsigned
operator & (
const sc_unsigned &
u,
unsigned int v);
333 sc_unsigned
operator & (
unsigned long u,
const sc_unsigned &
v);
335 inline sc_unsigned
operator & (
unsigned int u,
const sc_unsigned &
v);
337 sc_unsigned
operator & (
const sc_unsigned &
u,
const sc_uint_base &
v);
338 sc_signed
operator & (
const sc_unsigned &
u,
const sc_int_base &
v);
339 sc_unsigned
operator & (
const sc_uint_base &
u,
const sc_unsigned &
v);
340 sc_signed
operator & (
const sc_int_base &
u,
const sc_unsigned &
v);
343 sc_signed
operator | (
const sc_unsigned &
u,
const sc_signed &
v);
344 sc_signed
operator | (
const sc_signed &
u,
const sc_unsigned &
v);
346 sc_unsigned
operator | (
const sc_unsigned &
u,
const sc_unsigned &
v);
350 sc_unsigned
operator | (
const sc_unsigned &
u,
unsigned long v);
352 inline sc_unsigned
operator | (
const sc_unsigned &
u,
unsigned int v);
357 sc_unsigned
operator | (
unsigned long u,
const sc_unsigned &
v);
359 inline sc_unsigned
operator | (
unsigned int u,
const sc_unsigned &
v);
361 sc_unsigned
operator | (
const sc_unsigned &
u,
const sc_uint_base &
v);
362 sc_signed
operator | (
const sc_unsigned &
u,
const sc_int_base &
v);
363 sc_unsigned
operator | (
const sc_uint_base &
u,
const sc_unsigned &
v);
364 sc_signed
operator | (
const sc_int_base &
u,
const sc_unsigned &
v);
367 sc_signed
operator ^ (
const sc_unsigned &
u,
const sc_signed &
v);
368 sc_signed
operator ^ (
const sc_signed &
u,
const sc_unsigned &
v);
370 sc_unsigned
operator ^ (
const sc_unsigned &
u,
const sc_unsigned &
v);
374 sc_unsigned
operator ^ (
const sc_unsigned &
u,
unsigned long v);
376 inline sc_unsigned
operator ^ (
const sc_unsigned &
u,
unsigned int v);
381 sc_unsigned
operator ^ (
unsigned long u,
const sc_unsigned &
v);
383 inline sc_unsigned
operator ^ (
unsigned int u,
const sc_unsigned &
v);
385 sc_unsigned
operator ^ (
const sc_unsigned &
u,
const sc_uint_base &
v);
386 sc_signed
operator ^ (
const sc_unsigned &
u,
const sc_int_base &
v);
387 sc_unsigned
operator ^ (
const sc_uint_base &
u,
const sc_unsigned &
v);
388 sc_signed
operator ^ (
const sc_int_base &
u,
const sc_unsigned &
v);
393 sc_unsigned
operator << (
const sc_unsigned &
u,
const sc_signed &
v);
394 sc_signed
operator << (
const sc_signed &
u,
const sc_unsigned &
v);
396 sc_unsigned
operator << (
const sc_unsigned &
u,
const sc_unsigned &
v);
400 sc_unsigned
operator << (
const sc_unsigned &
u,
unsigned long v);
401 inline sc_unsigned
operator << (
const sc_unsigned &
u,
int v);
402 inline sc_unsigned
operator << (
const sc_unsigned &
u,
unsigned int v);
404 sc_unsigned
operator << (
const sc_unsigned &
u,
const sc_uint_base &
v);
405 sc_unsigned
operator << (
const sc_unsigned &
u,
const sc_int_base &
v);
408 sc_unsigned
operator >> (
const sc_unsigned &
u,
const sc_signed &
v);
409 sc_signed
operator >> (
const sc_signed &
u,
const sc_unsigned &
v);
411 sc_unsigned
operator >> (
const sc_unsigned &
u,
const sc_unsigned &
v);
415 sc_unsigned
operator >> (
const sc_unsigned &
u,
unsigned long v);
416 inline sc_unsigned
operator >> (
const sc_unsigned &
u,
int v);
417 inline sc_unsigned
operator >> (
const sc_unsigned &
u,
unsigned int v);
419 sc_unsigned
operator >> (
const sc_unsigned &,
const sc_uint_base &);
420 sc_unsigned
operator >> (
const sc_unsigned&,
const sc_int_base &);
432 bool operator == (
const sc_unsigned &
u,
const sc_unsigned &
v);
438 inline bool operator == (
const sc_unsigned &
u,
unsigned int v);
445 inline bool operator == (
unsigned int u,
const sc_unsigned &
v) ;
447 bool operator == (
const sc_unsigned &
u,
const sc_uint_base &
v);
448 bool operator == (
const sc_unsigned &
u,
const sc_int_base &
v);
449 bool operator == (
const sc_uint_base &
u,
const sc_unsigned &
v);
450 bool operator == (
const sc_int_base &
u,
const sc_unsigned &
v);
456 bool operator != (
const sc_unsigned &
u,
const sc_unsigned &
v);
462 inline bool operator != (
const sc_unsigned &
u,
unsigned int v);
469 inline bool operator != (
unsigned int u,
const sc_unsigned &
v);
471 bool operator != (
const sc_unsigned &
u,
const sc_uint_base &
v);
472 bool operator != (
const sc_unsigned &
u,
const sc_int_base &
v);
473 bool operator != (
const sc_uint_base &
u,
const sc_unsigned &
v);
474 bool operator != (
const sc_int_base &
u,
const sc_unsigned &
v);
477 bool operator < (
const sc_unsigned &
u,
const sc_signed &
v);
478 bool operator < (
const sc_signed &
u,
const sc_unsigned &
v);
480 bool operator < (
const sc_unsigned &
u,
const sc_unsigned &
v);
484 bool operator < (
const sc_unsigned &
u,
unsigned long v);
486 inline bool operator < (
const sc_unsigned &
u,
unsigned int v);
491 bool operator < (
unsigned long u,
const sc_unsigned &
v);
493 inline bool operator < (
unsigned int u,
const sc_unsigned &
v);
495 bool operator < (
const sc_unsigned &
u,
const sc_uint_base &
v);
496 bool operator < (
const sc_unsigned &
u,
const sc_int_base &
v);
497 bool operator < (
const sc_uint_base &
u,
const sc_unsigned &
v);
498 bool operator < (
const sc_int_base &
u,
const sc_unsigned &
v);
504 bool operator <= (
const sc_unsigned &
u,
const sc_unsigned &
v);
510 inline bool operator <= (
const sc_unsigned &
u,
unsigned int v);
517 inline bool operator <= (
unsigned int u,
const sc_unsigned &
v);
519 bool operator <= (
const sc_unsigned &
u,
const sc_uint_base &
v);
520 bool operator <= (
const sc_unsigned &
u,
const sc_int_base &
v);
521 bool operator <= (
const sc_uint_base &
u,
const sc_unsigned &
v);
522 bool operator <= (
const sc_int_base &
u,
const sc_unsigned &
v);
525 bool operator > (
const sc_unsigned &
u,
const sc_signed &
v);
526 bool operator > (
const sc_signed &
u,
const sc_unsigned &
v);
528 bool operator > (
const sc_unsigned &
u,
const sc_unsigned &
v);
532 bool operator > (
const sc_unsigned &
u,
unsigned long v);
534 inline bool operator > (
const sc_unsigned &
u,
unsigned int v);
539 bool operator > (
unsigned long u,
const sc_unsigned &
v);
541 inline bool operator > (
unsigned int u,
const sc_unsigned &
v);
543 bool operator > (
const sc_unsigned &
u,
const sc_uint_base &
v);
544 bool operator > (
const sc_unsigned &
u,
const sc_int_base &
v);
545 bool operator > (
const sc_uint_base &
u,
const sc_unsigned &
v);
546 bool operator > (
const sc_int_base &
u,
const sc_unsigned &
v);
552 bool operator >= (
const sc_unsigned &
u,
const sc_unsigned &
v);
558 inline bool operator >= (
const sc_unsigned &
u,
unsigned int v);
565 inline bool operator >= (
unsigned int u,
const sc_unsigned &
v);
567 bool operator >= (
const sc_unsigned &
u,
const sc_uint_base &
v);
568 bool operator >= (
const sc_unsigned &
u,
const sc_int_base &
v);
569 bool operator >= (
const sc_uint_base &
u,
const sc_unsigned &
v);
570 bool operator >= (
const sc_int_base &
u,
const sc_unsigned &
v);
610 bool operator ! ()
const;
622 *xz_present_p =
false;
635 dst_p[word_i] &= ~bit_mask;
646 dst_p[word_i] |= bit_mask;
649 dst_p[word_i] &= ~bit_mask;
700 virtual void concat_set(
int64 src,
int low_i);
701 virtual void concat_set(
const sc_signed &src,
int low_i);
702 virtual void concat_set(
const sc_unsigned &src,
int low_i);
703 virtual void concat_set(
uint64 src,
int low_i);
706 void scan(::std::istream &
is=::std::cin);
754 if (m_left >= m_right)
755 return m_left - m_right + 1;
757 return m_right - m_left + 1;
765 unsigned int to_uint()
const;
766 long to_long()
const;
767 unsigned long to_ulong()
const;
768 int64 to_int64()
const;
770 double to_double()
const;
780 *xz_present_p =
false;
781 return m_left - m_right + 1;
783 virtual uint64 concat_get_uint64()
const;
784 virtual bool concat_get_ctrl(
sc_digit *dst_p,
int low_i)
const;
785 virtual bool concat_get_data(
sc_digit *dst_p,
int low_i)
const;
851 operator = (
unsigned int a)
853 return operator = ((
unsigned long)
a);
859 return operator = ((
long)
a);
869 virtual void concat_set(
int64 src,
int low_i);
870 virtual void concat_set(
const sc_signed &src,
int low_i);
871 virtual void concat_set(
const sc_unsigned &src,
int low_i);
872 virtual void concat_set(
uint64 src,
int low_i);
875 void scan(::std::istream &
is=::std::cin);
904 void invalid_init(
const char *type_name,
int nb)
const;
928 a->to_sc_unsigned(*
this);
944 return operator = ((
long)
v);
948 operator = (
unsigned int v)
950 return operator = ((
unsigned long)
v);
968 # ifndef SC_MAX_NBITS
979 *xz_present_p =
false;
982 virtual bool concat_get_ctrl(
sc_digit *dst_p,
int low_i)
const;
983 virtual bool concat_get_data(
sc_digit *dst_p,
int low_i)
const;
984 virtual uint64 concat_get_uint64()
const;
985 virtual void concat_set(
int64 src,
int low_i);
986 virtual void concat_set(
const sc_signed &src,
int low_i);
987 virtual void concat_set(
const sc_unsigned &src,
int low_i);
988 virtual void concat_set(
uint64 src,
int low_i);
1002 if ((
i < 0) || (
i >= nbits - 1))
1006 void invalid_index(
int i)
const;
1018 operator [] (
int i)
const
1056 if ((
l < 0) || (
r >= nbits - 1))
1057 invalid_range(
l,
r);
1059 if ((
r < 0) || (
l >= nbits - 1))
1060 invalid_range(
l,
r);
1064 void invalid_range(
int l,
int r)
const;
1085 operator () (
int i,
int j)
1094 operator () (
int i,
int j)
const
1104 unsigned int to_uint()
const;
1105 long to_long()
const;
1106 unsigned long to_ulong()
const;
1107 int64 to_int64()
const;
1108 uint64 to_uint64()
const;
1109 double to_double()
const;
1122 void scan(::std::istream &
is=::std::cin);
1123 void dump(::std::ostream &
os=::std::cout)
const;
1127 bool iszero()
const;
1139 bool test(
int i)
const;
1163 void get_packed_rep(
sc_digit *buf)
const;
1164 void set_packed_rep(
sc_digit *buf);
1215 friend sc_signed
operator + (
long u,
const sc_unsigned &
v);
1216 friend sc_unsigned
operator + (
unsigned long u,
const sc_unsigned &
v);
1217 friend sc_signed
operator + (
int u,
const sc_unsigned &
v);
1224 const sc_unsigned &operator += (
const sc_signed &
v);
1225 const sc_unsigned &operator += (
const sc_unsigned &
v);
1226 const sc_unsigned &operator += (
int64 v);
1227 const sc_unsigned &operator += (
uint64 v);
1228 const sc_unsigned &operator += (
long v);
1229 const sc_unsigned &operator += (
unsigned long v);
1233 return operator += ((
long)
v);
1236 operator += (
unsigned int v)
1238 return operator += ((
unsigned long)
v);
1278 return operator -= ((
long)
v);
1281 operator -= (
unsigned int v)
1283 return operator -= ((
unsigned long)
v);
1311 friend sc_signed
operator * (
long u,
const sc_unsigned &
v);
1312 friend sc_unsigned
operator * (
unsigned long u,
const sc_unsigned &
v);
1313 friend sc_signed
operator * (
int u,
const sc_unsigned &
v);
1320 const sc_unsigned &operator *= (
const sc_signed &
v);
1321 const sc_unsigned &operator *= (
const sc_unsigned &
v);
1322 const sc_unsigned &operator *= (
int64 v);
1323 const sc_unsigned &operator *= (
uint64 v);
1324 const sc_unsigned &operator *= (
long v);
1325 const sc_unsigned &operator *= (
unsigned long v);
1328 operator *= (
unsigned int v)
1330 return operator *= ((
unsigned long)
v);
1360 friend sc_signed
operator / (
long u,
const sc_unsigned &
v);
1361 friend sc_unsigned
operator / (
unsigned long u,
const sc_unsigned &
v);
1362 friend sc_signed
operator / (
int u,
const sc_unsigned &
v);
1369 const sc_unsigned &operator /= (
const sc_signed &
v);
1370 const sc_unsigned &operator /= (
const sc_unsigned &
v);
1371 const sc_unsigned &operator /= (
int64 v);
1372 const sc_unsigned &operator /= (
uint64 v);
1373 const sc_unsigned &operator /= (
long v);
1374 const sc_unsigned &operator /= (
unsigned long v);
1377 operator /= (
unsigned int v)
1379 return operator /= ((
unsigned long)
v);
1409 friend sc_signed
operator % (
long u,
const sc_unsigned &
v);
1410 friend sc_unsigned
operator % (
unsigned long u,
const sc_unsigned &
v);
1411 friend sc_signed
operator % (
int u,
const sc_unsigned &
v);
1418 const sc_unsigned &operator %= (
const sc_signed &
v);
1419 const sc_unsigned &operator %= (
const sc_unsigned &
v);
1420 const sc_unsigned &operator %= (
int64 v);
1421 const sc_unsigned &operator %= (
uint64 v);
1422 const sc_unsigned &operator %= (
long v);
1423 const sc_unsigned &operator %= (
unsigned long v);
1426 operator %= (
unsigned int v)
1428 return operator %= ((
unsigned long)
v);
1460 friend sc_signed
operator & (
long u,
const sc_unsigned &
v);
1461 friend sc_unsigned
operator & (
unsigned long u,
const sc_unsigned &
v);
1462 friend sc_signed
operator & (
int u,
const sc_unsigned &
v);
1509 friend sc_signed
operator | (
long u,
const sc_unsigned &
v);
1510 friend sc_unsigned
operator | (
unsigned long u,
const sc_unsigned &
v);
1511 friend sc_signed
operator | (
int u,
const sc_unsigned &
v);
1558 friend sc_signed
operator ^ (
long u,
const sc_unsigned &
v);
1559 friend sc_unsigned
operator ^ (
unsigned long u,
const sc_unsigned &
v);
1560 friend sc_signed
operator ^ (
int u,
const sc_unsigned &
v);
1616 const sc_unsigned &operator <<= (
const sc_signed &
v);
1617 const sc_unsigned &operator <<= (
const sc_unsigned &
v);
1618 const sc_unsigned &operator <<= (
int64 v);
1619 const sc_unsigned &operator <<= (
uint64 v);
1620 const sc_unsigned &operator <<= (
long v);
1621 const sc_unsigned &operator <<= (
unsigned long v);
1624 operator <<= (
unsigned int v)
1626 return operator <<= ((
unsigned long)
v);
1657 const sc_unsigned &operator >>= (
const sc_signed &
v);
1658 const sc_unsigned &operator >>= (
const sc_unsigned &
v);
1659 const sc_unsigned &operator >>= (
int64 v);
1660 const sc_unsigned &operator >>= (
uint64 v);
1661 const sc_unsigned &operator >>= (
long v);
1662 const sc_unsigned &operator >>= (
unsigned long v);
1665 operator >>= (
unsigned int v)
1667 return operator >>= ((
unsigned long)
v);
1704 friend bool operator == (
unsigned long u,
const sc_unsigned &
v);
1716 friend bool operator == (
const sc_unsigned &
u,
const sc_uint_base &
v);
1717 friend bool operator == (
const sc_unsigned &
u,
const sc_int_base &
v);
1718 friend bool operator == (
const sc_uint_base &
u,
const sc_unsigned &
v);
1719 friend bool operator == (
const sc_int_base &
u,
const sc_unsigned &
v);
1722 friend bool operator != (
const sc_unsigned &
u,
const sc_signed &
v);
1723 friend bool operator != (
const sc_signed &
u,
const sc_unsigned &
v);
1725 friend bool operator != (
const sc_unsigned &
u,
const sc_unsigned &
v);
1729 friend bool operator != (
const sc_unsigned &
u,
unsigned long v);
1744 friend bool operator != (
unsigned long u,
const sc_unsigned &
v);
1756 friend bool operator != (
const sc_unsigned &
u,
const sc_uint_base &
v);
1757 friend bool operator != (
const sc_unsigned &
u,
const sc_int_base &
v);
1758 friend bool operator != (
const sc_uint_base &
u,
const sc_unsigned &
v);
1759 friend bool operator != (
const sc_int_base &
u,
const sc_unsigned &
v);
1762 friend bool operator < (
const sc_unsigned &
u,
const sc_signed &
v);
1763 friend bool operator < (
const sc_signed &
u,
const sc_unsigned &
v);
1765 friend bool operator < (
const sc_unsigned &
u,
const sc_unsigned &
v);
1769 friend bool operator < (
const sc_unsigned &
u,
unsigned long v);
1784 friend bool operator < (
unsigned long u,
const sc_unsigned &
v);
1796 friend bool operator < (
const sc_unsigned &
u,
const sc_uint_base &
v);
1797 friend bool operator < (
const sc_unsigned &
u,
const sc_int_base &
v);
1798 friend bool operator < (
const sc_uint_base &
u,
const sc_unsigned &
v);
1799 friend bool operator < (
const sc_int_base &
u,
const sc_unsigned &
v);
1802 friend bool operator <= (
const sc_unsigned &
u,
const sc_signed &
v);
1803 friend bool operator <= (
const sc_signed &
u,
const sc_unsigned &
v);
1805 friend bool operator <= (
const sc_unsigned &
u,
const sc_unsigned &
v);
1809 friend bool operator <= (
const sc_unsigned &
u,
unsigned long v);
1824 friend bool operator <= (
unsigned long u,
const sc_unsigned &
v);
1836 friend bool operator <= (
const sc_unsigned &
u,
const sc_uint_base &
v);
1837 friend bool operator <= (
const sc_unsigned &
u,
const sc_int_base &
v);
1838 friend bool operator <= (
const sc_uint_base &
u,
const sc_unsigned &
v);
1839 friend bool operator <= (
const sc_int_base &
u,
const sc_unsigned &
v);
1842 friend bool operator > (
const sc_unsigned &
u,
const sc_signed &
v);
1843 friend bool operator > (
const sc_signed &
u,
const sc_unsigned &
v);
1845 friend bool operator > (
const sc_unsigned &
u,
const sc_unsigned &
v);
1849 friend bool operator > (
const sc_unsigned &
u,
unsigned long v);
1864 friend bool operator > (
unsigned long u,
const sc_unsigned &
v);
1876 friend bool operator > (
const sc_unsigned &
u,
const sc_uint_base &
v);
1877 friend bool operator > (
const sc_unsigned &
u,
const sc_int_base &
v);
1878 friend bool operator > (
const sc_uint_base &
u,
const sc_unsigned &
v);
1879 friend bool operator > (
const sc_int_base &
u,
const sc_unsigned &
v);
1882 friend bool operator >= (
const sc_unsigned &
u,
const sc_signed &
v);
1883 friend bool operator >= (
const sc_signed &
u,
const sc_unsigned &
v);
1885 friend bool operator >= (
const sc_unsigned &
u,
const sc_unsigned &
v);
1889 friend bool operator >= (
const sc_unsigned &
u,
unsigned long v);
1904 friend bool operator >= (
unsigned long u,
const sc_unsigned &
v);
1916 friend bool operator >= (
const sc_unsigned &
u,
const sc_uint_base &
v);
1917 friend bool operator >= (
const sc_unsigned &
u,
const sc_int_base &
v);
1918 friend bool operator >= (
const sc_uint_base &
u,
const sc_unsigned &
v);
1919 friend bool operator >= (
const sc_int_base &
u,
const sc_unsigned &
v);
1922 friend sc_unsigned
operator ~ (
const sc_unsigned &
u);
1940 int vnb,
int vnd,
const sc_digit *vd);
1944 int vnb,
int vnd,
const sc_digit *vd);
1948 int vnb,
int vnd,
const sc_digit *vd);
1995 bool check_if_outside(
int bit_num)
const;
2022 inline ::std::ostream &
operator << (::std::ostream &,
const sc_unsigned &);
2024 inline ::std::istream &
operator >> (::std::istream &, sc_unsigned &);
2036 inline ::std::ostream &
2051 inline const sc_unsigned_subref &
2055 a->to_sc_unsigned(temp);
2056 return *
this = temp;
2059 inline ::std::istream &
2079 for (
int i = m_right;
i <= m_left;
i++)
2080 if (!target_p->
test(
i))
2095 for (
int i = m_right;
i <= m_left;
i++)
2096 if (target_p->
test(
i))
2113 for (
int i = m_right;
i <= m_left;
i++)
2114 if (target_p->
test(
i)) odd = ~odd;
2115 return odd ? true :
false;
2120 inline ::std::ostream &
2136 inline const sc_unsigned_subref &
2137 sc_unsigned_subref::operator = (
const char *
a)
2140 return (*
this =
aa =
a);
2144 inline ::std::istream &
2161 int nb =
v->length();
2162 sgn = default_sign();
2164 nbits = num_bits(nb);
2166 invalid_init(
"sc_generic_base<T>", nb);
2170 # ifdef SC_MAX_NBITS
2176 v->to_sc_unsigned(*
this);
2179 inline ::std::ostream &
2186 inline ::std::istream &
2195 #endif // __SYSTEMC_EXT_DT_INT_SC_UNSIGNED_HH__
bool to_bool(const std::string &value, bool &retval)
Turn a string representation of a boolean into a boolean value.
void check_range(int l, int r) const
void copy_digits_unsigned(small_type &us, int unb, int und, sc_digit *ud, int, int vnd, const sc_digit *vd)
X & operator|=(sc_proxy< X > &px, const sc_proxy< Y > &py)
friend class sc_unsigned_subref
void copy_digits(int nb, int nd, const sc_digit *d)
friend class sc_signed_subref_r
void print(::std::ostream &os=::std::cout) const
void convert_SM_to_2C_to_SM()
void initialize(const sc_unsigned *obj_p, int index_)
sc_unsigned operator*(unsigned int u, const sc_unsigned &v)
static sc_core::sc_vpool< sc_unsigned > m_pool
small_type convert_unsigned_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
sc_unsigned_subref(const sc_unsigned_subref &a)
const std::string to_string(sc_enc enc)
Time operator-(const Time &l, const Time &r)
static sc_core::sc_vpool< sc_unsigned_subref > m_pool
sc_unsigned mul_unsigned_friend(small_type s, int unb, int und, const sc_digit *ud, int vnb, int vnd, const sc_digit *vd)
bool operator<(unsigned int u, const sc_unsigned &v)
virtual uint64 concat_get_uint64() const
sc_unsigned operator|(unsigned int u, const sc_unsigned &v)
X & operator&=(sc_proxy< X > &px, const sc_proxy< Y > &py)
int num_bits(int nb) const
void initialize(const sc_unsigned *obj_p, int left_, int right_)
bool sc_io_show_base(::std::ostream &os)
sc_proxy< X >::value_type xor_reduce(const sc_proxy< X > &a)
bool operator>(unsigned int u, const sc_unsigned &v)
bool operator==(unsigned int u, const sc_unsigned &v)
virtual int concat_length(bool *xz_present_p) const
sc_proxy< X >::value_type xnor_reduce(const sc_proxy< X > &a)
friend class sc_unsigned_signal
sc_proxy< X >::value_type or_reduce(const sc_proxy< X > &a)
void print(::std::ostream &os=::std::cout) const
virtual int concat_length(bool *xz_present_p) const
friend class sc_signed_subref
sc_unsigned_bitref(const sc_unsigned_bitref &a)
sc_unsigned operator^(unsigned int u, const sc_unsigned &v)
sc_proxy< X >::value_type nand_reduce(const sc_proxy< X > &a)
sc_numrep sc_io_base(::std::ostream &os, sc_numrep def_base)
sc_unsigned operator&(unsigned int u, const sc_unsigned &v)
void convert_unsigned_SM_to_2C(small_type s, int nd, sc_digit *d)
small_type default_sign() const
bool operator<=(unsigned int u, const sc_unsigned &v)
sc_unsigned div_unsigned_friend(small_type s, int unb, int und, const sc_digit *ud, int vnb, int vnd, const sc_digit *vd)
inline ::std::istream & operator>>(::std::istream &, sc_unsigned &)
void print(::std::ostream &os=::std::cout) const
const sc_lv_base reverse(const sc_proxy< X > &x)
sc_unsigned xor_unsigned_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
static sc_core::sc_vpool< sc_unsigned_bitref > m_pool
sc_unsigned add_unsigned_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
void check_index(int i) const
virtual ~sc_unsigned_bitref_r()
sc_proxy< X >::value_type nor_reduce(const sc_proxy< X > &a)
friend class sc_unsigned_bitref_r
sc_unsigned operator/(unsigned int u, const sc_unsigned &v)
sc_unsigned_bitref & bit(int i)
sc_unsigned_subref & range(int i, int j)
int compare_unsigned(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd, small_type if_u_signed, small_type if_v_signed)
sc_unsigned_subref_r(const sc_unsigned_subref_r &a)
small_type convert_unsigned_2C_to_SM(int nb, int nd, sc_digit *d)
sc_unsigned operator%(unsigned int u, const sc_unsigned &v)
friend class sc_unsigned_subref_r
bool operator>=(unsigned int u, const sc_unsigned &v)
sc_unsigned operator+(unsigned int u, const sc_unsigned &v)
sc_unsigned mod_unsigned_friend(small_type us, int unb, int und, const sc_digit *ud, int vnb, int vnd, const sc_digit *vd)
virtual bool concat_get_ctrl(sc_digit *dst_p, int low_i) const
friend class sc_concatref
sc_unsigned and_unsigned_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
sc_digit * get_raw() const
const sc_unsigned_subref_r & range(int i, int j) const
friend class sc_unsigned_bitref
const sc_unsigned_bitref_r & bit(int i) const
void dump()
Dump all statistics data to the registered outputs.
sc_proxy< X >::value_type and_reduce(const sc_proxy< X > &a)
X & operator^=(sc_proxy< X > &px, const sc_proxy< Y > &py)
sc_unsigned operator~(const sc_unsigned &u)
sc_unsigned or_unsigned_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
small_type make_zero(int nd, sc_digit *d)
const sc_unsigned & operator|=(int v)
bool operator!=(unsigned int u, const sc_unsigned &v)
virtual int concat_length(bool *xz_present_p) const
sc_unsigned sub_unsigned_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
virtual ~sc_unsigned_subref_r()
virtual bool concat_get_data(sc_digit *dst_p, int low_i) const
sc_unsigned_bitref_r(const sc_unsigned_bitref_r &a)
inline ::std::ostream & operator<<(::std::ostream &, const sc_unsigned &)
const sc_unsigned & operator&=(int v)
Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17