SystemC 3.0.0
Accellera SystemC proof-of-concept library
Namespaces | Macros | Enumerations | Functions | Variables
sc_fxdefs.h File Reference
#include "sysc/kernel/sc_cmnhdr.h"
#include "sysc/utils/sc_machine.h"
#include "sysc/datatypes/fx/sc_fx_ids.h"
#include "sysc/datatypes/int/sc_nbutils.h"
Include dependency graph for sc_fxdefs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  sc_dt
 

Macros

#define SC_ERROR_IF_IMPL_(cnd, id, msg)
 
#define SC_ASSERT_(cnd, msg)   (void(0))
 
#define SC_ERROR_IF_(cnd, id)    SC_ERROR_IF_IMPL_( cnd, id, 0 )
 
#define SC_CHECK_WL_(wl)    SC_ERROR_IF_( (wl) <= 0, sc_core::SC_ID_INVALID_WL_ )
 
#define SC_CHECK_N_BITS_(n_bits)    SC_ERROR_IF_( (n_bits) < 0, sc_core::SC_ID_INVALID_N_BITS_ )
 
#define SC_CHECK_DIV_WL_(div_wl)    SC_ERROR_IF_( (div_wl) <= 0, sc_core::SC_ID_INVALID_DIV_WL_ )
 
#define SC_CHECK_CTE_WL_(cte_wl)    SC_ERROR_IF_( (cte_wl) <= 0, sc_core::SC_ID_INVALID_CTE_WL_ )
 
#define SC_CHECK_MAX_WL_(max_wl)
 
#define SC_OBSERVER_(object, observer_type, event)
 
#define SC_OBSERVER_DEFAULT_(observer_type)
 

Enumerations

enum  sc_dt::sc_enc { sc_dt::SC_TC_ , sc_dt::SC_US_ }
 
enum  sc_dt::sc_q_mode {
  sc_dt::SC_RND , sc_dt::SC_RND_ZERO , sc_dt::SC_RND_MIN_INF , sc_dt::SC_RND_INF ,
  sc_dt::SC_RND_CONV , sc_dt::SC_TRN , sc_dt::SC_TRN_ZERO
}
 
enum  sc_dt::sc_o_mode {
  sc_dt::SC_SAT , sc_dt::SC_SAT_ZERO , sc_dt::SC_SAT_SYM , sc_dt::SC_WRAP ,
  sc_dt::SC_WRAP_SM
}
 
enum  sc_dt::sc_switch { sc_dt::SC_OFF , sc_dt::SC_ON }
 
enum  sc_dt::sc_fmt { sc_dt::SC_F , sc_dt::SC_E }
 

Functions

SC_API std::string sc_dt::to_string (sc_enc)
 
inline::std::ostream & sc_dt::operator<< (::std::ostream &os, sc_enc enc)
 
SC_API std::string sc_dt::to_string (sc_q_mode)
 
inline::std::ostream & sc_dt::operator<< (::std::ostream &os, sc_q_mode q_mode)
 
SC_API std::string sc_dt::to_string (sc_o_mode)
 
inline::std::ostream & sc_dt::operator<< (::std::ostream &os, sc_o_mode o_mode)
 
SC_API std::string sc_dt::to_string (sc_switch)
 
inline::std::ostream & sc_dt::operator<< (::std::ostream &os, sc_switch sw)
 
SC_API std::string sc_dt::to_string (sc_fmt)
 
inline::std::ostream & sc_dt::operator<< (::std::ostream &os, sc_fmt fmt)
 

Variables

const int sc_dt::SC_BUILTIN_WL_ = 32
 
const int sc_dt::SC_BUILTIN_IWL_ = 32
 
const sc_q_mode sc_dt::SC_BUILTIN_Q_MODE_ = SC_TRN
 
const sc_o_mode sc_dt::SC_BUILTIN_O_MODE_ = SC_WRAP
 
const int sc_dt::SC_BUILTIN_N_BITS_ = 0
 
const int sc_dt::SC_DEFAULT_WL_ = SC_BUILTIN_WL_
 
const int sc_dt::SC_DEFAULT_IWL_ = SC_BUILTIN_IWL_
 
const sc_q_mode sc_dt::SC_DEFAULT_Q_MODE_ = SC_BUILTIN_Q_MODE_
 
