All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations
sir_common.h File Reference
#include <cvmx.h>
Include dependency graph for sir_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TDoubleID
 
struct  T5Tuple
 

Macros

#define SIR_MOD232_EQ(a, b)   ((a)==(b))
 
#define SIR_MOD232_LT(a, b)   ((int)((a)-(b)) < 0 )
 
#define SIR_MOD232_LEQ(a, b)   ((int)((a)-(b)) <= 0)
 
#define SIR_MOD232_GT(a, b)   ((int)((a)-(b)) > 0 )
 
#define SIR_MOD232_GEQ(a, b)   ((int)((a)-(b)) >= 0)
 
#define SIR_MOD232_SUB(a, b)   ({ uint32_t ret=(uint32_t)((long)((a)-(b))); ret;})
 
#define SIR_MOD232_ADD(a, b)   ({ uint32_t ret=(uint32_t)((a)+(b)); ret;})
 
#define SIR_MOD232_MIN(a, b)   ((SIR_MOD232_LT(a,b)) ? (a):(b))
 
#define SIR_MOD232_MAX(a, b)   ((SIR_MOD232_GT(a,b)) ? (a):(b))
 
#define SIR_COMMON_DEBUG_MSG(lvl, format, args...)   ;
 
#define sirius_panic(...)
 
#define SIRIUS_ASSERT(exp, msg)
 

Enumerations

enum  EDebugLevel {
  SIR_CRITILCAL_DEBUG_LEVEL = 1, SIR_ERROR_DEBUG_LEVEL = 2, SIR_WARNING_DEBUG_LEVEL = 3, SIR_INFO_LEVEL_3 = 4,
  SIR_INFO_LEVEL_2 = 5, SIR_INFO_LEVEL_1 = 6, SIR_MAX_DEBUG_LEVEL
}
 

Macro Definition Documentation

#define SIR_COMMON_DEBUG_MSG (   lvl,
  format,
  args... 
)    ;

Definition at line 68 of file sir_common.h.

#define SIR_MOD232_ADD (   a,
 
)    ({ uint32_t ret=(uint32_t)((a)+(b)); ret;})

Definition at line 37 of file sir_common.h.

#define SIR_MOD232_EQ (   a,
 
)    ((a)==(b))

Definition at line 29 of file sir_common.h.

#define SIR_MOD232_GEQ (   a,
 
)    ((int)((a)-(b)) >= 0)

Definition at line 34 of file sir_common.h.

#define SIR_MOD232_GT (   a,
 
)    ((int)((a)-(b)) > 0 )

Definition at line 33 of file sir_common.h.

#define SIR_MOD232_LEQ (   a,
 
)    ((int)((a)-(b)) <= 0)

Definition at line 32 of file sir_common.h.

#define SIR_MOD232_LT (   a,
 
)    ((int)((a)-(b)) < 0 )

Definition at line 31 of file sir_common.h.

#define SIR_MOD232_MAX (   a,
 
)    ((SIR_MOD232_GT(a,b)) ? (a):(b))

Definition at line 40 of file sir_common.h.

#define SIR_MOD232_MIN (   a,
 
)    ((SIR_MOD232_LT(a,b)) ? (a):(b))

Definition at line 39 of file sir_common.h.

#define SIR_MOD232_SUB (   a,
 
)    ({ uint32_t ret=(uint32_t)((long)((a)-(b))); ret;})

Definition at line 36 of file sir_common.h.

#define SIRIUS_ASSERT (   exp,
  msg 
)
Value:
{ \
if(!(exp)) sirius_panic msg; \
}
#define sirius_panic(...)
Definition: sir_common.h:71

Definition at line 77 of file sir_common.h.

#define sirius_panic (   ...)
Value:
{ \
printf("SIRIUS_PANIC:" __VA_ARGS__); \
exit(-1); \
}

Definition at line 71 of file sir_common.h.

Enumeration Type Documentation

Enumerator
SIR_CRITILCAL_DEBUG_LEVEL 
SIR_ERROR_DEBUG_LEVEL 
SIR_WARNING_DEBUG_LEVEL 
SIR_INFO_LEVEL_3 
SIR_INFO_LEVEL_2 
SIR_INFO_LEVEL_1 
SIR_MAX_DEBUG_LEVEL 

Definition at line 17 of file sir_common.h.