SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_logic.h File Reference

C++ implementation of logic type. Behaves. More...

#include <cstdio>
#include "sysc/kernel/sc_cmnhdr.h"
#include "sysc/kernel/sc_macros.h"
#include "sysc/utils/sc_mempool.h"
#include "sysc/datatypes/bit/sc_bit.h"
Include dependency graph for sc_logic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sc_dt::sc_logic
 Four-valued logic type. More...
 

Namespaces

 sc_dt
 

Macros

#define DEFN_ASN_OP_T(op, tp)
 
#define DEFN_ASN_OP(op)
 
#define DEFN_BIN_OP_T(ret, op, tp)
 
#define DEFN_BIN_OP(ret, op)
 

Enumerations

enum  sc_dt::sc_logic_value_t { sc_dt::Log_0 = 0, sc_dt::Log_1, sc_dt::Log_Z, sc_dt::Log_X }
 Enumeration of values for sc_logic. More...
 

Functions

const sc_logic sc_dt::operator& (const sc_logic &a, const sc_logic &b)
 
const sc_logic sc_dt::operator| (const sc_logic &a, const sc_logic &b)
 
const sc_logic sc_dt::operator^ (const sc_logic &a, const sc_logic &b)
 
bool sc_dt::operator== (const sc_logic &a, const sc_logic &b)
 
bool sc_dt::operator!= (const sc_logic &a, const sc_logic &b)
 
inline ::std::ostream & sc_dt::operator<< (::std::ostream &os, const sc_logic &a)
 
inline ::std::istream & sc_dt::operator>> (::std::istream &is, sc_logic &a)
 

Variables

SC_API const sc_logic sc_dt::SC_LOGIC_0
 
SC_API const sc_logic sc_dt::SC_LOGIC_1
 
SC_API const sc_logic sc_dt::SC_LOGIC_Z
 
SC_API const sc_logic sc_dt::SC_LOGIC_X
 
SC_API const sc_logic sc_dt::sc_logic_0
 
SC_API const sc_logic sc_dt::sc_logic_1
 
SC_API const sc_logic sc_dt::sc_logic_Z
 
SC_API const sc_logic sc_dt::sc_logic_X
 

Detailed Description

C++ implementation of logic type. Behaves.

pretty much the same way as HDLs except with 4 values.

Original Author: Stan Y. Liao, Synopsys, Inc.

Definition in file sc_logic.h.

Macro Definition Documentation

◆ DEFN_ASN_OP

#define DEFN_ASN_OP (   op)
Value:
DEFN_ASN_OP_T(op, bool) \
DEFN_ASN_OP_T(op, char) \
DEFN_ASN_OP_T(op, int ) \
DEFN_ASN_OP_T(op, const sc_bit& )
sc_logic_value_t
Enumeration of values for sc_logic.
Definition: sc_logic.h:90
#define DEFN_ASN_OP_T(op, tp)
Definition: sc_logic.h:203

Definition at line 207 of file sc_logic.h.

◆ DEFN_ASN_OP_T

#define DEFN_ASN_OP_T (   op,
  tp 
)
Value:
sc_logic& operator op ( tp v ) \
{ *this op sc_logic( v ); return *this; }
class SC_API sc_logic
Definition: sc_signal_ifs.h:43

Definition at line 203 of file sc_logic.h.

◆ DEFN_BIN_OP

#define DEFN_BIN_OP (   ret,
  op 
)
Value:
DEFN_BIN_OP_T(ret,op,bool) \
DEFN_BIN_OP_T(ret,op,char) \
DEFN_BIN_OP_T(ret,op,int)
sc_logic_value_t
Enumeration of values for sc_logic.
Definition: sc_logic.h:90
#define DEFN_BIN_OP_T(ret, op, tp)
Definition: sc_logic.h:319

Definition at line 325 of file sc_logic.h.

◆ DEFN_BIN_OP_T

#define DEFN_BIN_OP_T (   ret,
  op,
  tp 
)
Value:
inline ret operator op ( const sc_logic& a, tp b ) \
{ return ( a op sc_logic( b ) ); } \
inline ret operator op ( tp a, const sc_logic& b ) \
{ return ( sc_logic( a ) op b ); }
uint64 const sc_uint_base int b
Definition: sc_fxval.h:1005
class SC_API sc_logic
Definition: sc_signal_ifs.h:43

Definition at line 319 of file sc_logic.h.