Lines Matching defs:sc_logic
22 sc_logic.h -- C++ implementation of logic type. Behaves
39 // $Log: sc_logic.h,v $
75 class sc_logic;
81 // Enumeration of values for sc_logic.
93 // CLASS : sc_logic
98 class sc_logic
154 sc_logic() : m_val(Log_X) {}
155 sc_logic(const sc_logic &a) : m_val(a.m_val) {}
156 sc_logic(sc_logic_value_t v) : m_val(to_value(v)) {}
157 explicit sc_logic(bool a) : m_val(to_value(a)) {}
158 explicit sc_logic(char a) : m_val(to_value(a)) {}
159 explicit sc_logic(int a) : m_val(to_value(a)) {}
160 explicit sc_logic(const sc_bit &a) : m_val(to_value(a.to_bool())) {}
163 ~sc_logic() {}
167 sc_logic & \
170 *this op sc_logic(v); \
181 sc_logic &
182 operator = (const sc_logic &a)
188 sc_logic &
189 operator &= (const sc_logic &b)
195 sc_logic &
196 operator |= (const sc_logic &b)
202 sc_logic &
203 operator ^= (const sc_logic &b)
218 friend const sc_logic operator & (const sc_logic &, const sc_logic &);
219 friend const sc_logic operator | (const sc_logic &, const sc_logic &);
220 friend const sc_logic operator ^ (const sc_logic &, const sc_logic &);
223 friend bool operator == (const sc_logic &, const sc_logic &);
224 friend bool operator != (const sc_logic &, const sc_logic &);
227 const sc_logic operator ~ () const { return sc_logic(not_table[m_val]); }
228 sc_logic &
283 explicit sc_logic(const char *);
284 sc_logic &operator = (const char *);
290 inline const sc_logic
291 operator & (const sc_logic &a, const sc_logic &b)
293 return sc_logic(sc_logic::and_table[a.m_val][b.m_val]);
296 inline const sc_logic
297 operator | (const sc_logic &a, const sc_logic &b)
299 return sc_logic(sc_logic::or_table[a.m_val][b.m_val]);
302 inline const sc_logic
303 operator ^ (const sc_logic &a, const sc_logic &b)
305 return sc_logic(sc_logic::xor_table[a.m_val][b.m_val]);
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); \
326 DEFN_BIN_OP(const sc_logic, &)
327 DEFN_BIN_OP(const sc_logic, |)
328 DEFN_BIN_OP(const sc_logic, ^)
333 operator == (const sc_logic &a, const sc_logic &b)
339 operator != (const sc_logic &a, const sc_logic &b)
353 operator << (::std::ostream &os, const sc_logic &a)
360 operator >> (::std::istream &is, sc_logic &a)
367 extern const sc_logic SC_LOGIC_0;
368 extern const sc_logic SC_LOGIC_1;
369 extern const sc_logic SC_LOGIC_Z;
370 extern const sc_logic SC_LOGIC_X;
373 extern const sc_logic sc_logic_0;
374 extern const sc_logic sc_logic_1;
375 extern const sc_logic sc_logic_Z;
376 extern const sc_logic sc_logic_X;