highLevelPacket.h

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *       Filename:  HighLevelPacket.h
00005  *
00006  *    Description:  
00007  *
00008  *        Version:  1.0
00009  *        Created:  02/09/2010 08:23:37 PM
00010  *       Revision:  none
00011  *       Compiler:  gcc
00012  *
00013  *         Author:  Mitchelle Rasquinha (), mitchelle.rasquinha@gatech.edu
00014  *        Company:  Georgia Institute of Technology
00015  *
00016  * =====================================================================================
00017  */
00018 
00019 #ifndef  _highlevelpacket_h_INC
00020 #define  _highlevelpacket_h_INC
00021 #include        <sstream>
00022 #include        <string>
00023 #include        <math.h>
00024 #include        "../../../kernel/simulator.h"
00025 #include        "../../../util/simIrisComponentHeader.h"
00026 #include        "lowLevelPacket.h"
00027 
00028 #define CONTROL_VECTOR_SIZE 16
00029 
00030 using namespace std;
00031 
00032 
00033 /*
00034  * =====================================================================================
00035  *        Class:  HighLevelPacket
00036  *  Description:  
00037  *
00038  * =====================================================================================
00039  */
00040 class HighLevelPacket
00041 {
00042     public:
00043         /* ====================  LIFECYCLE     ======================================= */
00044         HighLevelPacket ();                             /* constructor */
00045         ~HighLevelPacket();
00046 
00047         /* ====================  STATISTICS ======================================= */
00048         /* Keep track of the packet transit time */
00049         simTime get_transit_time();
00050 
00051         /* ====================  OPERATIONS      ======================================= */
00052         void to_low_level_packet(LowLevelPacket* llp) ;
00053         void from_low_level_packet(LowLevelPacket* llp);
00054 
00055         /* ====================  OPERATORS     ======================================= */
00056         string toString() const;
00057         /* Assuming that a minimal check on the transaction id and source should suffice. In accordance with the QPI spec all packets have the transaction Id which can be mapped back to the caching agent that generated the request. Once the transaction is completed and the response arrives at the caching agent, a tear down is initiated and the transaction ids may be reused at the source.*/
00058         bool operator==( const HighLevelPacket* p );
00059 
00060         /* for debug */
00061         ullint addr;
00062 
00063         /* Stats variables */
00064         double avg_network_latency;
00065         unsigned int hop_count;
00066         unsigned int stat_memory_serviced_time;
00067         ullint req_start_time;
00068         ullint waiting_in_ni;
00069 
00070         uint source;
00071         uint destination;
00072         uint pkt_cnt;   //The number of requests clubbed together
00073         int reqs_left;  // requests left in outstanding_hlp
00074         uint startIndex;        //the index till where packets have been stripped and sent to the banks
00075         virtual_network vn;
00076         message_class msg_class;
00077         uint virtual_channel;
00078         uint transaction_id;
00079         simTime sent_time;
00080         simTime recv_time;
00081         unsigned int data_payload_length;       /* length of the data payload in bytes */
00082         vector<bool> data;
00083 
00084     protected:
00085 
00086     private:
00087 
00088 }; /* -----  end of class HighLevelPacket  ----- */
00089 
00090 #endif   /* ----- #ifndef _highlevelpacket_h_INC  ----- */
00091 

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