gem5 v24.0.0.0
Loading...
Searching...
No Matches
sc_dt::sc_bv_base Class Reference

#include <sc_bv_base.hh>

Inheritance diagram for sc_dt::sc_bv_base:
sc_dt::sc_proxy< sc_bv_base > sc_dt::sc_bv< W >

Public Types

typedef sc_proxy< sc_bv_basebase_type
 
typedef base_type::value_type value_type
 
- Public Types inherited from sc_dt::sc_proxy< sc_bv_base >
typedef sc_proxy_traits< sc_bv_base >::traits_type traits_type
 
typedef traits_type::bit_type bit_type
 
typedef traits_type::value_type value_type
 

Public Member Functions

 sc_bv_base (int length_=sc_length_param().len())
 
 sc_bv_base (bool a, int length_=sc_length_param().len())
 
 sc_bv_base (const char *a)
 
 sc_bv_base (const char *a, int length_)
 
template<class X >
 sc_bv_base (const sc_proxy< X > &a)
 
 sc_bv_base (const sc_bv_base &a)
 
virtual ~sc_bv_base ()
 
template<class X >
sc_bv_baseoperator= (const sc_proxy< X > &a)
 
sc_bv_baseoperator= (const sc_bv_base &a)
 
sc_bv_baseoperator= (const char *a)
 
sc_bv_baseoperator= (const bool *a)
 
sc_bv_baseoperator= (const sc_logic *a)
 
sc_bv_baseoperator= (const sc_unsigned &a)
 
sc_bv_baseoperator= (const sc_signed &a)
 
sc_bv_baseoperator= (const sc_uint_base &a)
 
sc_bv_baseoperator= (const sc_int_base &a)
 
sc_bv_baseoperator= (unsigned long a)
 
sc_bv_baseoperator= (long a)
 
sc_bv_baseoperator= (unsigned int a)
 
sc_bv_baseoperator= (int a)
 
sc_bv_baseoperator= (uint64 a)
 
sc_bv_baseoperator= (int64 a)
 
int length () const
 
int size () const
 
value_type get_bit (int i) const
 
void set_bit (int i, value_type value)
 
sc_digit get_word (int i) const
 
void set_word (int i, sc_digit w)
 
sc_digit get_cword (int) const
 
void set_cword (int i, sc_digit w)
 
void clean_tail ()
 
bool is_01 () const
 
- Public Member Functions inherited from sc_dt::sc_proxy< sc_bv_base >
virtual ~sc_proxy ()
 
sc_bv_baseback_cast ()
 
const sc_bv_baseback_cast () const
 
sc_bv_baseassign_ (const sc_proxy< Y > &a)
 
sc_bv_baseassign_ (const char *a)
 
sc_bv_baseassign_ (const bool *a)
 
sc_bv_baseassign_ (const sc_logic *a)
 
sc_bv_baseassign_ (const sc_unsigned &a)
 
sc_bv_baseassign_ (const sc_signed &a)
 
sc_bv_baseassign_ (const sc_uint_base &a)
 
sc_bv_baseassign_ (const sc_int_base &a)
 
sc_bv_baseassign_ (unsigned int a)
 
sc_bv_baseassign_ (int a)
 
sc_bv_baseassign_ (unsigned long a)
 
sc_bv_baseassign_ (long a)
 
sc_bv_baseassign_ (uint64 a)
 
sc_bv_baseassign_ (int64 a)
 
sc_bv_baseb_not ()
 
const sc_lv_base operator~ () const
 
sc_bv_baseoperator&= (const char *b)
 
sc_bv_baseoperator&= (const bool *b)
 
sc_bv_baseoperator&= (const sc_logic *b)
 
sc_bv_baseoperator&= (const sc_unsigned &b)
 
sc_bv_baseoperator&= (const sc_signed &b)
 
sc_bv_baseoperator&= (const sc_uint_base &b)
 
sc_bv_baseoperator&= (const sc_int_base &b)
 
sc_bv_baseoperator&= (unsigned long b)
 
sc_bv_baseoperator&= (long b)
 
sc_bv_baseoperator&= (unsigned int b)
 
sc_bv_baseoperator&= (int b)
 
sc_bv_baseoperator&= (uint64 b)
 
sc_bv_baseoperator&= (int64 b)
 
const sc_lv_base operator& (const char *b) const
 
