Go to the documentation of this file.
47 #ifndef __SYSTEMC_EXT_DT_FX_SC_FXDEFS_HH__
48 #define __SYSTEMC_EXT_DT_FX_SC_FXDEFS_HH__
50 #include "../../utils/messages.hh"
51 #include "../../utils/sc_report_handler.hh"
52 #include "../int/sc_nbutils.hh"
55 #if ULONG_MAX > 0xffffffffUL
78 inline ::std::ostream &
104 inline ::std::ostream &
130 inline ::std::ostream &
151 inline ::std::ostream &
172 inline ::std::ostream &
213 #if defined(SC_FXDIV_WL) && (SC_FXDIV_WL > 0)
219 #if defined(SC_FXCTE_WL) && (SC_FXCTE_WL > 0)
225 #if defined(SC_FXMAX_WL) && (SC_FXMAX_WL > 0 || SC_FXMAX_WL == -1)
236 #define SC_ERROR_IF_IMPL_(cnd, id, msg) \
239 SC_REPORT_ERROR(id, msg); \
240 sc_core::sc_abort(); \
245 # define SC_ASSERT_(cnd, msg) \
246 SC_ERROR_IF_IMPL_(!(cnd), sc_core::SC_ID_INTERNAL_ERROR_, msg)
248 # define SC_ASSERT_(cnd, msg) (void(0))
251 #define SC_ERROR_IF_(cnd,id) SC_ERROR_IF_IMPL_(cnd, id, 0)
253 #define SC_CHECK_WL_(wl) SC_ERROR_IF_((wl) <= 0, sc_core::SC_ID_INVALID_WL_)
255 #define SC_CHECK_N_BITS_(n_bits) \
256 SC_ERROR_IF_((n_bits) < 0, sc_core::SC_ID_INVALID_N_BITS_)
258 #define SC_CHECK_DIV_WL_(div_wl) \
259 SC_ERROR_IF_((div_wl) <= 0, sc_core::SC_ID_INVALID_DIV_WL_)
261 #define SC_CHECK_CTE_WL_(cte_wl) \
262 SC_ERROR_IF_((cte_wl) <= 0, sc_core::SC_ID_INVALID_CTE_WL_)
264 #define SC_CHECK_MAX_WL_(max_wl) \
265 SC_ERROR_IF_((max_wl) <= 0 && (max_wl) != -1, \
266 sc_core::SC_ID_INVALID_MAX_WL_)
273 #define SC_OBSERVER_(object, observer_type, event) \
275 if ((object).observer() != 0) { \
276 observer_type observer = (object).lock_observer(); \
277 observer->event((object)); \
278 (object).unlock_observer(observer); \
282 #define SC_OBSERVER_DEFAULT_(observer_type) \
284 if (m_observer == 0 && observer_type::default_observer != 0) \
285 m_observer = (*observer_type::default_observer)(); \
290 #endif // __SYSTEMC_EXT_DT_FX_SC_FXDEFS_HH__
const sc_switch SC_BUILTIN_CAST_SWITCH_
const int SC_DEFAULT_DIV_WL_
const int SC_BUILTIN_IWL_
const sc_q_mode SC_BUILTIN_Q_MODE_
const sc_q_mode SC_DEFAULT_Q_MODE_
const std::string to_string(sc_enc enc)
sc_signed operator<<(const sc_signed &u, const sc_int_base &v)
const int SC_DEFAULT_CTE_WL_
const int SC_DEFAULT_IWL_
const int SC_BUILTIN_N_BITS_
const sc_o_mode SC_BUILTIN_O_MODE_
const int SC_DEFAULT_MAX_WL_
const int SC_BUILTIN_CTE_WL_
const sc_o_mode SC_DEFAULT_O_MODE_
const int SC_BUILTIN_MAX_WL_
const int SC_DEFAULT_N_BITS_
const sc_switch SC_DEFAULT_CAST_SWITCH_
const int SC_BUILTIN_DIV_WL_
Generated on Wed Sep 30 2020 14:02:15 for gem5 by doxygen 1.8.17