summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2009-07-18 18:20:03 -0500
committerDerek Hower <drh5@cs.wisc.edu>2009-07-18 18:20:03 -0500
commit7cd2d8f687bd6909b92da5301a2d305f1fc33601 (patch)
treef72b072981915ec07b20d08f0d280292efe3f8d2 /src/mem/ruby/network
parent4bd7fe4c53471e4aa404f4b5e1d2dad68e3514f6 (diff)
downloadgem5-7cd2d8f687bd6909b92da5301a2d305f1fc33601.tar.xz
ruby: removed all refs to old RubyConfig
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/Network.hh1
-rw-r--r--src/mem/ruby/network/garnet-flexible-pipeline/NetworkConfig.hh70
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.cc5
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc35
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc4
-rw-r--r--src/mem/ruby/network/simple/Topology.cc77
6 files changed, 2 insertions, 190 deletions
diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh
index 5730d6591..17fbaab22 100644
--- a/src/mem/ruby/network/Network.hh
+++ b/src/mem/ruby/network/Network.hh
@@ -50,7 +50,6 @@
#include "mem/ruby/system/NodeID.hh"
#include "mem/protocol/MessageSizeType.hh"
#include "mem/ruby/system/System.hh"
-#include "mem/ruby/config/RubyConfig.hh"
class NetDest;
class MessageBuffer;
diff --git a/src/mem/ruby/network/garnet-flexible-pipeline/NetworkConfig.hh b/src/mem/ruby/network/garnet-flexible-pipeline/NetworkConfig.hh
index 33af28a7e..0a450c002 100644
--- a/src/mem/ruby/network/garnet-flexible-pipeline/NetworkConfig.hh
+++ b/src/mem/ruby/network/garnet-flexible-pipeline/NetworkConfig.hh
@@ -40,7 +40,6 @@
#include "mem/ruby/network/garnet-fixed-pipeline/NetworkHeader.hh"
#include "mem/gems_common/util.hh"
-#include "mem/ruby/config/RubyConfig.hh"
class NetworkConfig {
private:
@@ -65,80 +64,11 @@ class NetworkConfig {
m_using_network_testing = atoi(argv[i+1].c_str());
}
}
-// static bool isGarnetNetwork() {return RubyConfig::getUsingGarnetNetwork(); }
-// static bool isDetailNetwork() {return RubyConfig::getUsingDetailNetwork(); }
bool isNetworkTesting() {return m_using_network_testing; }
int getFlitSize() {return m_flit_size; }
int getNumPipeStages() {return m_number_of_pipe_stages; }
int getVCsPerClass() {return m_vcs_per_class; }
int getBufferSize() {return m_buffer_size; }
- // This is no longer used. See config/rubyconfig.defaults to set Garnet parameters.
- static void readNetConfig()
- {
- /*
- string filename = "network/garnet-flexible-pipeline/";
- filename += NETCONFIG_DEFAULTS;
-
- if (g_SIMICS) {
- filename = "../../../ruby/"+filename;
- }
- ifstream NetconfigFile( filename.c_str(), ios::in);
- if(!NetconfigFile.is_open())
- {
- cout << filename << endl;
- cerr << "Network Configuration file cannot be opened\n";
- exit(1);
- }
-
- string line = "";
-
- while(!NetconfigFile.eof())
- {
- getline(NetconfigFile, line, '\n');
- string var = string_split(line, ':');
-
- if(!var.compare("RubyConfig::getUsingGarnetNetwork()"))
- {
- if(!line.compare("true"))
- RubyConfig::getUsingGarnetNetwork() = true;
- else
- RubyConfig::getUsingGarnetNetwork() = false;
- }
- if(!var.compare("RubyConfig::getUsingDetailNetwork()"))
- {
- if(!line.compare("true"))
- RubyConfig::getUsingDetailNetwork() = true;
- else
- RubyConfig::getUsingDetailNetwork() = false;
- }
- if(!var.compare("g_NETWORK_TESTING"))
- {
- if(!line.compare("true"))
- g_NETWORK_TESTING = true;
- else
- g_NETWORK_TESTING = false;
- }
- if(!var.compare("RubyConfig::getFlitSize()"))
- RubyConfig::getFlitSize() = atoi(line.c_str());
- if(!var.compare("RubyConfig::getNumberOfPipeStages()"))
- RubyConfig::getNumberOfPipeStages() = atoi(line.c_str());
- if(!var.compare("RubyConfig::getVCSPerClass()"))
- RubyConfig::getVCSPerClass() = atoi(line.c_str());
- if(!var.compare("RubyConfig::getBufferSize()"))
- RubyConfig::getBufferSize() = atoi(line.c_str());
- }
- NetconfigFile.close();
- */
- /*
- cout << "RubyConfig::getUsingGarnetNetwork() = " << RubyConfig::getUsingGarnetNetwork() << endl;
- cout << "RubyConfig::getUsingDetailNetwork() = " << RubyConfig::getUsingDetailNetwork() << endl;
- cout << "g_NETWORK_TESTING = " << g_NETWORK_TESTING << endl;
- cout << "RubyConfig::getFlitSize() = " << RubyConfig::getFlitSize() << endl;
- cout << "RubyConfig::getNumberOfPipeStages() = " << RubyConfig::getNumberOfPipeStages() << endl;
- cout << "RubyConfig::getVCSPerClass()= " << RubyConfig::getVCSPerClass() << endl;
- cout << "RubyConfig::getBufferSize() = " << RubyConfig::getBufferSize() << endl;
- */
- }
};
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc
index b617ae939..02fc8db2a 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc
@@ -88,9 +88,7 @@ void PerfectSwitch::addOutPort(const Vector<MessageBuffer*>& out, const NetDest&
m_out.insertAtBottom(out);
m_routing_table.insertAtBottom(routing_table_entry);
- // if (RubyConfig::getPrintTopology()) {
- m_out_link_vec.insertAtBottom(out);
- // }
+ m_out_link_vec.insertAtBottom(out);
}
void PerfectSwitch::clearRoutingTables()
@@ -187,7 +185,6 @@ void PerfectSwitch::wakeup()
assert(m_link_order.size() == m_routing_table.size());
assert(m_link_order.size() == m_out.size());
//changed by SS
-// if (RubyConfig::getAdaptiveRouting()) {
if (m_network_ptr->getAdaptiveRouting()) {
if (m_network_ptr->isVNetOrdered(vnet)) {
// Don't adaptively route
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index e5cbfefd8..497c602d1 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -101,42 +101,7 @@ void SimpleNetwork::init(const vector<string> & argv)
}
m_topology_ptr->createLinks(false); // false because this isn't a reconfiguration
}
-/*
-SimpleNetwork::SimpleNetwork(int nodes)
-{
- m_nodes = MachineType_base_number(MachineType_NUM);
-
- m_virtual_networks = RubyConfig::getNumberOfVirtualNetworks();
- m_endpoint_switches.setSize(m_nodes);
-
- m_in_use.setSize(m_virtual_networks);
- m_ordered.setSize(m_virtual_networks);
- for (int i = 0; i < m_virtual_networks; i++) {
- m_in_use[i] = false;
- m_ordered[i] = false;
- }
- // Allocate to and from queues
- m_toNetQueues.setSize(m_nodes);
- m_fromNetQueues.setSize(m_nodes);
- for (int node = 0; node < m_nodes; node++) {
- m_toNetQueues[node].setSize(m_virtual_networks);
- m_fromNetQueues[node].setSize(m_virtual_networks);
- for (int j = 0; j < m_virtual_networks; j++) {
- m_toNetQueues[node][j] = new MessageBuffer;
- m_fromNetQueues[node][j] = new MessageBuffer;
- }
- }
-
- // Setup the network switches
- m_topology_ptr = new Topology(this, m_nodes);
- int number_of_switches = m_topology_ptr->numSwitches();
- for (int i=0; i<number_of_switches; i++) {
- m_switch_ptr_vector.insertAtBottom(new Switch(i, this));
- }
- m_topology_ptr->createLinks(false); // false because this isn't a reconfiguration
-}
-*/
void SimpleNetwork::reset()
{
for (int node = 0; node < m_nodes; node++) {
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index ce69c47be..64cb2a33a 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -103,9 +103,7 @@ void Throttle::addLinks(const Vector<MessageBuffer*>& in_vec, const Vector<Messa
}
}
- // if (RubyConfig::getPrintTopology()) {
- m_out_link_vec.insertAtBottom(out_vec);
- // }
+ m_out_link_vec.insertAtBottom(out_vec);
}
void Throttle::addVirtualNetwork(MessageBuffer* in_ptr, MessageBuffer* out_ptr)
diff --git a/src/mem/ruby/network/simple/Topology.cc b/src/mem/ruby/network/simple/Topology.cc
index 3535f790b..dedf79d58 100644
--- a/src/mem/ruby/network/simple/Topology.cc
+++ b/src/mem/ruby/network/simple/Topology.cc
@@ -40,7 +40,6 @@
#include "mem/ruby/common/NetDest.hh"
#include "mem/ruby/network/Network.hh"
#include "mem/protocol/TopologyType.hh"
-//#include "mem/ruby/config/RubyConfig.hh"
#include "mem/gems_common/util.hh"
#include "mem/protocol/MachineType.hh"
#include "mem/protocol/Protocol.hh"
@@ -294,82 +293,6 @@ void Topology::createLinks(bool isReconfiguration)
}
}
}
-/*
-void Topology::makeSwitchesPerChip(Vector< Vector < SwitchID > > &nodePairs, Vector<int> &latencies, Vector<int> &bw_multis, int numberOfChipSwitches)
-{
-
- Vector < SwitchID > nodes; // temporary buffer
- nodes.setSize(2);
-
- Vector<bool> endpointConnectionExist; // used to ensure all endpoints are connected to the network
- endpointConnectionExist.setSize(m_nodes);
- // initialize endpoint check vector
- for (int k = 0; k < endpointConnectionExist.size(); k++) {
- endpointConnectionExist[k] = false;
- }
-
- Vector<int> componentCount;
- componentCount.setSize(MachineType_NUM);
- for (MachineType mType = MachineType_FIRST; mType < MachineType_NUM; ++mType) {
- componentCount[mType] = 0;
- }
-
- // components to/from network links
- // TODO: drh5: bring back chips!!!
- for (int chip = 0; chip < RubyConfig::getNumberOfChips(); chip++) {
- for (MachineType mType = MachineType_FIRST; mType < MachineType_NUM; ++mType) {
- for (int component = 0; component < MachineType_base_count(mType); component++) {
-
- int latency = -1;
- int bw_multiplier = -1; // internal link bw multiplier of the global bandwidth
- if (mType != MachineType_Directory) {
- latency = RubyConfig::getOnChipLinkLatency(); // internal link latency
- bw_multiplier = 10; // internal link bw multiplier of the global bandwidth
- } else {
- latency = RubyConfig::getNetworkLinkLatency(); // local memory latency
- bw_multiplier = 1; // local memory link bw multiplier of the global bandwidth
- }
- nodes[0] = MachineType_base_number(mType)+componentCount[mType];
- nodes[1] = chip+m_nodes*2; // this is the chip's internal switch id #
-
- // insert link
- nodePairs.insertAtBottom(nodes);
- latencies.insertAtBottom(latency);
- bw_multis.insertAtBottom(bw_multiplier);
- //bw_multis.insertAtBottom(componentCount[mType]+MachineType_base_number((MachineType)mType));
-
- // opposite direction link
- Vector < SwitchID > otherDirectionNodes;
- otherDirectionNodes.setSize(2);
- otherDirectionNodes[0] = nodes[1];
- otherDirectionNodes[1] = nodes[0]+m_nodes;
- nodePairs.insertAtBottom(otherDirectionNodes);
- latencies.insertAtBottom(latency);
- bw_multis.insertAtBottom(bw_multiplier);
-
- assert(!endpointConnectionExist[nodes[0]]);
- endpointConnectionExist[nodes[0]] = true;
- componentCount[mType]++;
- }
- }
- }
-
- // make sure all enpoints are connected in the soon to be created network
- for (int k = 0; k < endpointConnectionExist.size(); k++) {
- if (endpointConnectionExist[k] == false) {
- cerr << "Error: Unconnected Endpoint: " << k << endl;
- exit(1);
- }
- }
-
- // secondary check to ensure we saw the correct machine counts
- for (MachineType mType = MachineType_FIRST; mType < MachineType_NUM; ++mType) {
- assert(componentCount[mType] == MachineType_base_count((MachineType)mType));
- }
-
-}
-*/
-
SwitchID Topology::newSwitchID()
{