dragonfly.h 2.42 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * Copyright (C) 2014 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#ifndef DRAGONFLY_H
#define DRAGONFLY_H

Jonathan Jenkins's avatar
Jonathan Jenkins committed
10 11 12 13
#ifdef __cplusplus
extern "C" {
#endif

14 15 16 17 18 19 20
#include <ross.h>

typedef struct terminal_message terminal_message;

/* this message is used for both dragonfly compute nodes and routers */
struct terminal_message
{
21 22
  /* magic number */
  int magic;
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];
31 32
  /* store category hash in the event */
  uint32_t category_hash;
33 34 35 36
  /* 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;
37
  tw_lpid sender_mn_lp; // source modelnet id
38
 /* destination terminal ID of the dragonfly */
39
  tw_lpid dest_terminal_id;
40 41
  /* source terminal ID of the dragonfly */
  unsigned int src_terminal_id;
42 43
  /* message originating router id. MM: Can we calculate it through
   * sender_mn_lp??*/
44 45
  unsigned int origin_router_id;

46 47
  /* number of hops traversed by the packet */
  short my_N_hop;
48 49
  short my_l_hop, my_g_hop;
  short saved_channel;
50
  short saved_vc;
51

52
  short nonmin_done;
53 54 55
  /* Intermediate LP ID from which this message is coming */
  unsigned int intm_lp_id;
  /* last hop of the message, can be a terminal, local router or global router */
56
  short last_hop;
57
   /* For routing */
58 59 60 61 62 63 64 65 66
  int intm_rtr_id;
  int intm_group_id;
  int saved_src_dest;
  int saved_src_chan;

   uint32_t chunk_id;
   uint32_t packet_size;
   uint32_t message_id;
   uint32_t total_size;
67

68 69
   int remote_event_size_bytes;
   int local_event_size_bytes;
70

71
  // For buffer message
72
   int vc_index;
73
   int output_chan;
74
   model_net_event_return event_rc;
75 76
   int is_pull;
   uint64_t pull_size;
77 78

   /* for reverse computation */   
79
   int path_type;
80
   tw_stime saved_available_time;
81
   tw_stime saved_avg_time;
82
   tw_stime saved_rcv_time;
83 84
   tw_stime saved_busy_time; 
   tw_stime saved_total_time;
85
   tw_stime saved_sample_time;
86
   tw_stime msg_start_time;
87
   int saved_occupancy;
88

89
   tw_lpid next_stop;
90 91
};

Jonathan Jenkins's avatar
Jonathan Jenkins committed
92 93 94 95
#ifdef __cplusplus
}
#endif

96 97 98 99 100 101 102 103 104 105
#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
 */