Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_dt::sc_int_base Class Reference

#include <sc_int_base.h>

Inheritance diagram for sc_dt::sc_int_base:

Inheritance graph
[legend]
List of all members.

Public Methods

 sc_int_base (int w=sc_length_param().len())
 sc_int_base (int_type v, int w)
 sc_int_base (const sc_int_base &a)
 sc_int_base (const sc_int_subref_r &a)
template<class T1, class T2>  sc_int_base (const sc_int_concref_r< T1, T2 > &a)
 sc_int_base (const sc_signed &a)
 sc_int_base (const sc_unsigned &a)
 ~sc_int_base ()
sc_int_base & operator= (int_type v)
sc_int_base & operator= (const sc_int_base &a)
sc_int_base & operator= (const sc_int_subref_r &a)
template<class T1, class T2> sc_int_base & operator= (const sc_int_concref_r< T1, T2 > &a)
sc_int_base & operator= (const sc_signed &a)
sc_int_base & operator= (const sc_unsigned &a)
sc_int_base & operator= (const sc_bv_base &a)
sc_int_base & operator= (const sc_lv_base &a)
sc_int_base & operator= (const char *a)
sc_int_base & operator= (unsigned long a)
sc_int_base & operator= (long a)
sc_int_base & operator= (unsigned int a)
sc_int_base & operator= (int a)
sc_int_base & operator= (uint64 a)
sc_int_base & operator= (double a)
sc_int_base & operator+= (int_type v)
sc_int_base & operator-= (int_type v)
sc_int_base & operator *= (int_type v)
sc_int_base & operator/= (int_type v)
sc_int_base & operator%= (int_type v)
sc_int_base & operator &= (int_type v)
sc_int_base & operator|= (int_type v)
sc_int_base & operator^= (int_type v)
sc_int_base & operator<<= (int_type v)
sc_int_base & operator>>= (int_type v)
sc_int_base & operator++ ()
const sc_int_base operator++ (int)
sc_int_base & operator-- ()
const sc_int_base operator-- (int)
sc_int_bitref operator[] (int i)
sc_int_bitref_r operator[] (int i) const
sc_int_bitref bit (int i)
sc_int_bitref_r bit (int i) const
sc_int_subref operator() (int left, int right)
sc_int_subref_r operator() (int left, int right) const
sc_int_subref range (int left, int right)
sc_int_subref_r range (int left, int right) const
bool test (int i) const
void set (int i)
void set (int i, bool v)
int length () const
bool and_reduce () const
bool nand_reduce () const
bool or_reduce () const
bool nor_reduce () const
bool xor_reduce () const
bool xnor_reduce () const
 operator int_type () const
int_type value () const
int to_int () const
unsigned int to_uint () const
long to_long () const
unsigned long to_ulong () const
int64 to_int64 () const
uint64 to_uint64 () const
double to_double () const
long long_low () const
long long_high () const
const sc_string to_string (sc_numrep numrep=SC_DEC) const
const sc_string to_string (sc_numrep numrep, bool w_prefix) const
void print (ostream &os=cout) const
void scan (istream &is=cin)

Protected Attributes

int_type m_val
int m_len
int m_ulen

Friends

class sc_int_bitref_r
class sc_int_bitref
class sc_int_subref_r
class sc_int_subref
bool operator== (const sc_int_base &a, const sc_int_base &b)
bool operator!= (const sc_int_base &a, const sc_int_base &b)
bool operator< (const sc_int_base &a, const sc_int_base &b)
bool operator<= (const sc_int_base &a, const sc_int_base &b)
bool operator> (const sc_int_base &a, const sc_int_base &b)
bool operator>= (const sc_int_base &a, const sc_int_base &b)

Constructor & Destructor Documentation

sc_dt::sc_int_base::sc_int_base int    w = sc_length_param().len() [inline, explicit]
 

Definition at line 1276 of file sc_int_base.h.