const sc_lv_base operator& (const bool *b) const
 
const sc_lv_base operator& (const sc_logic *b) const
 
const sc_lv_base operator& (const sc_unsigned &b) const
 
const sc_lv_base operator& (const sc_signed &b) const
 
const sc_lv_base operator& (const sc_uint_base &b) const
 
const sc_lv_base operator& (const sc_int_base &b) const
 
const sc_lv_base operator& (unsigned long b) const
 
const sc_lv_base operator& (long b) const
 
const sc_lv_base operator& (unsigned int b) const
 
const sc_lv_base operator& (int b) const
 
const sc_lv_base operator& (uint64 b) const
 
const sc_lv_base operator& (int64 b) const
 
sc_bv_baseoperator|= (const char *b)
 
sc_bv_baseoperator|= (const bool *b)
 
sc_bv_baseoperator|= (const sc_logic *b)
 
sc_bv_baseoperator|= (const sc_unsigned &b)
 
sc_bv_baseoperator|= (const sc_signed &b)
 
sc_bv_baseoperator|= (const sc_uint_base &b)
 
sc_bv_baseoperator|= (const sc_int_base &b)
 
sc_bv_baseoperator|= (unsigned long b)
 
sc_bv_baseoperator|= (long b)
 
sc_bv_baseoperator|= (unsigned int b)
 
sc_bv_baseoperator|= (int b)
 
sc_bv_baseoperator|= (uint64 b)
 
sc_bv_baseoperator|= (int64 b)
 
const sc_lv_base operator| (const char *b) const
 
const sc_lv_base operator| (const bool *b) const
 
const sc_lv_base operator| (const sc_logic *b) const
 
const sc_lv_base operator| (const sc_unsigned &b) const
 
const sc_lv_base operator| (const sc_signed &b) const
 
const sc_lv_base operator| (const sc_uint_base &b) const
 
const sc_lv_base operator| (const sc_int_base &b) const
 
const sc_lv_base operator| (unsigned long b) const
 
const sc_lv_base operator| (long b) const
 
const sc_lv_base operator| (unsigned int b) const
 
const sc_lv_base operator| (int b) const
 
const sc_lv_base operator| (uint64 b) const
 
const sc_lv_base operator| (int64 b) const
 
sc_bv_baseoperator^= (const char *b)
 
sc_bv_baseoperator^= (const bool *b)
 
sc_bv_baseoperator^= (const sc_logic *b)
 
sc_bv_baseoperator^= (const sc_unsigned &b)
 
sc_bv_baseoperator^= (const sc_signed &b)
 
sc_bv_baseoperator^= (const sc_uint_base &b)
 
sc_bv_baseoperator^= (const sc_int_base &b)
 
sc_bv_baseoperator^= (unsigned long b)
 
sc_bv_baseoperator^= (long b)
 
sc_bv_baseoperator^= (unsigned int b)
 
sc_bv_baseoperator^= (int b)
 
sc_bv_baseoperator^= (uint64 b)
 
sc_bv_baseoperator^= (int64 b)
 
const sc_lv_base operator^ (const char *b) const
 
const sc_lv_base operator^ (const bool *b) const
 
const sc_lv_base operator^ (const sc_logic *b) const
 
const sc_lv_base operator^ (const sc_unsigned &b) const
 
const sc_lv_base operator^ (const sc_signed &b) const
 
const sc_lv_base operator^ (const sc_uint_base &b) const
 
const sc_lv_base operator^ (const sc_int_base &b) const
 
const sc_lv_base operator^ (unsigned long b) const
 
const sc_lv_base operator^ (long b) const
 
const sc_lv_base operator^ (unsigned int b) const
 
const sc_lv_base operator^ (int b) const
 
const sc_lv_base operator^ (uint64 b) const
 
const sc_lv_base operator^ (int64 b) const
 
sc_bv_baseoperator<<= (int n)
 
const sc_lv_base operator<< (int n) const
 
sc_bv_baseoperator>>= (int n)
 
const sc_lv_base operator>> (int n) const
 
sc_bv_baselrotate (int n)
 
sc_bv_baserrotate (int n)
 
sc_bv_basereverse ()
 
sc_bitref< sc_bv_baseoperator[] (int i)
 
sc_bitref_r< sc_bv_baseoperator[] (int i) const
 
