fattree.h 2.2 KB
Newer Older
1 2 3 4 5
#ifndef FATTREE_H
#define FATTREE_H

#include <ross.h>

6 7 8
/* Functions used for ROSS event tracing */
extern void fattree_register_evtrace();

9
/* Global variable for modelnet output directory name */
10
extern char *modelnet_stats_dir;
11

12 13
typedef struct fattree_message fattree_message;

14
/* this message is used for both fattree compute nodes and routers */
15 16
struct fattree_message
{
17 18 19 20
  /* magic number */
  int magic;
  /* flit travel start time*/
  tw_stime travel_start_time;
21 22 23 24 25 26 27 28 29 30
 /* packet ID of the flit  */
  unsigned long long packet_ID;
  /* event type of the flit */
  short  type;
  /* category: comes from codes */
  char category[CATEGORY_NAME_MAX];
  /* final destination LP ID, this comes from codes can be a server or any other LP type*/
  tw_lpid final_dest_gid;
  /*sending LP ID from CODES, can be a server or any other LP type */
  tw_lpid sender_lp;
31
  tw_lpid sender_mn_lp; // source modelnet id
32
 /* destination terminal ID of the message */
33 34
//  int dest_num; replaced with dest_terminal_id
  tw_lpid dest_terminal_id;
35 36 37 38 39 40 41 42 43
  /* source terminal ID of the fattree */
  unsigned int src_terminal_id;
  /* Intermediate LP ID from which this message is coming */
  unsigned int intm_lp_id;
  short saved_vc;
  short saved_off;
  int last_hop;
  int intm_id; //to find which port I connect to sender with

44 45 46
  /* message originating router id */
  unsigned int origin_switch_id;

47 48 49
  /* number of hops traversed by the packet */
  short my_N_hop;

50 51
  // For buffer message
  short vc_index;
Nikhil's avatar
Nikhil committed
52
  short rail_id;
53
  short vc_off;
54
  int is_pull;
55
  model_net_event_return event_rc;
56
  uint64_t pull_size;
57

58 59
  /* for reverse computation */    
  int path_type; 
60 61 62
  tw_stime saved_available_time;
  tw_stime saved_credit_time;
  uint64_t packet_size;
63
  tw_stime msg_start_time;
64
  tw_stime saved_busy_time;
65 66 67 68
  tw_stime saved_sample_time;
  tw_stime saved_avg_time;
  tw_stime saved_rcv_time;
  tw_stime saved_total_time;
69 70

  /* For routing */
71
  uint64_t chunk_id;
72 73
  uint64_t total_size;
  uint64_t message_id;
74 75 76 77 78 79 80 81 82 83 84 85 86 87
   
  /* meta data to aggregate packets into a message at receiver */
  uint64_t msg_size;
  uint64_t src_nic;
  uint64_t uniq_id;
  uint64_t saved_size;

  int remote_event_size_bytes;
  int local_event_size_bytes;

};

#endif /* end of include guard: FATTREE_H */