mesh.h

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *! \brief Filename:  mesh.h
00005  *
00006  *    Description: The class defines functions for a generic k-ary 2D mesh
00007  *    with the network being a direct network of size n=k^2.
00008  *    The links have the following naming convention 
00009  *    
00010  *    links going left to right are a links
00011  *    links going from right to left are b links
00012  *    links going downwards are a links
00013  *    links going upwards are b links
00014  *
00015  *    Router ports
00016  *    port 0: Connects to interface
00017  *    port 1: Connects to direction east
00018  *    port 2: Connects to direction west
00019  *    port 3: Connects to direction north
00020  *    port 4: Connects to direction south
00021  *
00022  *              a links
00023  *              ----> R0 ----> R1 ---->
00024  *              <---  |^ <---  |^   <---
00025  *              blinks
00026  *                    ||       ||
00027  *                    v|       v| 
00028  *              ----> R2 ----> R3 ---->
00029  *                  a  |^  b     
00030  *                     ||   
00031  *                  l  ||  l
00032  *                  i  V|  i
00033  *                  n      n
00034  *                  k      k
00035  *                  s      s
00036  *
00037  *        Version:  1.0
00038  *        Created:  05/05/2010 12:01:12 AM
00039  *       Revision:  none
00040  *       Compiler:  gcc
00041  *
00042  *         Author:  Mitchelle Rasquinha (), mitchelle.rasquinha@gatech.edu
00043  *        Company:  Georgia Institute of Technology
00044  *
00045  * =====================================================================================
00046  */
00047 
00048 #ifndef  _mesh_h_INC
00049 #define  _mesh_h_INC
00050 
00051 #include        "topology.h"
00052 
00053 
00054 #ifdef USE_ZESTO
00055 #include        "../../zesto/host.h"
00056 #include        "../../zesto/misc.h"
00057 #include        "../../zesto/sim.h"
00058 #include        "../../zesto/machine.h"
00059 #include        "../../zesto/endian.h"
00060 #include        "../../zesto/version.h"
00061 #include        "../../zesto/options.h"
00062 #include        "../../zesto/stats.h"
00063 #include        "../../zesto/regs.h"
00064 #include        "../../zesto/memory.h"
00065 #include        "../../zesto/thread.h"
00066 #endif
00067 
00068 extern vector<unsigned int> mc_positions;
00069 extern uint no_of_cores;
00070 extern uint concentration;
00071 
00072 class Mesh : public Topology
00073 {
00074     public:
00075         Mesh ();
00076         ~Mesh ();
00077 
00078         void init(uint ports, uint vcs, uint credits, uint buffer_size, uint no_nodes, uint grid_size, uint links);
00079         void setup(void);
00080         void connect_interface_processor(void);
00081         void connect_interface_routers(void);
00082         void connect_routers(void);
00083         string print_stats(void);
00084         void set_max_phy_link_bits ( uint a);
00085 
00086     protected:
00087 
00088     private:
00089         uint ports;
00090         uint vcs;
00091         uint credits;
00092         uint buffer_size;
00093         uint no_nodes;
00094         uint links;
00095         uint grid_size;
00096 
00097 }; /* -----  end of class Mesh  ----- */
00098 
00099 #endif   /* ----- #ifndef _mesh_h_INC  ----- */

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