INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
|
Some miscellaneus tools & definitions. More...
Go to the source code of this file.
Defines | |
#define | ztm(m) (long) (m * ( (1.0*rand() ) / (RAND_MAX+1.0))) |
#define | abs(m) ((m<0) ? (-m) : (m)) |
#define | sign(x) (x<0 ? -1 : 1) |
#define | P_NULL (-1) |
Definition of a NULL value. | |
#define | max(a, b) (((a) > (b)) ? (a) : (b)) |
#define | min(a, b) (((a) > (b)) ? (b) : (a)) |
#define | mod(a, b) ((((a)%(b)) < 0 ) ? ((a)%(b)) + (b) : ((a)%(b)) ) |
Typedefs | |
typedef enum bool_t | bool_t |
typedef enum topo_t | topo_t |
typedef enum vc_management_t | vc_management_t |
typedef enum traffic_pattern_t | traffic_pattern_t |
typedef enum cons_mode_t | cons_mode_t |
typedef enum routing_t | routing_t |
typedef enum req_mode_t | req_mode_t |
typedef enum arb_mode_t | arb_mode_t |
typedef enum inj_mode_t | inj_mode_t |
typedef enum placement_t | placement_t |
typedef enum source_t | source_t |
Enumerations | |
enum | bool_t { FALSE = 0, TRUE = 1 } |
enum | topo_t { TORUS, MESH, MIDIMEW, TWISTED, DIRECT, ICUBE, CUBE, FATTREE, SLIMTREE, THINTREE, INDIRECT, FILEDEF } |
enum | vc_management_t { BUBBLE_MANAGEMENT, DALLY_MANAGEMENT, DOUBLE_MANAGEMENT, TREE_MANAGEMENT, ICUBE_MANAGEMENT } |
enum | traffic_pattern_t { UNIFORM, LOCAL, SEMI, HOTREGION, DISTRIBUTE, RSDIST, TRANSPOSE, TORNADO, COMPLEMENT, BUTTERFLY, SHUFFLE, REVERSAL, TRACE, POPULATION, HISTOGRAM, HOTSPOT } |
enum | cons_mode_t { SINGLE_CONS, MULTIPLE_CONS } |
enum | routing_t { DIMENSION_ORDER_ROUTING, DIRECTION_ORDER_ROUTING, CUBE_ROUTING, STATIC_ROUTING, ADAPTIVE_ROUTING, IC_1M_ROUTING, IC_4M_ROUTING, MULTISTAGE_ROUTING } |
enum | req_mode_t { ONE_OR_MORE_REQUIRED, BUBBLE_OBLIVIOUS_REQ, DOUBLE_OBLIVIOUS_REQ, TREE_REQ, ICUBE_REQ, TWO_OR_MORE_REQUIRED, BUBBLE_ADAPTIVE_RANDOM_REQ, BUBBLE_ADAPTIVE_SHORTEST_REQ, BUBBLE_ADAPTIVE_SMART_REQ, DOUBLE_ADAPTIVE_REQ, BIMODAL_REQ, DALLY_TRC_REQ, DALLY_BASIC_REQ, DALLY_IMPROVED_REQ, THREE_OR_MORE_REQUIRED, DALLY_ADAPTIVE_REQ, SIX_REQUIRED, HEXA_ADAPTIVE_REQ, HEXA_OBLIVIOUS_REQ } |
enum | arb_mode_t { ROUNDROBIN_ARB, FIFO_ARB, LONGEST_ARB, RANDOM_ARB, AGE_ARB } |
enum | inj_mode_t { SHORTEST_INJ, DOR_INJ, DOR_SHORTEST_INJ, SHORTEST_PROFITABLE_INJ, LONGEST_PATH_INJ } |
enum | placement_t { CONSECUTIVE_PLACE, SHUFFLE_PLACE, RANDOM_PLACE, SHIFT_PLACE, ROW_PLACE, COLUMN_PLACE, QUADRANT_PLACE, ICUBE_PLACE, DIAGONAL_PLACE, FILE_PLACE } |
enum | source_t { NO_SOURCE, INDEPENDENT_SOURCE, OTHER_SOURCE } |
Functions | |
void * | alloc (long) |
void | panic (char *mes) |
Some miscellaneus tools & definitions.
Tools for memory allocation & error printing. Definition of some useful macros. Definition of some enumerations.
#define abs | ( | m | ) | ((m<0) ? (-m) : (m)) |
Return the absolute value
m | The number. |
#define max | ( | a, | |
b | |||
) | (((a) > (b)) ? (a) : (b)) |
Definition of the maximum chooser
a | One number. |
b | Another One. |
#define min | ( | a, | |
b | |||
) | (((a) > (b)) ? (b) : (a)) |
Definition of the minimum chooser
a | One number. |
b | Another One. |
#define mod | ( | a, | |
b | |||
) | ((((a)%(b)) < 0 ) ? ((a)%(b)) + (b) : ((a)%(b)) ) |
Definition of the module of a division
a | One number. |
b | Another One. |
#define sign | ( | x | ) | (x<0 ? -1 : 1) |
The sign of a numeric value.
For zero, the return value is 1
#define ztm | ( | m | ) | (long) (m * ( (1.0*rand() ) / (RAND_MAX+1.0))) |
Choose a random number in [ 0, m ).
m | maximum. |
typedef enum arb_mode_t arb_mode_t |
Definition of arbitration mechanism.
typedef enum cons_mode_t cons_mode_t |
Definition of consumption modes.
typedef enum inj_mode_t inj_mode_t |
Definition of injection techniques.
typedef enum placement_t placement_t |
Definition of task placement types for trace driven.
typedef enum req_mode_t req_mode_t |
Definition of all request port modes.
typedef enum traffic_pattern_t traffic_pattern_t |
Classes of traffic sources.
typedef enum vc_management_t vc_management_t |
Classes of VC management.
enum arb_mode_t |
Definition of arbitration mechanism.
enum bool_t |
Definition of boolean values.
enum cons_mode_t |
Definition of consumption modes.
enum inj_mode_t |
Definition of injection techniques.
enum placement_t |
Definition of task placement types for trace driven.
enum req_mode_t |
Definition of all request port modes.
enum routing_t |
Definition of DOR classes.
enum source_t |
Definition of the source type for trace driven.
enum topo_t |
Definition of all accepted topologies.
enum traffic_pattern_t |
Classes of traffic sources.
enum vc_management_t |
Classes of VC management.
void* alloc | ( | long | size | ) |
Allocates memory.
size | The size in bytes of the memory allocation. |
void panic | ( | char * | msg | ) |
Stops the simulation & prints an error message.
When the simulation ends here the return code is -1.
msg | A string containing the error message |