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

#include <sc_logic.hh>

Public Member Functions

 sc_logic ()
 
 sc_logic (const sc_logic &a)
 
 sc_logic (sc_logic_value_t v)
 
 sc_logic (bool a)
 
 sc_logic (char a)
 
 sc_logic (int a)
 
 sc_logic (const sc_bit &a)
 
 ~sc_logic ()
 
sc_logicoperator= (const sc_logic &a)
 
sc_logicoperator&= (const sc_logic &b)
 
sc_logicoperator|= (const sc_logic &b)
 
sc_logicoperator^= (const sc_logic &b)
 
const sc_logic operator~ () const
 
sc_logicb_not ()
 
sc_logic_value_t value () const
 
bool is_01 () const
 
bool to_bool () const
 
char to_char () const
 
void print (::std::ostream &os=::std::cout) const
 
void scan (::std::istream &is=::std::cin)
 

Static Public Member Functions

static void * operator new (std::size_t, void *p)
 
static void * operator new (std::size_t sz)
 
static void operator delete (void *p, std::size_t sz)
 
static void * operator new[] (std::size_t sz)
 
static void operator delete[] (void *p, std::size_t sz)
 

Static Public Attributes

static const sc_logic_value_t char_to_logic [128]
 
static const char logic_to_char [4] = { '0', '1', 'Z', 'X' }
 
static const sc_logic_value_t and_table [4][4]
 
static const sc_logic_value_t or_table [4][4]
 
static const sc_logic_value_t xor_table [4][4]
 
static const sc_logic_value_t not_table [4]
 

Private Member Functions

void invalid_01 () const
 
 sc_logic (const char *)
 
sc_logicoperator= (const char *)
 

Static Private Member Functions

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

Private Attributes

sc_logic_value_t m_val
 

Friends

const friend sc_logic operator& (const sc_logic &, const sc_logic &)
 
const friend sc_logic operator| (const sc_logic &, const sc_logic &)
 
const friend sc_logic operator^ (const sc_logic &, const sc_logic &)
 
bool operator== (const sc_logic &, const sc_logic &)
 
bool operator!= (const sc_logic &, const sc_logic &)
 

Detailed Description

Definition at line 130 of file sc_logic.hh.

Constructor & Destructor Documentation

◆ sc_logic() [1/8]

sc_dt::sc_logic::sc_logic ( )
inline

Definition at line 186 of file sc_logic.hh.

◆ sc_logic() [2/8]

sc_dt::sc_logic::sc_logic ( const sc_logic a)
inline

Definition at line 187 of file sc_logic.hh.

◆ sc_logic() [3/8]

sc_dt::sc_logic::sc_logic ( sc_logic_value_t  v)
inline

Definition at line 188 of file sc_logic.hh.

◆ sc_logic() [4/8]

sc_dt::sc_logic::sc_logic ( bool  a)
inlineexplicit

Definition at line 189 of file sc_logic.hh.

◆ sc_logic() [5/8]

sc_dt::sc_logic::sc_logic ( char  a)
inlineexplicit

Definition at line 190 of file sc_logic.hh.

◆ sc_logic() [6/8]

sc_dt::sc_logic::sc_logic ( int  a)
inlineexplicit

Definition at line 191 of file sc_logic.hh.

◆ sc_logic() [7/8]

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

Definition at line 192 of file sc_logic.hh.

◆ ~sc_logic()

sc_dt::sc_logic::~sc_logic ( )
inline

Definition at line 195 of file sc_logic.hh.

◆ sc_logic() [8/8]

sc_dt::sc_logic::sc_logic ( const char *  )
explicitprivate

Member Function Documentation

◆ b_not()

sc_logic& sc_dt::sc_logic::b_not ( )
inline

Definition at line 261 of file sc_logic.hh.

◆ invalid_01()

void sc_dt::sc_logic::invalid_01 ( ) const
private

Definition at line 121 of file sc_logic.cc.

References sc_dt::Log_0.

◆ invalid_value() [1/3]

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

Definition at line 104 of file sc_logic.cc.

◆ invalid_value() [2/3]

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

Definition at line 112 of file sc_logic.cc.

◆ invalid_value() [3/3]

void sc_dt::sc_logic::invalid_value ( sc_logic_value_t  v)
staticprivate

Definition at line 98 of file sc_logic.cc.

References sc_dt::Log_0, sc_dt::Log_1, sc_dt::Log_X, and sc_dt::Log_Z.

◆ is_01()

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

Definition at line 270 of file sc_logic.hh.

◆ operator delete()

static void sc_dt::sc_logic::operator delete ( void *  p,
std::size_t  sz 
)
inlinestatic

Definition at line 295 of file sc_logic.hh.

References gem5::ArmISA::a, gem5::ArmISA::b, and or_table.

