SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_dt::sc_int_base Class Reference

Base class for sc_int. More...

#include <sysc/datatypes/int/sc_int_base.h>

Inheritance diagram for sc_dt::sc_int_base:
Collaboration diagram for sc_dt::sc_int_base:

Public Member Functions

 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 T >
 sc_int_base (const sc_generic_base< T > &a)
 
 sc_int_base (const sc_signed &a)
 
 sc_int_base (const sc_unsigned &a)
 
 sc_int_base (const sc_bv_base &v)
 
 sc_int_base (const sc_lv_base &v)
 
 sc_int_base (const sc_uint_subref_r &v)
 
 sc_int_base (const sc_signed_subref_r &v)
 
 sc_int_base (const sc_unsigned_subref_r &v)
 
virtual ~sc_int_base ()
 
sc_int_baseoperator= (int_type v)
 
sc_int_baseoperator= (const sc_int_base &a)
 
sc_int_baseoperator= (const sc_int_subref_r &a)
 
template<class T >
sc_int_baseoperator= (const sc_generic_base< T > &a)
 
sc_int_baseoperator= (const sc_signed &a)
 
sc_int_baseoperator= (const sc_unsigned &a)
 
sc_int_baseoperator= (const sc_bv_base &a)
 
sc_int_baseoperator= (const sc_lv_base &a)
 
sc_int_baseoperator= (const char *a)
 
sc_int_baseoperator= (unsigned long a)
 
sc_int_baseoperator= (long a)
 
sc_int_baseoperator= (unsigned int a)
 
sc_int_baseoperator= (int a)
 
sc_int_baseoperator= (uint64 a)
 
sc_int_baseoperator= (double a)
 
sc_int_baseoperator+= (int_type v)
 
sc_int_baseoperator-= (int_type v)
 
sc_int_baseoperator*= (int_type v)
 
sc_int_baseoperator/= (int_type v)
 
sc_int_baseoperator%= (int_type v)
 
sc_int_baseoperator&= (int_type v)
 
sc_int_baseoperator|= (int_type v)
 
sc_int_baseoperator^= (int_type v)
 
sc_int_baseoperator<<= (int_type v)
 
sc_int_baseoperator>>= (int_type v)
 
sc_int_baseoperator++ ()
 
const sc_int_base operator++ (int)
 
sc_int_baseoperator-- ()
 
const sc_int_base operator-- (int)
 
sc_int_bitrefoperator[] (int i)
 
const sc_int_bitref_roperator[] (int i) const
 
sc_int_bitrefbit (int i)
 
const sc_int_bitref_rbit (int i) const
 
sc_int_subrefoperator() (int left, int right)
 
const sc_int_subref_roperator() (int left, int right) const
 
sc_int_subrefrange (int left, int right)
 
const sc_int_subref_rrange (int left, int right) const
 
bool test (int i) const
 
void set (int i)
 
void set (int i, bool v)
 
int length () const
 
virtual int concat_length (bool *xz_present_p) const
 
virtual bool concat_get_ctrl (sc_digit *dst_p, int low_i) const
 
virtual bool concat_get_data (sc_digit *dst_p, int low_i) const
 
virtual uint64 concat_get_uint64 () const
 
virtual void concat_set (int64 src, int low_i)
 
virtual void concat_set (const sc_signed &src, int low_i)
 
virtual void concat_set (const sc_unsigned &src, int low_i)
 
virtual void concat_set (uint64 src, int low_i)
 
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 std::string to_string (sc_numrep numrep=SC_DEC) const
 
const std::string to_string (sc_numrep numrep, bool w_prefix) const
 
void print (::std::ostream &os=::std::cout) const
 
void scan (::std::istream &is=::std::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)
 

Detailed Description

Base class for sc_int.

Definition at line 548 of file sc_int_base.h.

Constructor & Destructor Documentation

◆ sc_int_base() [1/12]

sc_dt::sc_int_base::sc_int_base ( int  w = sc_length_param().len())
inlineexplicit

Definition at line 585 of file sc_int_base.h.

◆ sc_int_base() [2/12]

sc_dt::sc_int_base::sc_int_base ( int_type  v,
int  w 
)
inline

Definition at line 589 of file sc_int_base.h.

◆ sc_int_base() [3/12]

sc_dt::sc_int_base::sc_int_base ( const sc_int_base a)
inline

Definition at line 593 of file sc_int_base.h.

◆ sc_int_base() [4/12]

sc_dt::sc_int_base::sc_int_base ( const sc_int_subref_r a)
inlineexplicit

Definition at line 598 of file sc_int_base.h.