sc_bitref< sc_bv_basebit (int i)
 
sc_bitref_r< sc_bv_basebit (int i) const
 
sc_subref< sc_bv_baseoperator() (int hi, int lo)
 
sc_subref_r< sc_bv_baseoperator() (int hi, int lo) const
 
sc_subref< sc_bv_baserange (int hi, int lo)
 
sc_subref_r< sc_bv_baserange (int hi, int lo) const
 
value_type and_reduce () const
 
value_type nand_reduce () const
 
value_type or_reduce () const
 
value_type nor_reduce () const
 
value_type xor_reduce () const
 
value_type xnor_reduce () const
 
bool operator== (const char *b) const
 
bool operator== (const bool *b) const
 
bool operator== (const sc_logic *b) const
 
bool operator== (const sc_unsigned &b) const
 
bool operator== (const sc_signed &b) const
 
bool operator== (const sc_uint_base &b) const
 
bool operator== (const sc_int_base &b) const
 
bool operator== (unsigned long b) const
 
bool operator== (long b) const
 
bool operator== (unsigned int b) const
 
bool operator== (int b) const
 
bool operator== (uint64 b) const
 
bool operator== (int64 b) const
 
const std::string to_string () const
 
const std::string to_string (sc_numrep) const
 
const std::string to_string (sc_numrep, bool) const
 
int64 to_int64 () const
 
uint64 to_uint64 () const
 
int to_int () const
 
unsigned int to_uint () const
 
long to_long () const
 
unsigned long to_ulong () const
 
void print (::std::ostream &os=::std::cout) const
 
void scan (::std::istream &is=::std::cin)
 

Protected Attributes

int m_len
 
int m_size
 
sc_digitm_data
 

Private Member Functions

void init (int length_, bool init_value=false)
 
void assign_from_string (const std::string &)
 

Friends

class sc_lv_base
 

Additional Inherited Members

- Protected Member Functions inherited from sc_dt::sc_proxy< sc_bv_base >
void check_bounds (int n) const
 
void check_wbounds (int n) const
 
sc_digit to_anything_unsigned () const
 
int64 to_anything_signed () const
 

Detailed Description

Definition at line 74 of file sc_bv_base.hh.

Member Typedef Documentation

◆ base_type

Definition at line 83 of file sc_bv_base.hh.

◆ value_type

Constructor & Destructor Documentation

◆ sc_bv_base() [1/6]

sc_dt::sc_bv_base::sc_bv_base ( int length_ = sc_length_param().len())
inlineexplicit

Definition at line 87 of file sc_bv_base.hh.

References init().

◆ sc_bv_base() [2/6]

sc_dt::sc_bv_base::sc_bv_base ( bool a,
int length_ = sc_length_param().len() )
inlineexplicit

Definition at line 93 of file sc_bv_base.hh.

References a, and init().

◆ sc_bv_base() [3/6]

sc_dt::sc_bv_base::sc_bv_base ( const char * a)

Definition at line 121 of file sc_bv_base.cc.

References a, assign_from_string(), sc_dt::convert_to_bin(), and init().

◆ sc_bv_base() [4/6]

sc_dt::sc_bv_base::sc_bv_base ( const char * a,
int length_ )

Definition at line 128 of file sc_bv_base.cc.

References a, assign_from_string(), sc_dt::convert_to_bin(), and init().

◆ sc_bv_base() [5/6]

template<class X >
sc_dt::sc_bv_base::sc_bv_base ( const sc_proxy< X > & a)
inline

Definition at line 103 of file sc_bv_base.hh.

References a, sc_dt::sc_proxy< sc_bv_base >::assign_(), and init().

◆ sc_bv_base() [6/6]

sc_dt::sc_bv_base::sc_bv_base ( const sc_bv_base & a)

Definition at line 135 of file sc_bv_base.cc.

References a, m_data, and m_size.

◆ ~sc_bv_base()

virtual sc_dt::sc_bv_base::~sc_bv_base ( )
inlinevirtual

Definition at line 112 of file sc_bv_base.hh.

References m_data.

Member Function Documentation

◆ assign_from_string()

void sc_dt::sc_bv_base::assign_from_string ( const std::string & s)
private

◆ clean_tail()

void sc_dt::sc_bv_base::clean_tail ( )
inline

Definition at line 273 of file sc_bv_base.hh.