◆ operator delete[]()

static void sc_dt::sc_logic::operator delete[] ( void *  p,
std::size_t  sz 
)
inlinestatic

Definition at line 305 of file sc_logic.hh.

◆ operator new() [1/2]

static void* sc_dt::sc_logic::operator new ( std::size_t  sz)
inlinestatic

Definition at line 290 of file sc_logic.hh.

References gem5::ArmISA::a, and_table, and gem5::ArmISA::b.

◆ operator new() [2/2]

static void* sc_dt::sc_logic::operator new ( std::size_t  ,
void *  p 
)
inlinestatic

Definition at line 288 of file sc_logic.hh.

◆ operator new[]()

static void* sc_dt::sc_logic::operator new[] ( std::size_t  sz)
inlinestatic

Definition at line 300 of file sc_logic.hh.

◆ operator&=()

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

Definition at line 221 of file sc_logic.hh.

◆ operator=() [1/2]

sc_logic& sc_dt::sc_logic::operator= ( const char *  )
private

◆ operator=() [2/2]

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

Definition at line 214 of file sc_logic.hh.

◆ operator^=()

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

Definition at line 235 of file sc_logic.hh.

References m_val.

◆ operator|=()

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

Definition at line 228 of file sc_logic.hh.

References m_val, and not_table.

◆ operator~()

const sc_logic sc_dt::sc_logic::operator~ ( ) const
inline

Definition at line 259 of file sc_logic.hh.

References sc_core::sc_mempool::allocate().

◆ print()

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

Definition at line 283 of file sc_logic.hh.

◆ scan()

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

Definition at line 179 of file sc_logic.cc.

◆ to_bool()

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

◆ to_char()

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

Definition at line 280 of file sc_logic.hh.

◆ to_value() [1/4]

static sc_logic_value_t sc_dt::sc_logic::to_value ( bool  b)
inlinestaticprivate

Definition at line 149 of file sc_logic.hh.

◆ to_value() [2/4]

static sc_logic_value_t sc_dt::sc_logic::to_value ( char  c)
inlinestaticprivate

Definition at line 152 of file sc_logic.hh.

◆ to_value() [3/4]

static sc_logic_value_t sc_dt::sc_logic::to_value ( int  i)
inlinestaticprivate

Definition at line 164 of file sc_logic.hh.

◆ to_value() [4/4]

static sc_logic_value_t sc_dt::sc_logic::to_value ( sc_logic_value_t  v)
inlinestaticprivate

Definition at line 139 of file sc_logic.hh.

◆ value()

sc_logic_value_t sc_dt::sc_logic::value ( ) const
inline

Definition at line 268 of file sc_logic.hh.

Referenced by sc_core::sc_signal_resolved::update().

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 371 of file sc_logic.hh.

◆ operator&

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

Definition at line 323 of file sc_logic.hh.

◆ operator==

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

Definition at line 365 of file sc_logic.hh.

◆ operator^

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

Definition at line 335 of file sc_logic.hh.

◆ operator|

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

Definition at line 329 of file sc_logic.hh.

Member Data Documentation

◆ and_table

const sc_logic_value_t sc_dt::sc_logic::and_table
static
Initial value:

Definition at line 180 of file sc_logic.hh.

Referenced by operator new(), and sc_dt::sc_bitref< X >::operator=().

◆ char_to_logic

const sc_logic_value_t sc_dt::sc_logic::char_to_logic
static

◆ logic_to_char

const char sc_dt::sc_logic::logic_to_char = { '0', '1', 'Z', 'X' }
static

Definition at line 179 of file sc_logic.hh.

Referenced by sc_dt::operator!=().

◆ m_val

sc_logic_value_t sc_dt::sc_logic::m_val
private

Definition at line 311 of file sc_logic.hh.

Referenced by operator^=(), and operator|=().

◆ not_table

const sc_logic_value_t sc_dt::sc_logic::not_table
static

◆ or_table

const sc_logic_value_t sc_dt::sc_logic::or_table
static
Initial value:

Definition at line 181 of file sc_logic.hh.

Referenced by operator delete().

◆ xor_table

const sc_logic_value_t sc_dt::sc_logic::xor_table
static
Initial value:

Definition at line 182 of file sc_logic.hh.


The documentation for this class was generated from the following files:
sc_dt::Log_Z
@ Log_Z
Definition: sc_logic.hh:120
sc_dt::Log_X
@ Log_X
Definition: sc_logic.hh:121
sc_dt::Log_0
@ Log_0
Definition: sc_logic.hh:118
sc_dt::Log_1
@ Log_1
Definition: sc_logic.hh:119

Generated on Thu Jul 28 2022 13:35:03 for gem5 by doxygen 1.8.17