simIrisComponentHeader.h

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *       Filename:  genericComponentHeader.h
00005  *
00006  *    Description:  This is the file for generic data type definitions that
00007  *    can be used across all components.
00008  *
00009  *        Version:  1.0
00010  *        Created:  02/09/2010 08:28:34 PM
00011  *       Revision:  none
00012  *       Compiler:  gcc
00013  *
00014  *         Author:  Mitchelle Rasquinha (), mitchelle.rasquinha@gatech.edu
00015  *        Company:  Georgia Institute of Technology
00016  *
00017  * =====================================================================================
00018  */
00019 
00020 #ifndef  _genericcomponentheader_h_INC
00021 #define  _genericcomponentheader_h_INC
00022 
00023 #define DEFAULT_ADDRESS 0
00024 #define DEFAULT_CONVERT_PACKET_CYCLES 1
00025 #define NO_DATA true
00026 #define FLIT_ID 9800
00027 #define CREDIT_ID 9801
00028 
00029 #include        <cstdlib>
00030 #include        <iostream>
00031 #include        <stdio.h>
00032 #include        <cassert>
00033 #include        "../kernel/simulator.h"
00034 #include        "genericEvents.h"
00035 
00036 /*  macro for general debug print statements. */
00037 #define LOC cout << "\nTime:" << dec << Simulator::Now() <<" " << name << " " << address << " " << node_ip << " ";
00038 #define _DBG(fmt,...) LOC printf(fmt,__VA_ARGS__);
00039 #define _DBG_NOARG(fmt) LOC printf(fmt);
00040 #define LOC_log debug_log<< "\nTime:" << dec << Simulator::Now() <<" " << name << " " << address << " " << node_ip << " ";
00041 #define _DBG_log(fmt,...) LOC_log printf(fmt,__VA_ARGS__);
00042 
00043 
00044 using namespace std;
00045 
00046 typedef unsigned long int uniqueId;  /* assuming this will be atleast 4 bytes and hence ~4G addresses for node id's and transaction id's and so on */
00047 typedef unsigned long long int simTime;
00048 typedef unsigned long long int ullint;
00049 typedef unsigned int uint;
00050 enum message_class { INVALID_PKT, REQUEST_PKT, WRITE_REQ, RESPONSE_PKT, ONE_FLIT_REQ, CLUBBED_PKT, PRIORITY_REQ};
00051 
00052 const unsigned int max_network_node_bits = 8;
00053 const unsigned int max_transaction_id_bits = 8;
00054 const unsigned int max_tail_length_bits = 8;
00055 const unsigned int max_control_bits = 8;
00056 
00057 //for dhruv
00058 const unsigned int max_pkt_cnt_bits = 3;
00059 const unsigned int head_and_tail_length = 80;
00060 
00061 enum virtual_network { VN0, VN1, VN2};
00062 //enum message_class { HOM /* Carries requests from a caching agent to the home agent, mainly used for  coherence. Mentioned her for completeness */,
00063 //    SNP /* Snoop */,
00064 //    NDR /* Non data response. This class is used to send short reponse messages */,
00065 //    DRS /* Data response */,
00066 //    NCB /* Non coherent bypass */,
00067 //    NCS /* Non coherent standard */
00068 //};
00069 
00070 #endif   /* ----- #ifndef _genericcomponentheader_h_INC  ----- */

Generated on Tue Oct 19 17:22:01 2010 for IRIS by  doxygen 1.5.8