References m_len, m_ulen, m_val, and SC_INTWIDTH.

sc_dt::sc_int_base::sc_int_base int_type    v,
int    w
[inline]
 

Definition at line 1280 of file sc_int_base.h.

References sc_dt::int_type, m_len, m_ulen, m_val, and SC_INTWIDTH.

sc_dt::sc_int_base::sc_int_base const sc_int_base &    a [inline]
 

Definition at line 1284 of file sc_int_base.h.

References m_len, m_ulen, and m_val.

sc_dt::sc_int_base::sc_int_base const sc_int_subref_r   a [inline, explicit]
 

Definition at line 1288 of file sc_int_base.h.

References length(), m_len, m_ulen, m_val, and SC_INTWIDTH.

template<class T1, class T2>
sc_dt::sc_int_base::sc_int_base const sc_int_concref_r< T1, T2 > &    a [inline, explicit]
 

Definition at line 1293 of file sc_int_base.h.

References length(), m_len, m_ulen, m_val, and SC_INTWIDTH.

sc_dt::sc_int_base::sc_int_base const sc_signed   a [explicit]
 

Definition at line 201 of file sc_int_base.cpp.

References m_len, SC_INTWIDTH, and set().

sc_dt::sc_int_base::sc_int_base const sc_unsigned   a [explicit]
 

Definition at line 211 of file sc_int_base.cpp.

References m_len, SC_INTWIDTH, and set().

sc_dt::sc_int_base::~sc_int_base   [inline]
 

Definition at line 1303 of file sc_int_base.h.


Member Function Documentation

bool sc_dt::sc_int_base::and_reduce  
 

Definition at line 337 of file sc_int_base.cpp.

References sc_dt::int_type, and m_val.

Referenced by sc_dt::and_reduce(), sc_dt::sc_int_subref_r::and_reduce(), sc_dt::sc_int_concref_r< T1, T2 >::and_reduce(), and nand_reduce().

sc_int_bitref_r sc_dt::sc_int_base::bit int    i const [inline]
 

Definition at line 3537 of file sc_int_base.h.

References sc_int_bitref_r.

sc_int_bitref sc_dt::sc_int_base::bit int    i [inline]
 

Definition at line 3529 of file sc_int_base.h.

References sc_int_bitref.

int sc_dt::sc_int_base::length   const [inline]
 

Definition at line 1461 of file sc_int_base.h.

References m_len.

Referenced by sc_int_base().

long sc_dt::sc_int_base::long_high   const [inline]
 

Definition at line 1526 of file sc_int_base.h.

References m_val, and sc_dt::UINT64_32ONES.

long sc_dt::sc_int_base::long_low   const [inline]
 

Definition at line 1523 of file sc_int_base.h.

References m_val, and sc_dt::UINT64_32ONES.

bool sc_dt::sc_int_base::nand_reduce   const [inline]
 

Definition at line 1474 of file sc_int_base.h.

References and_reduce().

Referenced by sc_dt::nand_reduce().

bool sc_dt::sc_int_base::nor_reduce   const [inline]
 

Definition at line 1479 of file sc_int_base.h.

References or_reduce().

Referenced by sc_dt::nor_reduce().

sc_int_base& sc_dt::sc_int_base::operator &= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1376 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_base& sc_dt::sc_int_base::operator *= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1364 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_dt::sc_int_base::operator int_type   const [inline]
 

Definition at line 1490 of file sc_int_base.h.

References m_val.

Referenced by value().

sc_int_base& sc_dt::sc_int_base::operator%= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1370 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_subref_r sc_dt::sc_int_base::operator() int    left,
int    right
const [inline]
 

Definition at line 3556 of file sc_int_base.h.

References sc_int_subref_r.

sc_int_subref sc_dt::sc_int_base::operator() int    left,
int    right
[inline]
 

Definition at line 3548 of file sc_int_base.h.

References sc_int_subref.

