62#ifndef __SYSTEMC_EXT_DT_BIT_SC_LOGIC_HH__
63#define __SYSTEMC_EXT_DT_BIT_SC_LOGIC_HH__
109 if (v < Log_0 || v >
Log_X) {
122 unsigned int index = (int)
c;
134 if (i < Log_0 || i >
Log_X) {
166#define DEFN_ASN_OP_T(op,tp) \
170 *this op sc_logic(v); \
174#define DEFN_ASN_OP(op) \
175 DEFN_ASN_OP_T(op, sc_logic_value_t) \
176 DEFN_ASN_OP_T(op, bool) \
177 DEFN_ASN_OP_T(op, char) \
178 DEFN_ASN_OP_T(op, int) \
179 DEFN_ASN_OP_T(op, const sc_bit &)
252 void scan(::std::istream &is=::std::cin);
256 static void *
operator new (std::size_t,
void *p) {
return p; }
258 operator new (std::size_t sz)
263 operator delete (
void *p, std::size_t sz)
268 operator new [] (std::size_t sz)
273 operator delete [] (
void *p, std::size_t sz)
308#define DEFN_BIN_OP_T(ret,op,tp) \
310 operator op (const sc_logic &a, tp b) \
312 return (a op sc_logic(b)); \
315 operator op (tp a, const sc_logic &b) \
317 return (sc_logic(a) op b); \
320#define DEFN_BIN_OP(ret, op) \
321 DEFN_BIN_OP_T(ret, op, sc_logic_value_t) \
322 DEFN_BIN_OP_T(ret, op, bool) \
323 DEFN_BIN_OP_T(ret, op, char) \
324 DEFN_BIN_OP_T(ret, op, int)
335 return ((
int)
a.m_val ==
b.m_val);
341 return ((
int)
a.m_val !=
b.m_val);
352inline ::std::ostream &
359inline ::std::istream &
static void release(void *p, std::size_t sz)
static void * allocate(std::size_t sz)
static const sc_logic_value_t and_table[4][4]
sc_logic(const sc_bit &a)
static void invalid_value(sc_logic_value_t)
friend const sc_logic operator&(const sc_logic &, const sc_logic &)
static sc_logic_value_t to_value(sc_logic_value_t v)
static sc_logic_value_t to_value(int i)
static const sc_logic_value_t not_table[4]
friend bool operator!=(const sc_logic &, const sc_logic &)
sc_logic(const sc_logic &a)
friend const sc_logic operator^(const sc_logic &, const sc_logic &)
sc_logic & operator=(const sc_logic &a)
friend const sc_logic operator|(const sc_logic &, const sc_logic &)
sc_logic & operator^=(const sc_logic &b)
void scan(::std::istream &is=::std::cin)
const sc_logic operator~() const
sc_logic & operator|=(const sc_logic &b)
static const char logic_to_char[4]
static sc_logic_value_t to_value(char c)
static const sc_logic_value_t char_to_logic[128]
friend bool operator==(const sc_logic &, const sc_logic &)
sc_logic(sc_logic_value_t v)
static sc_logic_value_t to_value(bool b)
sc_logic & operator&=(const sc_logic &b)
static const sc_logic_value_t xor_table[4][4]
static const sc_logic_value_t or_table[4][4]
void print(::std::ostream &os=::std::cout) const
sc_logic_value_t value() const
const sc_logic SC_LOGIC_0(Log_0)
const sc_logic SC_LOGIC_1(Log_1)
sc_signed operator|(const sc_unsigned &u, const sc_int_base &v)
const sc_logic SC_LOGIC_X(Log_X)
sc_signed operator&(const sc_unsigned &u, const sc_int_base &v)
sc_signed operator^(const sc_unsigned &u, const sc_int_base &v)
const sc_logic sc_logic_0(Log_0)
const sc_logic sc_logic_X(Log_X)
bool operator!=(const sc_signed &u, const sc_int_base &v)
const sc_logic sc_logic_Z(Log_Z)
sc_signed operator<<(const sc_signed &u, const sc_int_base &v)
const sc_logic sc_logic_1(Log_1)
sc_signed operator>>(const sc_signed &u, const sc_int_base &v)
const sc_logic SC_LOGIC_Z(Log_Z)
#define DEFN_BIN_OP(ret, op)