express-mesh.h 2.47 KB
Newer Older
1 2 3 4 5 6
/*
 * Copyright (C) 2014 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

7
//CHANGE: modify to match you header file name
8 9 10 11 12 13 14 15 16
#ifndef EXPRESS_MESH_H
#define EXPRESS_MESH_H

#ifdef __cplusplus
extern "C" {
#endif

#include <ross.h>

17 18 19 20
//CHANGE: modify to match the struct
typedef struct net_message net_message;

//CHANGE: modify the struct name - add to message_list union in common-net.h
21 22 23 24
typedef struct em_message em_message;

struct em_message
{
25 26 27
  //common entries:
  int magic; /* magic number */
  short  type; /* event type of the flit */
28

29 30 31
  tw_stime travel_start_time; /* flit travel start time*/
  unsigned long long packet_ID; /* packet ID of the flit  */
  char category[CATEGORY_NAME_MAX]; /* category: comes from codes */
32

33 34 35 36 37 38
  tw_lpid final_dest_gid; /* final destination LP ID, this comes from codes can be a server or any other LP type*/
  tw_lpid sender_lp; /*sending LP ID from CODES, can be a server or any other LP type */
  tw_lpid sender_mn_lp; // source modelnet id (think NIC)
  tw_lpid src_terminal_id; /* source terminal ID - mostly same as sender_mn_lp */
  tw_lpid dest_terminal_id; /* destination modelnet id */
  int dest_terminal; /* logical id of destination modelnet id */
39

40 41 42 43 44 45 46
  /* packet/message identifier and status */
  uint64_t chunk_id; //which chunk of packet I am
  uint64_t packet_size; //what is the size of my packet
  uint64_t message_id; //seq number at message level - NIC specified
  uint64_t total_size; //total size of the message
  int remote_event_size_bytes; // data size for target event at destination
  int local_event_size_bytes; // data size for event at source
47 48
  int is_pull;
  uint64_t pull_size;
49
  tw_stime msg_start_time;
50

51 52 53 54 55 56 57 58 59 60 61 62
  //info for path traversal
  short my_N_hop; /* hops traversed so far */
  short hops[8]; /* can be used for storing different types of hops */
  unsigned int intm_lp_id; /* Intermediate LP ID that sent this packet */
  int last_hop; /* last hop of the message, can be a terminal, local router or global router */
  int vc_index; /* stores port info */
  int output_chan; /* virtual channel within port */

  //info for reverse computation
  short saved_channel;
  short saved_vc;
  model_net_event_return event_rc;
63 64 65
  tw_stime saved_available_time;
  tw_stime saved_avg_time;
  tw_stime saved_rcv_time;
66
  tw_stime saved_busy_time;
67 68 69 70
  tw_stime saved_total_time;
  tw_stime saved_hist_start_time;
  tw_stime saved_sample_time;

71 72
  //CHANGE: info for specific networks
  short dim_change;
73 74 75 76 77 78
};

#ifdef __cplusplus
}
#endif

79
#endif
80