00001 /* 00002 * ===================================================================================== 00003 * 00004 *! \brief Filename: torus.h 00005 * 00006 * Description: This class describes the class for a torus topology - a torus is similar to a 00007 * mesh, except that the edge nodes are also connected. 00008 * 00009 * Version: 1.0 00010 * Created: 07/19/2010 10:10:55 AM 00011 * Revision: none 00012 * Compiler: gcc 00013 * 00014 * Author: Sharda Murthi, smurthi3@gatech.edu 00015 * Company: Georgia Institute of Technology 00016 * 00017 * ===================================================================================== 00018 */ 00019 00020 00021 #ifndef TORUS_H_ 00022 #define TORUS_H_ 00023 00024 #include "topology.h" 00025 00026 extern vector<unsigned int> mc_positions; 00027 extern uint no_of_cores; 00028 extern uint concentration; 00029 00030 class Torus : public Topology 00031 { 00032 public: 00033 Torus (); 00034 ~Torus (); 00035 00036 void init(uint ports, uint vcs, uint credits, uint buffer_size, uint no_nodes, uint grid_size, uint links); 00037 void setup(void); 00038 void connect_interface_processor(void); 00039 void connect_interface_routers(void); 00040 void connect_routers(void); 00041 string print_stats(void); 00042 void set_max_phy_link_bits ( uint a); 00043 00044 protected: 00045 00046 private: 00047 uint ports; 00048 uint vcs; 00049 uint credits; 00050 uint buffer_size; 00051 uint no_nodes; 00052 uint links; 00053 uint grid_size; 00054 00055 }; /* ----- end of class Torus ----- */ 00056 00057 #endif /* TORUS_H_ */ 00058