◆ sc_int_base() [5/12]

template<class T >
sc_dt::sc_int_base::sc_int_base ( const sc_generic_base< T > &  a)
inlineexplicit

Definition at line 603 of file sc_int_base.h.

◆ sc_int_base() [6/12]

sc_dt::sc_int_base::sc_int_base ( const sc_signed a)
explicit

◆ sc_int_base() [7/12]

sc_dt::sc_int_base::sc_int_base ( const sc_unsigned a)
explicit

◆ sc_int_base() [8/12]

sc_dt::sc_int_base::sc_int_base ( const sc_bv_base v)
explicit

◆ sc_int_base() [9/12]

sc_dt::sc_int_base::sc_int_base ( const sc_lv_base v)
explicit

◆ sc_int_base() [10/12]

sc_dt::sc_int_base::sc_int_base ( const sc_uint_subref_r v)
explicit

◆ sc_int_base() [11/12]

sc_dt::sc_int_base::sc_int_base ( const sc_signed_subref_r v)
explicit

◆ sc_int_base() [12/12]

sc_dt::sc_int_base::sc_int_base ( const sc_unsigned_subref_r v)
explicit

◆ ~sc_int_base()

virtual sc_dt::sc_int_base::~sc_int_base ( )
inlinevirtual

Definition at line 620 of file sc_int_base.h.

Member Function Documentation

◆ and_reduce()

bool sc_dt::sc_int_base::and_reduce ( ) const

◆ bit() [1/2]

sc_int_bitref & sc_dt::sc_int_base::bit ( int  i)
inline

Definition at line 1259 of file sc_int_base.h.

◆ bit() [2/2]

const sc_int_bitref_r & sc_dt::sc_int_base::bit ( int  i) const
inline

Definition at line 1269 of file sc_int_base.h.

◆ concat_get_ctrl()

virtual bool sc_dt::sc_int_base::concat_get_ctrl ( sc_digit dst_p,
int  low_i 
) const
virtual

Reimplemented from sc_dt::sc_value_base.

◆ concat_get_data()

virtual bool sc_dt::sc_int_base::concat_get_data ( sc_digit dst_p,
int  low_i 
) const
virtual

Reimplemented from sc_dt::sc_value_base.

◆ concat_get_uint64()

virtual uint64 sc_dt::sc_int_base::concat_get_uint64 ( ) const
inlinevirtual

Reimplemented from sc_dt::sc_value_base.

Definition at line 791 of file sc_int_base.h.

◆ concat_length()

virtual int sc_dt::sc_int_base::concat_length ( bool *  xz_present_p) const
inlinevirtual

Reimplemented from sc_dt::sc_value_base.

Definition at line 787 of file sc_int_base.h.

◆ concat_set() [1/4]

virtual void sc_dt::sc_int_base::concat_set ( int64  src,
int  low_i 
)
virtual

Reimplemented from sc_dt::sc_value_base.

◆ concat_set() [2/4]

virtual void sc_dt::sc_int_base::concat_set ( const sc_signed src,
int  low_i 
)
virtual

Reimplemented from sc_dt::sc_value_base.

◆ concat_set() [3/4]

virtual void sc_dt::sc_int_base::concat_set ( const sc_unsigned src,
int  low_i 
)
virtual

Reimplemented from sc_dt::sc_value_base.

◆ concat_set() [4/4]

virtual void sc_dt::sc_int_base::concat_set ( uint64  src,
int  low_i 
)
virtual

Reimplemented from sc_dt::sc_value_base.

◆ length()

int sc_dt::sc_int_base::length ( ) const
inline

Definition at line 777 of file sc_int_base.h.

◆ long_high()

long sc_dt::sc_int_base::long_high ( ) const
inline

Definition at line 859 of file sc_int_base.h.

◆ long_low()

long sc_dt::sc_int_base::long_low ( ) const
inline

Definition at line 856 of file sc_int_base.h.

◆ nand_reduce()

bool sc_dt::sc_int_base::nand_reduce ( ) const
inline

Definition at line 808 of file sc_int_base.h.

◆ nor_reduce()

bool sc_dt::sc_int_base::nor_reduce ( ) const
inline

Definition at line 813 of file sc_int_base.h.

◆ operator int_type()

sc_dt::sc_int_base::operator int_type ( ) const
inline

Definition at line 824 of file sc_int_base.h.

◆ operator%=()

sc_int_base& sc_dt::sc_int_base::operator%= ( int_type  v)
inline

Definition at line 686 of file sc_int_base.h.

◆ operator&=()

sc_int_base& sc_dt::sc_int_base::operator &= ( int_type  v)
inline

