ring.h

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *! \brief Filename:  ring.h
00005  *
00006  *    Description: The class defines functions for a generic k-ary 2D ring
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  _ring_h_INC
00049 #define  _ring_h_INC
00050 
00051 #include        "topology.h"
00052 
00053 #ifdef USE_ZESTO
00054 #include        "../../zesto/host.h"
00055 #include        "../../zesto/misc.h"
00056 #include        "../../zesto/sim.h"
00057 #include        "../../zesto/machine.h"
00058 #include        "../../zesto/endian.h"
00059 #include        "../../zesto/version.h"
00060 #include        "../../zesto/options.h"
00061 #include        "../../zesto/stats.h"
00062 #include        "../../zesto/regs.h"
00063 #include        "../../zesto/memory.h"
00064 #include        "../../zesto/thread.h"
00065 #endif
00066 
00067 extern vector<unsigned int> mc_positions;
00068 extern uint no_of_cores;
00069 extern uint concentration;
00070 
00071 class Ring : public Topology
00072 {
00073     public:
00074         Ring ();
00075         ~Ring ();
00076 
00077         void init(uint ports, uint vcs, uint credits, uint buffer_size, uint no_nodes, uint grid_size, uint links);
00078         void setup(void);
00079         void connect_interface_processor(void);
00080         void connect_interface_routers(void);
00081         void connect_routers(void);
00082         string print_stats(void);
00083         void set_max_phy_link_bits ( uint a);
00084 
00085     protected:
00086 
00087     private:
00088         uint ports;
00089         uint vcs;
00090         uint credits;
00091         uint buffer_size;
00092         uint no_nodes;
00093         uint links;
00094         uint grid_size;
00095 
00096 }; /* -----  end of class Ring  ----- */
00097 
00098 #endif   /* ----- #ifndef _ring_h_INC  ----- */

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