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

#include <sc_lv_base.hh>

Inheritance diagram for sc_dt::sc_lv_base:
sc_dt::sc_proxy< sc_lv_base > sc_dt::sc_lv< W >

Public Types

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

Public Member Functions

 sc_lv_base (int length_=sc_length_param().len())
 
 sc_lv_base (const sc_logic &a, int length_=sc_length_param().len())
 
 sc_lv_base (const char *a)
 
 sc_lv_base (const char *a, int length_)
 
template<class X >
 sc_lv_base (const sc_proxy< X > &a)
 
 sc_lv_base (const sc_lv_base &a)
 
virtual ~sc_lv_base ()
 
template<class X >
sc_lv_baseoperator= (const sc_proxy< X > &a)
 
sc_lv_baseoperator= (const sc_lv_base &a)
 
sc_lv_baseoperator= (const char *a)
 
sc_lv_baseoperator= (const bool *a)
 
sc_lv_baseoperator= (const sc_logic *a)
 
sc_lv_baseoperator= (const sc_unsigned &a)
 
sc_lv_baseoperator= (const sc_signed &a)
 
sc_lv_baseoperator= (const sc_uint_base &a)
 
sc_lv_baseoperator= (const sc_int_base &a)
 
sc_lv_baseoperator= (unsigned long a)
 
sc_lv_baseoperator= (long a)
 
sc_lv_baseoperator= (unsigned int a)
 
sc_lv_baseoperator= (int a)
 
sc_lv_baseoperator= (uint64 a)
 
sc_lv_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 wi) const
 
void set_word (int wi, sc_digit w)
 
sc_digit get_cword (int wi) const
 
void set_cword (int wi, sc_digit w)
 
void clean_tail ()
 
bool is_01 () const
 
- Public Member Functions inherited from sc_dt::sc_proxy< sc_lv_base >
virtual ~sc_proxy ()
 
sc_lv_baseback_cast ()
 
const sc_lv_baseback_cast () const
 
sc_lv_baseassign_ (const sc_proxy< Y > &a)
 
sc_lv_baseassign_ (const char *a)
 
sc_lv_baseassign_ (const bool *a)
 
sc_lv_baseassign_ (const sc_logic *a)
 
sc_lv_baseassign_ (const sc_unsigned &a)
 
sc_lv_baseassign_ (const sc_signed &a)
 
sc_lv_baseassign_ (const sc_uint_base &a)
 
sc_lv_baseassign_ (const sc_int_base &a)
 
sc_lv_baseassign_ (unsigned int a)
 
sc_lv_baseassign_ (int a)
 
sc_lv_baseassign_ (unsigned long a)
 
sc_lv_baseassign_ (long a)
 
sc_lv_baseassign_ (uint64 a)
 
sc_lv_baseassign_ (int64 a)
 
sc_lv_baseb_not ()
 
const sc_lv_base operator~ () const
 
sc_lv_baseoperator&= (const char *b)
 
sc_lv_baseoperator&= (const bool *b)
 
sc_lv_baseoperator&= (const sc_logic *b)
 
sc_lv_baseoperator&= (const sc_unsigned &b)
 
sc_lv_baseoperator&= (const sc_signed &b)
 
sc_lv_baseoperator&= (const sc_uint_base &b)
 
sc_lv_baseoperator&= (const sc_int_base &b)
 
sc_lv_baseoperator&= (unsigned long b)
 
sc_lv_baseoperator&= (long b)
 
sc_lv_baseoperator&= (unsigned int b)
 
sc_lv_baseoperator&= (int b)
 
sc_lv_baseoperator&= (uint64 b)
 
sc_lv_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_lv_baseoperator|= (const char *b)
 
sc_lv_baseoperator|= (const bool *b)
 
sc_lv_baseoperator|= (const sc_logic *b)
 
sc_lv_baseoperator|= (const sc_unsigned &b)
 
sc_lv_baseoperator|= (const sc_signed &b)
 
sc_lv_baseoperator|= (const sc_uint_base &b)
 
sc_lv_baseoperator|= (const sc_int_base &b)
 
sc_lv_baseoperator|= (unsigned long b)
 
sc_lv_baseoperator|= (long b)
 
sc_lv_baseoperator|= (unsigned int b)
 
sc_lv_baseoperator|= (int b)
 
sc_lv_baseoperator|= (uint64 b)
 
sc_lv_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_lv_baseoperator^= (const char *b)
 
sc_lv_baseoperator^= (const bool *b)
 
sc_lv_baseoperator^= (const sc_logic *b)
 
sc_lv_baseoperator^= (const sc_unsigned &b)
 
sc_lv_baseoperator^= (const sc_signed &b)
 
sc_lv_baseoperator^= (const sc_uint_base &b)
 
sc_lv_baseoperator^= (const sc_int_base &b)
 
sc_lv_baseoperator^= (unsigned long b)
 
sc_lv_baseoperator^= (long b)
 
sc_lv_baseoperator^= (unsigned int b)
 
sc_lv_baseoperator^= (int b)
 
sc_lv_baseoperator^= (uint64 b)
 
sc_lv_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_lv_baseoperator<<= (int n)
 
const sc_lv_base operator<< (int n) const
 
sc_lv_baseoperator>>= (int n)
 
const sc_lv_base operator>> (int n) const
 
sc_lv_baselrotate (int n)
 
sc_lv_baserrotate (int n)
 
sc_lv_basereverse ()
 
sc_bitref< sc_lv_baseoperator[] (int i)
 
sc_bitref_r< sc_lv_baseoperator[] (int i) const
 
sc_bitref< sc_lv_basebit (int i)
 
sc_bitref_r< sc_lv_basebit (int i) const
 