Definition at line 692 of file sc_int_base.h.

◆ operator()() [1/2]

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

Definition at line 1282 of file sc_int_base.h.

◆ operator()() [2/2]

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

Definition at line 1292 of file sc_int_base.h.

◆ operator*=()

sc_int_base& sc_dt::sc_int_base::operator*= ( int_type  v)
inline

Definition at line 680 of file sc_int_base.h.

◆ operator++() [1/2]

sc_int_base& sc_dt::sc_int_base::operator++ ( )
inline

Definition at line 711 of file sc_int_base.h.

◆ operator++() [2/2]

const sc_int_base sc_dt::sc_int_base::operator++ ( int  )
inline

Definition at line 714 of file sc_int_base.h.

◆ operator+=()

sc_int_base& sc_dt::sc_int_base::operator+= ( int_type  v)
inline

Definition at line 674 of file sc_int_base.h.

◆ operator--() [1/2]

sc_int_base& sc_dt::sc_int_base::operator-- ( )
inline

Definition at line 717 of file sc_int_base.h.

◆ operator--() [2/2]

const sc_int_base sc_dt::sc_int_base::operator-- ( int  )
inline

Definition at line 720 of file sc_int_base.h.

◆ operator-=()

sc_int_base& sc_dt::sc_int_base::operator-= ( int_type  v)
inline

Definition at line 677 of file sc_int_base.h.

◆ operator/=()

sc_int_base& sc_dt::sc_int_base::operator/= ( int_type  v)
inline

Definition at line 683 of file sc_int_base.h.

◆ operator<<=()

sc_int_base& sc_dt::sc_int_base::operator<<= ( int_type  v)
inline

Definition at line 702 of file sc_int_base.h.

◆ operator=() [1/15]

sc_int_base& sc_dt::sc_int_base::operator= ( int_type  v)
inline

Definition at line 625 of file sc_int_base.h.

◆ operator=() [2/15]

sc_int_base& sc_dt::sc_int_base::operator= ( const sc_int_base a)
inline

Definition at line 628 of file sc_int_base.h.

◆ operator=() [3/15]

sc_int_base& sc_dt::sc_int_base::operator= ( const sc_int_subref_r a)
inline

Definition at line 631 of file sc_int_base.h.

◆ operator=() [4/15]

template<class T >
sc_int_base& sc_dt::sc_int_base::operator= ( const sc_generic_base< T > &  a)
inline

Definition at line 635 of file sc_int_base.h.

◆ operator=() [5/15]

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

◆ operator=() [6/15]

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

◆ operator=() [7/15]

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

◆ operator=() [8/15]

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

◆ operator=() [9/15]

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

◆ operator=() [10/15]

sc_int_base& sc_dt::sc_int_base::operator= ( unsigned long  a)
inline

Definition at line 653 of file sc_int_base.h.

◆ operator=() [11/15]

sc_int_base& sc_dt::sc_int_base::operator= ( long  a)
inline

Definition at line 656 of file sc_int_base.h.

◆ operator=() [12/15]

sc_int_base& sc_dt::sc_int_base::operator= ( unsigned int  a)
inline

Definition at line 659 of file sc_int_base.h.

◆ operator=() [13/15]

sc_int_base& sc_dt::sc_int_base::operator= ( int  a)
inline

Definition at line 662 of file sc_int_base.h.

◆ operator=() [14/15]

sc_int_base& sc_dt::sc_int_base::operator= ( uint64  a)
inline

Definition at line 665 of file sc_int_base.h.

◆ operator=() [15/15]

sc_int_base& sc_dt::sc_int_base::operator= ( double  a)
inline

Definition at line 668 of file sc_int_base.h.

◆ operator>>=()

sc_int_base& sc_dt::sc_int_base::operator>>= ( int_type  v)
inline

Definition at line 705 of file sc_int_base.h.

◆ operator[]() [1/2]

sc_int_bitref & sc_dt::sc_int_base::operator[] ( int  i)
inline

Definition at line 1238 of file sc_int_base.h.

◆ operator[]() [2/2]

const sc_int_bitref_r & sc_dt::sc_int_base::operator[] ( int  i) const
inline

Definition at line 1248 of file sc_int_base.h.

◆ operator^=()

sc_int_base& sc_dt::sc_int_base::operator^= ( int_type  v)
inline

Definition at line 698 of file sc_int_base.h.

◆ operator|=()

sc_int_base& sc_dt::sc_int_base::operator|= ( int_type  v)
inline

Definition at line 695 of file sc_int_base.h.

◆ or_reduce()

