dragonfly.h 2.39 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Copyright (C) 2014 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#ifndef DRAGONFLY_H
#define DRAGONFLY_H

#include <ross.h>

typedef struct terminal_message terminal_message;

/* this message is used for both dragonfly compute nodes and routers */
struct terminal_message
{
17
18
  /* magic number */
  int magic;
19
20
21
22
23
24
25
26
27
28
29
30
  /* flit travel start time*/
  tw_stime travel_start_time;
 /* 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 dragonfly */
33
  tw_lpid dest_terminal_id;
34
35
  /* source terminal ID of the dragonfly */
  unsigned int src_terminal_id;
36
37
  /* local LP ID to calculate the radix of the sender node/router */
  unsigned int local_id;
38
39
40
  /* message originating router id */
  unsigned int origin_router_id;

41
42
43
44
  /* number of hops traversed by the packet */
  short my_N_hop;
  /* Intermediate LP ID from which this message is coming */
  unsigned int intm_lp_id;
45
  short new_vc;
46
47
48
  short saved_vc;
  /* last hop of the message, can be a terminal, local router or global router */
  short last_hop;
49
50
   /* For routing */
   int intm_group_id;
51
   int chunk_id;
52
   uint64_t packet_size;
53
   uint64_t num_chunks;
54
55
   int remote_event_size_bytes;
   int local_event_size_bytes;
56

57
58
  // For buffer message
   short vc_index;
59
   int sender_radix;
60
61
62
   int output_chan;
    int is_pull;
    uint64_t pull_size;
63
64

   /* for reverse computation */   
65
   short path_type;
66
67
   tw_stime saved_available_time;
   tw_stime saved_credit_time;
68
   tw_stime saved_collective_init_time;  
69
70
   tw_stime saved_hist_start_time;
   int saved_hist_num;
71
   int saved_occupancy;
72

73
74
75
76
77
78
79

   /* for reverse computation of a node's fan in*/
   int saved_fan_nodes;
   tw_lpid sender_svr;

  /* LP ID of the sending node, has to be a network node in the dragonfly */
   tw_lpid sender_node;
80
81
82

   /* for reverse computation */
   struct pending_router_msgs * saved_elem; 
83
84
85
86
87
88
89
90
91
92
93
94
};

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

/*
 * Local variables:
 *  c-indent-level: 4
 *  c-basic-offset: 4
 * End:
 *
 * vim: ft=c ts=8 sts=4 sw=4 expandtab
 */