gem5  v22.1.0.0
Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
sc_dt::sc_bit Class Reference

#include <sc_bit.hh>

Public Member Functions

 sc_bit ()
 
 sc_bit (const sc_logic &a)
 
 sc_bit (const sc_bit &a)
 
 ~sc_bit ()
 
sc_bitoperator= (const sc_bit &b)
 
sc_bitoperator= (const sc_logic &b)
 
sc_bitoperator&= (const sc_bit &b)
 
sc_bitoperator|= (const sc_bit &b)
 
sc_bitoperator^= (const sc_bit &b)
 
 operator bool () const
 
bool operator! () const
 
bool to_bool () const
 
char to_char () const
 
sc_bitb_not ()
 
void print (::std::ostream &os=::std::cout) const
 
void scan (::std::istream &=::std::cin)
 

Static Private Member Functions

static void invalid_value (char)
 
static void invalid_value (int)
 
static bool to_value (char c)
 
static bool to_value (int i)
 
static bool to_value (bool b)
 

Private Attributes

bool m_val
 

Friends

bool operator== (const sc_bit &a, const sc_bit &b)
 
bool operator!= (const sc_bit &a, const sc_bit &b)
 
const sc_bit operator~ (const sc_bit &a)
 
const sc_bit operator| (const sc_bit &a, const sc_bit &b)
 
const sc_bit operator& (const sc_bit &a, const sc_bit &b)
 
const sc_bit operator^ (const sc_bit &a, const sc_bit &b)
 

Detailed Description

Definition at line 87 of file sc_bit.hh.

Constructor & Destructor Documentation

◆ sc_bit() [1/3]

sc_dt::sc_bit::sc_bit ( )
inline

Definition at line 127 of file sc_bit.hh.

References sc_dt::sc_deprecated_sc_bit().

Referenced by operator=().

◆ sc_bit() [2/3]

sc_dt::sc_bit::sc_bit ( const sc_logic a)
explicit

Definition at line 97 of file sc_bit.cc.

References sc_dt::sc_deprecated_sc_bit().

◆ sc_bit() [3/3]

sc_dt::sc_bit::sc_bit ( const sc_bit a)
inline

Definition at line 147 of file sc_bit.hh.

◆ ~sc_bit()

sc_dt::sc_bit::~sc_bit ( )
inline

Definition at line 151 of file sc_bit.hh.

Member Function Documentation

◆ b_not()

sc_bit& sc_dt::sc_bit::b_not ( )
inline

Definition at line 233 of file sc_bit.hh.

References m_val.

◆ invalid_value() [1/2]

void sc_dt::sc_bit::invalid_value ( char  c)
staticprivate

Definition at line 79 of file sc_bit.cc.

References gem5::VegaISA::c, sc_core::sc_abort(), sc_core::SC_ID_VALUE_NOT_VALID_, and SC_REPORT_ERROR.

Referenced by to_value().

◆ invalid_value() [2/2]

void sc_dt::sc_bit::invalid_value ( int  i)
staticprivate

◆ operator bool()

sc_dt::sc_bit::operator bool ( ) const
inline

Definition at line 210 of file sc_bit.hh.

References m_val.

◆ operator!()

bool sc_dt::sc_bit::operator! ( ) const
inline

Definition at line 213 of file sc_bit.hh.

References m_val.

◆ operator&=()

sc_bit& sc_dt::sc_bit::operator&= ( const sc_bit b)
inline

Definition at line 179 of file sc_bit.hh.

References gem5::ArmISA::b, and m_val.

◆ operator=() [1/2]

sc_bit& sc_dt::sc_bit::operator= ( const sc_bit b)
inline

Definition at line 156 of file sc_bit.hh.

References gem5::ArmISA::b, and m_val.

◆ operator=() [2/2]

sc_bit & sc_dt::sc_bit::operator= ( const sc_logic b)

Definition at line 104 of file sc_bit.cc.

References gem5::ArmISA::b, and sc_bit().

◆ operator^=()

sc_bit& sc_dt::sc_bit::operator^= ( const sc_bit b)
inline

Definition at line 193 of file sc_bit.hh.

References gem5::ArmISA::b, and m_val.

◆ operator|=()

sc_bit& sc_dt::sc_bit::operator|= ( const sc_bit b)
inline

Definition at line 186 of file sc_bit.hh.

References gem5::ArmISA::b, and m_val.

◆ print()

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

Definition at line 245 of file sc_bit.hh.

References gem5::X86ISA::os, and to_bool().

◆ scan()

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

Definition at line 111 of file sc_bit.cc.

References gem5::ArmISA::b, and gem5::MipsISA::is.

◆ to_bool()

bool sc_dt::sc_bit::to_bool ( ) const
inline

Definition at line 217 of file sc_bit.hh.

References m_val.

Referenced by print().

◆ to_char()

char sc_dt::sc_bit::to_char ( ) const
inline

Definition at line 218 of file sc_bit.hh.

References m_val.

◆ to_value() [1/3]

static bool sc_dt::sc_bit::to_value ( bool  b)
inlinestaticprivate

Definition at line 111 of file sc_bit.hh.

References gem5::ArmISA::b.

◆ to_value() [2/3]

static bool sc_dt::sc_bit::to_value ( char  c)
inlinestaticprivate

Definition at line 95 of file sc_bit.hh.

References gem5::VegaISA::c, and invalid_value().

◆ to_value() [3/3]

static bool sc_dt::sc_bit::to_value ( int  i)
inlinestaticprivate

Definition at line 104 of file sc_bit.hh.

References gem5::ArmISA::i, and invalid_value().

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 272 of file sc_bit.hh.

◆ operator&

const sc_bit operator& ( const sc_bit a,
const sc_bit b 
)
friend

Definition at line 306 of file sc_bit.hh.

◆ operator==

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

Definition at line 266 of file sc_bit.hh.

◆ operator^

const sc_bit operator^ ( const sc_bit a,
const sc_bit b 
)
friend

Definition at line 318 of file sc_bit.hh.

◆ operator|

const sc_bit operator| ( const sc_bit a,
const sc_bit b 
)
friend

Definition at line 312 of file sc_bit.hh.

◆ operator~

const sc_bit operator~ ( const sc_bit a)
friend

Definition at line 295 of file sc_bit.hh.

Member Data Documentation

◆ m_val

bool sc_dt::sc_bit::m_val
private

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

Generated on Wed Dec 21 2022 10:25:08 for gem5 by doxygen 1.9.1