summaryrefslogtreecommitdiff
path: root/src/mem/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby')
-rw-r--r--src/mem/ruby/network/Network.py5
-rw-r--r--src/mem/ruby/network/Topology.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc5
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc5
5 files changed, 9 insertions, 14 deletions
diff --git a/src/mem/ruby/network/Network.py b/src/mem/ruby/network/Network.py
index a1313a841..1d2e8ed9d 100644
--- a/src/mem/ruby/network/Network.py
+++ b/src/mem/ruby/network/Network.py
@@ -37,11 +37,9 @@ class Topology(SimObject):
cxx_header = "mem/ruby/network/Topology.hh"
description = Param.String("Not Specified",
"the name of the imported topology module")
+ num_routers = Param.UInt32("Number of routers in the network")
ext_links = VectorParam.BasicExtLink("Links to external nodes")
int_links = VectorParam.BasicIntLink("Links between internal nodes")
- routers = VectorParam.BasicRouter("Network routers")
- print_config = Param.Bool(False,
- "display topology config in the stats file")
class RubyNetwork(ClockedObject):
type = 'RubyNetwork'
@@ -52,3 +50,4 @@ class RubyNetwork(ClockedObject):
topology = Param.Topology("");
control_msg_size = Param.Int(8, "");
ruby_system = Param.RubySystem("");
+ routers = VectorParam.BasicRouter("Network routers")
diff --git a/src/mem/ruby/network/Topology.cc b/src/mem/ruby/network/Topology.cc
index e80b76d81..58114d147 100644
--- a/src/mem/ruby/network/Topology.cc
+++ b/src/mem/ruby/network/Topology.cc
@@ -61,7 +61,7 @@ NetDest shortest_path_to_node(SwitchID src, SwitchID next,
Topology::Topology(const Params *p)
: SimObject(p)
{
- m_number_of_switches = p->routers.size();
+ m_number_of_switches = p->num_routers;
// initialize component latencies record
m_component_latencies.resize(0);
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
index f6fcc2514..c4965af17 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -59,9 +59,8 @@ GarnetNetwork_d::GarnetNetwork_d(const Params *p)
}
// record the routers
- for (vector<BasicRouter*>::const_iterator i =
- m_topology_ptr->params()->routers.begin();
- i != m_topology_ptr->params()->routers.end(); ++i) {
+ for (vector<BasicRouter*>::const_iterator i = p->routers.begin();
+ i != p->routers.end(); ++i) {
Router_d* router = safe_cast<Router_d*>(*i);
m_router_ptr_vector.push_back(router);
}
@@ -115,7 +114,6 @@ GarnetNetwork_d::init()
router->printFaultVector(cout);
}
}
-
}
GarnetNetwork_d::~GarnetNetwork_d()
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
index a60d23457..ed75a26d1 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
@@ -53,9 +53,8 @@ GarnetNetwork::GarnetNetwork(const Params *p)
m_number_of_pipe_stages = p->number_of_pipe_stages;
// record the routers
- for (vector<BasicRouter*>::const_iterator i =
- m_topology_ptr->params()->routers.begin();
- i != m_topology_ptr->params()->routers.end(); ++i) {
+ for (vector<BasicRouter*>::const_iterator i = p->routers.begin();
+ i != p->routers.end(); ++i) {
Router* router = safe_cast<Router*>(*i);
m_router_ptr_vector.push_back(router);
}
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index 9a8201a05..a51add4a5 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -80,9 +80,8 @@ SimpleNetwork::SimpleNetwork(const Params *p)
}
// record the routers
- for (vector<BasicRouter*>::const_iterator i =
- m_topology_ptr->params()->routers.begin();
- i != m_topology_ptr->params()->routers.end(); ++i) {
+ for (vector<BasicRouter*>::const_iterator i = p->routers.begin();
+ i != p->routers.end(); ++i) {
Switch* s = safe_cast<Switch*>(*i);
m_switch_ptr_vector.push_back(s);
s->init_net_ptr(this);