SystemC 3.0.0
Accellera SystemC proof-of-concept library
Namespaces | Macros | Functions
sc_macros.h File Reference
#include "sysc/kernel/sc_cmnhdr.h"
Include dependency graph for sc_macros.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_STRINGIFY_HELPER_(Arg)    SC_STRINGIFY_HELPER_DEFERRED_( Arg )
 
#define SC_STRINGIFY_HELPER_DEFERRED_(Arg)    SC_STRINGIFY_HELPER_MORE_DEFERRED_( Arg )
 
#define SC_STRINGIFY_HELPER_MORE_DEFERRED_(Arg)    #Arg
 
#define SC_CONCAT_HELPER_(a, b)    SC_CONCAT_HELPER_DEFERRED_( a, b )
 
#define SC_CONCAT_HELPER_DEFERRED_(a, b)    SC_CONCAT_HELPER_MORE_DEFERRED_( a,b )
 
#define SC_CONCAT_HELPER_MORE_DEFERRED_(a, b)    a ## b
 
#define SC_CONCAT_UNDERSCORE_(a, b)    SC_CONCAT_HELPER_( a, SC_CONCAT_HELPER_( _, b ) )
 
#define SC_EXPAND_HELPER_(x)   x
 
#define SC_WAIT()
 
#define SC_WAITN(n)
 
#define SC_WAIT_UNTIL(expr)    do { SC_WAIT(); } while( !(expr) )
 
#define SC_NAMED(...)    SC_NAMED_IMPL_(__VA_ARGS__)(__VA_ARGS__)
 
#define SC_NAMED_IMPL_ONE_(inst)    inst { SC_STRINGIFY_HELPER_(inst) }
 
#define SC_NAMED_IMPL_MORE_(inst, ...)    inst { SC_STRINGIFY_HELPER_(inst), __VA_ARGS__ }
 
#define SC_NAMED_IMPL_(...)    SC_CONCAT_HELPER_(SC_NAMED_IMPL_, SC_VARARG_HELPER_EXPAND_(__VA_ARGS__))
 
#define SC_VARARG_HELPER_EXPAND_(...)
 
#define SC_VARARG_HELPER_EXPAND_SEQ_(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, N, ...)   N
 

Functions

template<class T >
const T sc_dt::sc_min (const T &a, const T &b)
 
template<class T >
const T sc_dt::sc_max (const T &a, const T &b)
 
template<class T >
const T sc_dt::sc_abs (const T &a)
 

Macro Definition Documentation

◆ SC_CONCAT_HELPER_

#define SC_CONCAT_HELPER_ (   a,
 
)     SC_CONCAT_HELPER_DEFERRED_( a, b )

Definition at line 86 of file sc_macros.h.

◆ SC_CONCAT_HELPER_DEFERRED_

#define SC_CONCAT_HELPER_DEFERRED_ (   a,
 
)     SC_CONCAT_HELPER_MORE_DEFERRED_( a,b )

Definition at line 88 of file sc_macros.h.

◆ SC_CONCAT_HELPER_MORE_DEFERRED_

#define SC_CONCAT_HELPER_MORE_DEFERRED_ (   a,
 
)     a ## b

Definition at line 90 of file sc_macros.h.

◆ SC_CONCAT_UNDERSCORE_

#define SC_CONCAT_UNDERSCORE_ (   a,
 
)     SC_CONCAT_HELPER_( a, SC_CONCAT_HELPER_( _, b ) )

Definition at line 92 of file sc_macros.h.

◆ SC_EXPAND_HELPER_

#define SC_EXPAND_HELPER_ (   x)    x

Definition at line 97 of file sc_macros.h.

◆ SC_NAMED

#define SC_NAMED (   ...)     SC_NAMED_IMPL_(__VA_ARGS__)(__VA_ARGS__)

Definition at line 120 of file sc_macros.h.

◆ SC_NAMED_IMPL_

#define SC_NAMED_IMPL_ (   ...)     SC_CONCAT_HELPER_(SC_NAMED_IMPL_, SC_VARARG_HELPER_EXPAND_(__VA_ARGS__))

Definition at line 128 of file sc_macros.h.

◆ SC_NAMED_IMPL_MORE_

#define SC_NAMED_IMPL_MORE_ (   inst,
  ... 
)     inst { SC_STRINGIFY_HELPER_(inst), __VA_ARGS__ }

Definition at line 125 of file sc_macros.h.

◆ SC_NAMED_IMPL_ONE_

#define SC_NAMED_IMPL_ONE_ (   inst)     inst { SC_STRINGIFY_HELPER_(inst) }

Definition at line 123 of file sc_macros.h.

◆ SC_STRINGIFY_HELPER_

#define SC_STRINGIFY_HELPER_ (   Arg)     SC_STRINGIFY_HELPER_DEFERRED_( Arg )

Definition at line 77 of file sc_macros.h.

◆ SC_STRINGIFY_HELPER_DEFERRED_

#define SC_STRINGIFY_HELPER_DEFERRED_ (   Arg)     SC_STRINGIFY_HELPER_MORE_DEFERRED_( Arg )

Definition at line 79 of file sc_macros.h.

◆ SC_STRINGIFY_HELPER_MORE_DEFERRED_

#define SC_STRINGIFY_HELPER_MORE_DEFERRED_ (   Arg)     #Arg

Definition at line 81 of file sc_macros.h.

◆ SC_VARARG_HELPER_EXPAND_

#define SC_VARARG_HELPER_EXPAND_ (   ...)
Value:
__VA_ARGS__, \
MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,MORE_, \
MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,MORE_, \
MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,MORE_, \
MORE_,MORE_,MORE_,MORE_,MORE_,MORE_,ONE_, FAIL_ ) )
#define SC_VARARG_HELPER_EXPAND_SEQ_(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, N,...)
Definition: sc_macros.h:138
#define SC_EXPAND_HELPER_(x)
Definition: sc_macros.h:97

Definition at line 131 of file sc_macros.h.

◆ SC_VARARG_HELPER_EXPAND_SEQ_

#define SC_VARARG_HELPER_EXPAND_SEQ_ (   _1,
  _2,
  _3,
  _4,
  _5,
  _6,
  _7,
  _8,
  _9,
  _10,
  _11,
  _12,
  _13,
  _14,
  _15,
  _16,
  _17,
  _18,
  _19,
  _20,
  _21,
  _22,
  _23,
  _24,
  _25,
  _26,
  _27,
  _28,
  _29,
  _30,
  _31,
  N,
  ... 
)    N

Definition at line 138 of file sc_macros.h.

◆ SC_WAIT

#define SC_WAIT ( )
Value:
::sc_core::sc_set_location( __FILE__, __LINE__ ); \
SC_API void wait(int, sc_simcontext *)
SC_API void sc_set_location(const char *, int, sc_simcontext *=sc_get_curr_simcontext())

Definition at line 104 of file sc_macros.h.

◆ SC_WAIT_UNTIL

#define SC_WAIT_UNTIL (   expr)     do { SC_WAIT(); } while( !(expr) )

Definition at line 114 of file sc_macros.h.

◆ SC_WAITN

#define SC_WAITN (   n)
Value:

Definition at line 109 of file sc_macros.h.