const sc_o_mode sc_dt::SC_DEFAULT_O_MODE_ = SC_BUILTIN_O_MODE_
 
const int sc_dt::SC_DEFAULT_N_BITS_ = SC_BUILTIN_N_BITS_
 
const sc_switch sc_dt::SC_BUILTIN_CAST_SWITCH_ = SC_ON
 
const sc_switch sc_dt::SC_DEFAULT_CAST_SWITCH_ = SC_BUILTIN_CAST_SWITCH_
 
const int sc_dt::SC_BUILTIN_DIV_WL_ = 64
 
const int sc_dt::SC_BUILTIN_CTE_WL_ = 64
 
const int sc_dt::SC_BUILTIN_MAX_WL_ = 1024
 
const int sc_dt::SC_DEFAULT_DIV_WL_ = SC_BUILTIN_DIV_WL_
 
const int sc_dt::SC_DEFAULT_CTE_WL_ = SC_BUILTIN_CTE_WL_
 
const int sc_dt::SC_DEFAULT_MAX_WL_ = SC_BUILTIN_MAX_WL_
 

Macro Definition Documentation

◆ SC_ASSERT_

#define SC_ASSERT_ (   cnd,
  msg 
)    (void(0))

Definition at line 262 of file sc_fxdefs.h.

◆ SC_CHECK_CTE_WL_

#define SC_CHECK_CTE_WL_ (   cte_wl)     SC_ERROR_IF_( (cte_wl) <= 0, sc_core::SC_ID_INVALID_CTE_WL_ )

Definition at line 277 of file sc_fxdefs.h.

◆ SC_CHECK_DIV_WL_

#define SC_CHECK_DIV_WL_ (   div_wl)     SC_ERROR_IF_( (div_wl) <= 0, sc_core::SC_ID_INVALID_DIV_WL_ )

Definition at line 274 of file sc_fxdefs.h.

◆ SC_CHECK_MAX_WL_

#define SC_CHECK_MAX_WL_ (   max_wl)
Value:
SC_ERROR_IF_( (max_wl) <= 0 && (max_wl) != -1, \
#define SC_ERROR_IF_(cnd, id)
Definition: sc_fxdefs.h:265
const char SC_ID_INVALID_MAX_WL_[]

Definition at line 280 of file sc_fxdefs.h.

◆ SC_CHECK_N_BITS_

#define SC_CHECK_N_BITS_ (   n_bits)     SC_ERROR_IF_( (n_bits) < 0, sc_core::SC_ID_INVALID_N_BITS_ )

Definition at line 271 of file sc_fxdefs.h.

◆ SC_CHECK_WL_

#define SC_CHECK_WL_ (   wl)     SC_ERROR_IF_( (wl) <= 0, sc_core::SC_ID_INVALID_WL_ )

Definition at line 268 of file sc_fxdefs.h.

◆ SC_ERROR_IF_

#define SC_ERROR_IF_ (   cnd,
  id 
)     SC_ERROR_IF_IMPL_( cnd, id, 0 )

Definition at line 265 of file sc_fxdefs.h.

◆ SC_ERROR_IF_IMPL_

#define SC_ERROR_IF_IMPL_ (   cnd,
  id,
  msg 
)
Value:
do { \
if( cnd ) { \
SC_REPORT_ERROR( id, msg ); \
sc_core::sc_abort(); /* can't recover from here */ \
} \
} while( false )
SC_API void sc_abort()

Definition at line 250 of file sc_fxdefs.h.

◆ SC_OBSERVER_

#define SC_OBSERVER_ (   object,
  observer_type,
  event 
)
Value:
{ \
if( (object).observer() != 0 ) \
{ \
observer_type observer = (object).lock_observer(); \
observer->event( (object) ); \
(object).unlock_observer( observer ); \
} \
}

Definition at line 289 of file sc_fxdefs.h.

◆ SC_OBSERVER_DEFAULT_

#define SC_OBSERVER_DEFAULT_ (   observer_type)
Value:
{ \
if( m_observer == 0 && observer_type::default_observer != 0 ) \
m_observer = (*observer_type::default_observer)(); \
}

Definition at line 299 of file sc_fxdefs.h.