References m_data, m_len, m_size, and sc_dt::SC_DIGIT_SIZE.

Referenced by init().

◆ get_bit()

sc_bv_base::value_type sc_dt::sc_bv_base::get_bit ( int i) const
inline

Definition at line 247 of file sc_bv_base.hh.

References m_data, sc_dt::SC_DIGIT_ONE, and sc_dt::SC_DIGIT_SIZE.

◆ get_cword()

sc_digit sc_dt::sc_bv_base::get_cword ( int ) const
inline

Definition at line 227 of file sc_bv_base.hh.

References sc_dt::SC_DIGIT_ZERO.

◆ get_word()

sc_digit sc_dt::sc_bv_base::get_word ( int i) const
inline

Definition at line 223 of file sc_bv_base.hh.

References m_data.

◆ init()

void sc_dt::sc_bv_base::init ( int length_,
bool init_value = false )
private

◆ is_01()

bool sc_dt::sc_bv_base::is_01 ( ) const
inline

Definition at line 234 of file sc_bv_base.hh.

◆ length()

◆ operator=() [1/15]

sc_bv_base & sc_dt::sc_bv_base::operator= ( const bool * a)
inline

Definition at line 133 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [2/15]

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

Definition at line 148 of file sc_bv_base.cc.

References a, assign_from_string(), and sc_dt::convert_to_bin().

◆ operator=() [3/15]

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

Definition at line 124 of file sc_bv_base.hh.

References a, and sc_dt::assign_p_().

◆ operator=() [4/15]

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

Definition at line 168 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [5/15]

sc_bv_base & sc_dt::sc_bv_base::operator= ( const sc_logic * a)
inline

Definition at line 140 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [6/15]

◆ operator=() [7/15]

sc_bv_base & sc_dt::sc_bv_base::operator= ( const sc_signed & a)
inline

Definition at line 154 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [8/15]

sc_bv_base & sc_dt::sc_bv_base::operator= ( const sc_uint_base & a)
inline

Definition at line 161 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [9/15]

sc_bv_base & sc_dt::sc_bv_base::operator= ( const sc_unsigned & a)
inline

Definition at line 147 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [10/15]

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

Definition at line 196 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [11/15]

sc_bv_base & sc_dt::sc_bv_base::operator= ( int64 a)
inline

Definition at line 210 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [12/15]

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

Definition at line 182 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [13/15]

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

Definition at line 203 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [14/15]

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

Definition at line 189 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ operator=() [15/15]

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

Definition at line 175 of file sc_bv_base.hh.

References a, and sc_dt::sc_proxy< sc_bv_base >::assign_().

◆ set_bit()

void sc_dt::sc_bv_base::set_bit ( int i,
value_type value )
inline

Definition at line 255 of file sc_bv_base.hh.

References m_data, sc_dt::SC_DIGIT_ONE, and sc_dt::SC_DIGIT_SIZE.

Referenced by assign_from_string().

◆ set_cword()

void sc_dt::sc_bv_base::set_cword ( int i,
sc_digit w )
inline

◆ set_word()

void sc_dt::sc_bv_base::set_word ( int i,
sc_digit w )
inline

Definition at line 225 of file sc_bv_base.hh.

References m_data.

◆ size()

int sc_dt::sc_bv_base::size ( ) const
inline

Definition at line 218 of file sc_bv_base.hh.

References m_size.

Friends And Related Symbol Documentation

◆ sc_lv_base

friend class sc_lv_base
friend

Definition at line 76 of file sc_bv_base.hh.

Member Data Documentation

◆ m_data

sc_digit* sc_dt::sc_bv_base::m_data
protected

Definition at line 239 of file sc_bv_base.hh.

Referenced by clean_tail(), get_bit(), get_word(), init(), sc_bv_base(), set_bit(), set_word(), and ~sc_bv_base().

◆ m_len

int sc_dt::sc_bv_base::m_len
protected

Definition at line 237 of file sc_bv_base.hh.

Referenced by assign_from_string(), clean_tail(), init(), and length().

◆ m_size

int sc_dt::sc_bv_base::m_size
protected

Definition at line 238 of file sc_bv_base.hh.

Referenced by clean_tail(), init(), sc_bv_base(), and size().


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

Generated on Tue Jun 18 2024 16:24:55 for gem5 by doxygen 1.11.0