sc_subref< sc_lv_baseoperator() (int hi, int lo)
 
sc_subref_r< sc_lv_baseoperator() (int hi, int lo) const
 
sc_subref< sc_lv_baserange (int hi, int lo)
 
sc_subref_r< sc_lv_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
 
sc_digitm_ctrl
 

Private Member Functions

void init (int length_, const sc_logic &init_value=SC_LOGIC_X)
 
void assign_from_string (const std::string &)
 

Friends

class sc_bv_base
 

Additional Inherited Members

- Protected Member Functions inherited from sc_dt::sc_proxy< sc_lv_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 84 of file sc_lv_base.hh.

Member Typedef Documentation

◆ base_type

Definition at line 93 of file sc_lv_base.hh.

◆ value_type

Constructor & Destructor Documentation

◆ sc_lv_base() [1/6]

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

Definition at line 97 of file sc_lv_base.hh.

References init().

◆ sc_lv_base() [2/6]

sc_dt::sc_lv_base::sc_lv_base ( const sc_logic & a,
int length_ = sc_length_param().len() )
inlineexplicit

Definition at line 103 of file sc_lv_base.hh.

References a, and init().

◆ sc_lv_base() [3/6]

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

Definition at line 134 of file sc_lv_base.cc.

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

◆ sc_lv_base() [4/6]

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

Definition at line 142 of file sc_lv_base.cc.

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

◆ sc_lv_base() [5/6]

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

Definition at line 114 of file sc_lv_base.hh.

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

◆ sc_lv_base() [6/6]

sc_dt::sc_lv_base::sc_lv_base ( const sc_lv_base & a)

Definition at line 149 of file sc_lv_base.cc.

References a, m_ctrl, m_data, and m_size.

◆ ~sc_lv_base()

virtual sc_dt::sc_lv_base::~sc_lv_base ( )
inlinevirtual

Definition at line 124 of file sc_lv_base.hh.

References m_data.

Member Function Documentation

◆ assign_from_string()

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

Definition at line 114 of file sc_lv_base.cc.

References c, sc_dt::sc_logic::char_to_logic, len, m_len, sc_dt::sc_min(), and set_bit().

Referenced by operator=(), sc_lv_base(), and sc_lv_base().

◆ clean_tail()

void sc_dt::sc_lv_base::clean_tail ( )
inline

Definition at line 292 of file sc_lv_base.hh.

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

Referenced by init().

◆ get_bit()

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

◆ get_cword()

sc_digit sc_dt::sc_lv_base::get_cword ( int wi) const
inline

Definition at line 248 of file sc_lv_base.hh.

References m_ctrl.

◆ get_word()

sc_digit sc_dt::sc_lv_base::get_word ( int wi) const
inline

Definition at line 235 of file sc_lv_base.hh.

References m_data.

◆ init()

◆ is_01()

bool sc_dt::sc_lv_base::is_01 ( ) const

Definition at line 171 of file sc_lv_base.cc.

References m_ctrl, and m_size.

◆ length()

◆ operator=() [1/15]

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

Definition at line 145 of file sc_lv_base.hh.

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

◆ operator=() [2/15]

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

Definition at line 163 of file sc_lv_base.cc.

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

◆ operator=() [3/15]

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

Definition at line 180 of file sc_lv_base.hh.

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

◆ operator=() [4/15]

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

Definition at line 152 of file sc_lv_base.hh.

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

◆ operator=() [5/15]

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

Definition at line 136 of file sc_lv_base.hh.

References a, and sc_dt::assign_p_().

◆ operator=() [6/15]

◆ operator=() [7/15]

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

Definition at line 166 of file sc_lv_base.hh.

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

◆ operator=() [8/15]

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

Definition at line 173 of file sc_lv_base.hh.

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

◆ operator=() [9/15]

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

Definition at line 159 of file sc_lv_base.hh.

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

◆ operator=() [10/15]

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

Definition at line 208 of file sc_lv_base.hh.

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

◆ operator=() [11/15]

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

Definition at line 222 of file sc_lv_base.hh.

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

◆ operator=() [12/15]

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

Definition at line 194 of file sc_lv_base.hh.

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

◆ operator=() [13/15]

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

Definition at line 215 of file sc_lv_base.hh.

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

◆ operator=() [14/15]

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

Definition at line 201 of file sc_lv_base.hh.

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

◆ operator=() [15/15]

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

Definition at line 187 of file sc_lv_base.hh.

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

◆ set_bit()

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

Definition at line 280 of file sc_lv_base.hh.

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

Referenced by assign_from_string().

◆ set_cword()

void sc_dt::sc_lv_base::set_cword ( int wi,
sc_digit w )
inline

Definition at line 251 of file sc_lv_base.hh.

◆ set_word()

void sc_dt::sc_lv_base::set_word ( int wi,
sc_digit w )
inline

Definition at line 242 of file sc_lv_base.hh.

References m_data, m_size, and sc_assert.

◆ size()

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

Definition at line 230 of file sc_lv_base.hh.

References m_size.

Friends And Related Symbol Documentation

◆ sc_bv_base

friend class sc_bv_base
friend

Definition at line 86 of file sc_lv_base.hh.

Member Data Documentation

◆ m_ctrl

sc_digit* sc_dt::sc_lv_base::m_ctrl
protected

◆ m_data

sc_digit* sc_dt::sc_lv_base::m_data
protected

Definition at line 264 of file sc_lv_base.hh.

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

◆ m_len

int sc_dt::sc_lv_base::m_len
protected

Definition at line 262 of file sc_lv_base.hh.

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

◆ m_size

int sc_dt::sc_lv_base::m_size
protected

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