const sc_int_base sc_dt::sc_int_base::operator++ int    [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1398 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator++   [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1395 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator+= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1358 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

const sc_int_base sc_dt::sc_int_base::operator-- int    [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1404 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator--   [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1401 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator-= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1361 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_base& sc_dt::sc_int_base::operator/= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1367 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_base& sc_dt::sc_int_base::operator<<= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1386 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_base& sc_dt::sc_int_base::operator= double    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1352 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= uint64    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1349 of file sc_int_base.h.

References m_val, and sc_dt::uint64.

sc_int_base& sc_dt::sc_int_base::operator= int    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1346 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= unsigned int    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1343 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= long    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1340 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= unsigned long    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1337 of file sc_int_base.h.

References m_val.

sc_int_base & sc_dt::sc_int_base::operator= const char *    a
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 291 of file sc_int_base.cpp.

References m_len, operator=(), sc_dt::SC_ON, SC_REPORT_ERROR, sc_dt::SC_TRN, sc_dt::SC_WRAP, and sprintf().

sc_int_base & sc_dt::sc_int_base::operator= const sc_lv_base   a
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 275 of file sc_int_base.cpp.

References sc_dt::sc_lv_base::get_bit(), sc_dt::sc_lv_base::length(), m_len, sc_min(), and set().

sc_int_base & sc_dt::sc_int_base::operator= const sc_bv_base   a
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 259 of file sc_int_base.cpp.

References sc_dt::sc_bv_base::get_bit(), sc_dt::sc_bv_base::length(), m_len, sc_min(), and set().

sc_int_base & sc_dt::sc_int_base::operator= const sc_unsigned   a
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 242 of file sc_int_base.cpp.

References sc_dt::sc_unsigned::length(), m_len, sc_min(), set(), and sc_dt::sc_unsigned::test().

sc_int_base & sc_dt::sc_int_base::operator= const sc_signed   a
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 225 of file sc_int_base.cpp.

References sc_dt::sc_signed::length(), m_len, sc_min(), set(), sc_dt::sc_signed::sign(), and sc_dt::sc_signed::test().

template<class T1, class T2>
sc_int_base& sc_dt::sc_int_base::operator= const sc_int_concref_r< T1, T2 > &    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1319 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= const sc_int_subref_r   a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1315 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= const sc_int_base &    a [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1312 of file sc_int_base.h.

References m_val.

sc_int_base& sc_dt::sc_int_base::operator= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1309 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

Referenced by operator=().

sc_int_base& sc_dt::sc_int_base::operator>>= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1389 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_bitref_r sc_dt::sc_int_base::operator[] int    i const [inline]
 

Definition at line 3520 of file sc_int_base.h.

References sc_int_bitref_r.

sc_int_bitref sc_dt::sc_int_base::operator[] int    i [inline]
 

Definition at line 3512 of file sc_int_base.h.

References sc_int_bitref.

sc_int_base& sc_dt::sc_int_base::operator^= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1382 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

sc_int_base& sc_dt::sc_int_base::operator|= int_type    v [inline]
 

Reimplemented in sc_dt::sc_int< W >.

Definition at line 1379 of file sc_int_base.h.

References sc_dt::int_type, and m_val.

bool sc_dt::sc_int_base::or_reduce  
 

Definition at line 343 of file sc_int_base.cpp.

References sc_dt::int_type, and m_val.

Referenced by nor_reduce(), sc_dt::or_reduce(), sc_dt::sc_int_subref_r::or_reduce(), and sc_dt::sc_int_concref_r< T1, T2 >::or_reduce().

void sc_dt::sc_int_base::print ostream &    os = cout const [inline]
 

Definition at line 1539 of file sc_int_base.h.

References to_string().

Referenced by sc_dt::operator<<().

sc_int_subref_r sc_dt::sc_int_base::range int    left,
int    right
const [inline]
 

Definition at line 3573 of file sc_int_base.h.

References sc_int_subref_r.

sc_int_subref sc_dt::sc_int_base::range int    left,
int    right
[inline]
 

Definition at line 3565 of file sc_int_base.h.

References sc_int_subref.

void sc_dt::sc_int_base::scan istream &    is = cin
 

Definition at line 366 of file sc_int_base.cpp.

References sc_string::c_str(), and s.

Referenced by sc_dt::operator>>().

void sc_dt::sc_int_base::set int    i,
bool    v
[inline]
 

Definition at line 1455 of file sc_int_base.h.

References m_val, and sc_dt::UINT_ONE.

void sc_dt::sc_int_base::set int    i [inline]
 

Definition at line 1452 of file sc_int_base.h.

References m_val, and sc_dt::UINT_ONE.

Referenced by sc_dt::sc_int_bitref::operator &=(), sc_dt::sc_int_bitref::operator=(), operator=(), sc_dt::sc_int_bitref::operator|=(), and sc_int_base().

bool sc_dt::sc_int_base::test int    i const [inline]
 

Definition at line 1449 of file sc_int_base.h.

References m_val, and sc_dt::UINT_ONE.

Referenced by sc_dt::sc_int_bitref_r::operator bool(), sc_dt::sc_int_bitref_r::operator!(), and sc_dt::sc_int_bitref_r::operator~().

double sc_dt::sc_int_base::to_double   const [inline]
 

Definition at line 1518 of file sc_int_base.h.

References m_val.

Referenced by sc_dt::sc_int_subref_r::to_double(), and sc_dt::sc_int_concref_r< T1, T2 >::to_double().

int sc_dt::sc_int_base::to_int   const [inline]
 

Definition at line 1500 of file sc_int_base.h.

References m_val.

Referenced by sc_dt::sc_int_subref_r::to_int(), and sc_dt::sc_int_concref_r< T1, T2 >::to_int().

int64 sc_dt::sc_int_base::to_int64   const [inline]
 

Definition at line 1512 of file sc_int_base.h.

References sc_dt::int64, and m_val.

Referenced by sc_dt::sc_int_subref_r::to_int64(), and sc_dt::sc_int_concref_r< T1, T2 >::to_int64().

long sc_dt::sc_int_base::to_long   const [inline]
 

Definition at line 1506 of file sc_int_base.h.

References m_val.

Referenced by sc_dt::sc_int_subref_r::to_long(), and sc_dt::sc_int_concref_r< T1, T2 >::to_long().

const sc_string sc_dt::sc_int_base::to_string sc_numrep    numrep,
bool    w_prefix
const
 

Definition at line 326 of file sc_int_base.cpp.

References m_len, sc_numrep, sc_dt::SC_ON, sc_dt::SC_TRN, sc_dt::SC_WRAP, and sc_dt::sc_fxnum::to_string().

const sc_string sc_dt::sc_int_base::to_string sc_numrep    numrep = SC_DEC const
 

Definition at line 318 of file sc_int_base.cpp.

References m_len, sc_numrep, sc_dt::SC_ON, sc_dt::SC_TRN, sc_dt::SC_WRAP, and sc_dt::sc_fxnum::to_string().

Referenced by print(), sc_dt::sc_int_subref_r::to_string(), and sc_dt::sc_int_concref_r< T1, T2 >::to_string().

unsigned int sc_dt::sc_int_base::to_uint   const [inline]
 

Definition at line 1503 of file sc_int_base.h.

References m_val.

Referenced by sc_dt::sc_int_subref_r::to_uint(), and sc_dt::sc_int_concref_r< T1, T2 >::to_uint().

uint64 sc_dt::sc_int_base::to_uint64   const [inline]
 

Definition at line 1515 of file sc_int_base.h.

References m_val, and sc_dt::uint64.

Referenced by sc_dt::sc_int_subref_r::to_uint64(), and sc_dt::sc_int_concref_r< T1, T2 >::to_uint64().

unsigned long sc_dt::sc_int_base::to_ulong   const [inline]
 

Definition at line 1509 of file sc_int_base.h.

References m_val.

Referenced by sc_dt::sc_int_subref_r::to_ulong(), and sc_dt::sc_int_concref_r< T1, T2 >::to_ulong().

int_type sc_dt::sc_int_base::value   const [inline]
 

Definition at line 1496 of file sc_int_base.h.

References sc_dt::int_type, and operator int_type().

bool sc_dt::sc_int_base::xnor_reduce   const [inline]
 

Definition at line 1484 of file sc_int_base.h.

References xor_reduce().

Referenced by sc_dt::xnor_reduce().

bool sc_dt::sc_int_base::xor_reduce  
 

Definition at line 349 of file sc_int_base.cpp.

References m_ulen, m_val, SC_INTWIDTH, sc_dt::uint_type, and sc_dt::UINT_ZERO.

Referenced by xnor_reduce(), sc_dt::xor_reduce(), sc_dt::sc_int_subref_r::xor_reduce(), and sc_dt::sc_int_concref_r< T1, T2 >::xor_reduce().


Friends And Related Function Documentation

bool operator!= const sc_int_base &    a,
const sc_int_base &    b
[friend]
 

Definition at line 1413 of file sc_int_base.h.

bool operator< const sc_int_base &    a,
const sc_int_base &    b
[friend]
 

Definition at line 1416 of file sc_int_base.h.

bool operator<= const sc_int_base &    a,
const sc_int_base &    b
[friend]
 

Definition at line 1419 of file sc_int_base.h.

bool operator== const sc_int_base &    a,
const sc_int_base &    b
[friend]
 

Definition at line 1410 of file sc_int_base.h.

bool operator> const sc_int_base &    a,
const sc_int_base &    b
[friend]
 

Definition at line 1422 of file sc_int_base.h.

bool operator>= const sc_int_base &    a,
const sc_int_base &    b
[friend]
 

Definition at line 1425 of file sc_int_base.h.

friend class sc_int_bitref [friend]
 

Definition at line 1242 of file sc_int_base.h.

Referenced by bit(), and operator[]().

friend class sc_int_bitref_r [friend]
 

Definition at line 1241 of file sc_int_base.h.

Referenced by bit(), and operator[]().

friend class sc_int_subref [friend]
 

Definition at line 1244 of file sc_int_base.h.

Referenced by operator()(), and range().

friend class sc_int_subref_r [friend]
 

Definition at line 1243 of file sc_int_base.h.

Referenced by operator()(), and range().


Member Data Documentation

int sc_dt::sc_int_base::m_len [protected]
 

Definition at line 1547 of file sc_int_base.h.

Referenced by length(), operator=(), sc_int_base(), and to_string().

int sc_dt::sc_int_base::m_ulen [protected]
 

Definition at line 1548 of file sc_int_base.h.

Referenced by sc_int_base(), and xor_reduce().

int_type sc_dt::sc_int_base::m_val [protected]
 

Definition at line 1546 of file sc_int_base.h.

Referenced by and_reduce(), long_high(), long_low(), operator &=(), operator *=(), sc_dt::sc_int_subref_r::operator int_type(), operator int_type(), operator%=(), operator++(), operator+=(), operator--(), operator-=(), operator/=(), operator<<=(), operator=(), sc_dt::sc_int_subref::operator=(), sc_dt::sc_int< W >::operator=(), operator>>=(), sc_dt::sc_int_bitref::operator^=(), operator^=(), operator|=(), or_reduce(), sc_int_base(), set(), test(), to_double(), to_int(), to_int64(), to_long(), to_uint(), to_uint64(), to_ulong(), and xor_reduce().


The documentation for this class was generated from the following files:
Generated on Sun Dec 12 19:23:58 2004 for SystemC2.0.1(excludingMSLib)(IncludingSCV) by doxygen1.2.18