Go to the documentation of this file.
62 #ifndef __SYSTEMC_EXT_DT_BIT_SC_LOGIC_HH__
63 #define __SYSTEMC_EXT_DT_BIT_SC_LOGIC_HH__
68 #include "../sc_mempool.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);
352 inline ::std::ostream &
359 inline ::std::istream &
381 #endif // __SYSTEMC_EXT_DT_BIT_SC_LOGIC_HH__
sc_signed operator|(const sc_unsigned &u, const sc_int_base &v)
friend bool operator!=(const sc_logic &, const sc_logic &)
static const char logic_to_char[4]
static const sc_logic_value_t and_table[4][4]
static void * allocate(std::size_t sz)
sc_logic_value_t value() const
sc_signed operator<<(const sc_signed &u, const sc_int_base &v)
const sc_logic sc_logic_0(Log_0)
sc_signed operator^(const sc_unsigned &u, const sc_int_base &v)
sc_logic & operator=(const sc_logic &a)
static void invalid_value(sc_logic_value_t)
const sc_logic sc_logic_Z(Log_Z)
static const sc_logic_value_t char_to_logic[128]
void scan(::std::istream &is=::std::cin)
const sc_logic operator~() const
const friend sc_logic operator&(const sc_logic &, const sc_logic &)
const sc_logic SC_LOGIC_X(Log_X)
static const sc_logic_value_t or_table[4][4]
bool operator!=(const sc_signed &u, const sc_int_base &v)
const sc_logic SC_LOGIC_0(Log_0)
const friend sc_logic operator^(const sc_logic &, const sc_logic &)
const sc_logic SC_LOGIC_Z(Log_Z)
sc_logic & operator|=(const sc_logic &b)
sc_signed operator>>(const sc_signed &u, const sc_int_base &v)
void print(::std::ostream &os=::std::cout) const
static void release(void *p, std::size_t sz)
const sc_logic sc_logic_1(Log_1)
sc_logic & operator&=(const sc_logic &b)
static const sc_logic_value_t xor_table[4][4]
static sc_logic_value_t to_value(sc_logic_value_t v)
const friend sc_logic operator|(const sc_logic &, const sc_logic &)
sc_logic & operator^=(const sc_logic &b)
#define DEFN_BIN_OP(ret, op)
static const sc_logic_value_t not_table[4]
const sc_logic sc_logic_X(Log_X)
const sc_logic SC_LOGIC_1(Log_1)
sc_signed operator&(const sc_unsigned &u, const sc_int_base &v)
friend bool operator==(const sc_logic &, const sc_logic &)
Generated on Wed Sep 30 2020 14:02:15 for gem5 by doxygen 1.8.17