INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
C:/cygwin/home/Javier/insee/src/packet.h
Go to the documentation of this file.
00001 
00005 #ifndef _packet
00006 #define _packet
00007 
00008 #include "misc.h"
00009 
00013 typedef struct routing_r {
00014         long *rr;
00015         long size;
00016 } routing_r;
00017 
00018 
00019 #if (BIMODAL_SUPPORT != 0)
00020 
00023 typedef enum message_l {
00024         SHORT_MSG,              
00025         LONG_MSG,               
00026         LONG_LAST_MSG   
00027 } message_l;
00028 #endif /* BIMODAL*/
00029 
00036 typedef struct packet_t {
00037         long tt;                
00038         long to;                
00039         long from;              
00040         long size;              
00041         routing_r rr;   
00042         long inj_time;  
00043         long n_hops;    
00044 
00045 #if (BIMODAL_SUPPORT != 0)
00046         message_l mtype;
00047 #endif /* BIMODAL */
00048 #if (TRACE_SUPPORT != 0)
00049         long task;              
00050         long length;    
00051 #endif /* TRACE */
00052 #if (EXECUTION_DRIVEN != 0)
00053         long id_trama;  
00054                 /* Este campo es el identificador tanto de paquete dentro */
00055                 /* de un mismo mensaje como de phit dentro del paquete */
00056                 /* Formato de id_trama: XXX...XYYY...YY */
00057                 /* Donde las X representan los bits que forman la secuencia de la trama */
00058                 /* ethernet, y las Y representan la secuencia del paquete al que */
00059                 /* pertenece el phit. Una trama ethernet se divide en varios paquetes */
00060                 /* El numero de bits que ocupa la secuencia del paquete es: */
00061                 /* round_up(log(1500/(packet_size_in_phits*phit_size))/log 2) */
00062 #endif
00063 
00064 } packet_t;
00065 
00066 #endif /* _packet */