bool sc_dt::sc_int_base::or_reduce ( ) const

◆ print()

void sc_dt::sc_int_base::print ( ::std::ostream &  os = ::std::cout) const
inline

Definition at line 871 of file sc_int_base.h.

◆ range() [1/2]

sc_int_subref & sc_dt::sc_int_base::range ( int  left,
int  right 
)
inline

Definition at line 1303 of file sc_int_base.h.

◆ range() [2/2]

const sc_int_subref_r & sc_dt::sc_int_base::range ( int  left,
int  right 
) const
inline

Definition at line 1313 of file sc_int_base.h.

◆ scan()

void sc_dt::sc_int_base::scan ( ::std::istream &  is = ::std::cin)

◆ set() [1/2]

void sc_dt::sc_int_base::set ( int  i)
inline

Definition at line 768 of file sc_int_base.h.

◆ set() [2/2]

void sc_dt::sc_int_base::set ( int  i,
bool  v 
)
inline

Definition at line 771 of file sc_int_base.h.

◆ test()

bool sc_dt::sc_int_base::test ( int  i) const
inline

Definition at line 765 of file sc_int_base.h.

◆ to_double()

double sc_dt::sc_int_base::to_double ( ) const
inline

Definition at line 852 of file sc_int_base.h.

◆ to_int()

int sc_dt::sc_int_base::to_int ( ) const
inline

Definition at line 834 of file sc_int_base.h.

◆ to_int64()

int64 sc_dt::sc_int_base::to_int64 ( ) const
inline

Definition at line 846 of file sc_int_base.h.

◆ to_long()

long sc_dt::sc_int_base::to_long ( ) const
inline

Definition at line 840 of file sc_int_base.h.

◆ to_string() [1/2]

const std::string sc_dt::sc_int_base::to_string ( sc_numrep  numrep = SC_DEC) const

◆ to_string() [2/2]

const std::string sc_dt::sc_int_base::to_string ( sc_numrep  numrep,
bool  w_prefix 
) const

◆ to_uint()

unsigned int sc_dt::sc_int_base::to_uint ( ) const
inline

Definition at line 837 of file sc_int_base.h.

◆ to_uint64()

uint64 sc_dt::sc_int_base::to_uint64 ( ) const
inline

Definition at line 849 of file sc_int_base.h.

◆ to_ulong()

unsigned long sc_dt::sc_int_base::to_ulong ( ) const
inline

Definition at line 843 of file sc_int_base.h.

◆ value()

int_type sc_dt::sc_int_base::value ( ) const
inline

Definition at line 830 of file sc_int_base.h.

◆ xnor_reduce()

bool sc_dt::sc_int_base::xnor_reduce ( ) const
inline

Definition at line 818 of file sc_int_base.h.

◆ xor_reduce()

bool sc_dt::sc_int_base::xor_reduce ( ) const

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const sc_int_base a,
const sc_int_base b 
)
friend

Definition at line 729 of file sc_int_base.h.

◆ operator<

bool operator< ( const sc_int_base a,
const sc_int_base b 
)
friend

Definition at line 732 of file sc_int_base.h.

◆ operator<=

bool operator<= ( const sc_int_base a,
const sc_int_base b 
)
friend

Definition at line 735 of file sc_int_base.h.

◆ operator==

bool operator== ( const sc_int_base a,
const sc_int_base b 
)
friend

Definition at line 726 of file sc_int_base.h.

◆ operator>

bool operator> ( const sc_int_base a,
const sc_int_base b 
)
friend

Definition at line 738 of file sc_int_base.h.

◆ operator>=

bool operator>= ( const sc_int_base a,
const sc_int_base b 
)
friend

Definition at line 741 of file sc_int_base.h.

◆ sc_int_bitref

friend class sc_int_bitref
friend

Definition at line 551 of file sc_int_base.h.

◆ sc_int_bitref_r

friend class sc_int_bitref_r
friend

Definition at line 550 of file sc_int_base.h.

◆ sc_int_subref

friend class sc_int_subref
friend

Definition at line 553 of file sc_int_base.h.

◆ sc_int_subref_r

friend class sc_int_subref_r
friend

Definition at line 552 of file sc_int_base.h.

Member Data Documentation

◆ m_len

int sc_dt::sc_int_base::m_len
protected

Definition at line 879 of file sc_int_base.h.

◆ m_ulen

int sc_dt::sc_int_base::m_ulen
protected

Definition at line 880 of file sc_int_base.h.

◆ m_val

int_type sc_dt::sc_int_base::m_val
protected

Definition at line 878 of file sc_int_base.h.


The documentation for this class was generated from the following file: