INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
Data Structures | Defines | Typedefs | Enumerations
C:/cygwin/home/Javier/insee/src/router.h File Reference

Declaration of FSIN routers. More...

#include "globals.h"
Include dependency graph for router.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  port
struct  router

Defines

#define dir(j, k)   ((j*nways) + k)
#define port_address(p, c)   ((p*nchan) + c)
#define address(cx, cy, cz)   (cx + cy*nodes_x + cz*nodes_x*nodes_y)
#define ESCAPE   0
 The Escape VC is always #0.
#define NULL_PORT   -1
 A way to denote "no port".
#define NULL_PACKET   0xffffffff
 A way to denote "no packet".

Typedefs

typedef enum dim dim
typedef enum multistages multistages
typedef enum way way
typedef long channel
typedef enum bet_type bet_type
typedef long port_type
typedef struct port port
typedef struct router router

Enumerations

enum  dim {
  D_X = 0, D_Y = 1, D_Z = 2, INJ = 3,
  CON = 4
}
enum  multistages { STAGE = 0, POSITION = 1 }
enum  way { UP = 0, DOWN = 1 }
enum  bet_type { B_ESCAPE = -1, B_TRIAL_0 = D_X, B_TRIAL_1 = D_Y, B_TRIAL_2 = D_Z }

Detailed Description

Declaration of FSIN routers.


Define Documentation

#define address (   cx,
  cy,
  cz 
)    (cx + cy*nodes_x + cz*nodes_x*nodes_y)

Given the coordinates X,Y,Z of a node, returns the node identifier. Only valid for mesh-like topologies.

#define dir (   j,
 
)    ((j*nways) + k)

Calculates the port asigned to a direction pair (dimension, way ).

Parameters:
jdimesion.
kway.
#define port_address (   p,
 
)    ((p*nchan) + c)

Given a port and VC, returns channel identifier.

Parameters:
pport.
cVC.

Typedef Documentation

typedef enum bet_type bet_type

An type, related to dim, used to bet in which direction I'll try to make a request for reservation of a VC; it includes "-1" to denote the Escape VC

typedef long channel

A type to enumerate channels -- actually a long

typedef enum dim dim

An enumeration to define dimensions X, Y and Z channels. When used with ports, possible values are also INJ (injection) and CON (consuption).

typedef enum multistages multistages

An enumeration to define multistage coordinates

typedef struct port port

Structure that defines a pair of input - output ports.

typedef long port_type

A type to enumerate ports -- actually a long

typedef struct router router

Structure that defines a network router. Includes input buffer, transit queues and many auxiliary data structures.

typedef enum way way

An enumeration to define the "UP" or "+" way, and the "DOWN" or "-" way


Enumeration Type Documentation

enum bet_type

An type, related to dim, used to bet in which direction I'll try to make a request for reservation of a VC; it includes "-1" to denote the Escape VC

enum dim

An enumeration to define dimensions X, Y and Z channels. When used with ports, possible values are also INJ (injection) and CON (consuption).

An enumeration to define multistage coordinates

enum way

An enumeration to define the "UP" or "+" way, and the "DOWN" or "-" way

Enumerator:
UP 

In X: left -> right; in Y, down -> top; increasing values.

DOWN 

In X: left <- right; in Y, down <- top; decreasing values.