diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-22 15:53:23 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-22 15:53:23 -0500 |
commit | 5aa43e130acec02bc616008a8758cf5096025c19 (patch) | |
tree | f1277ef0002aadfb911f126ec0537afa572f3789 /src/mem/ruby/network/garnet | |
parent | 2d501276429ab674c146a86802e62538892fc500 (diff) | |
download | gem5-5aa43e130acec02bc616008a8758cf5096025c19.tar.xz |
ruby: convert Topology to regular class
The Topology class in Ruby does not need to inherit from SimObject class.
This patch turns it into a regular class. The topology object is now created
in the constructor of the Network class. All the parameters for the topology
class have been moved to the network class.
Diffstat (limited to 'src/mem/ruby/network/garnet')
-rw-r--r-- | src/mem/ruby/network/garnet/BaseGarnetNetwork.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc index c6e770cc9..3b24ada49 100644 --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc @@ -46,17 +46,15 @@ BaseGarnetNetwork::BaseGarnetNetwork(const Params *p) // Currently Garnet only supports uniform bandwidth for all // links and network interfaces. - for (std::vector<BasicExtLink*>::const_iterator i = - m_topology_ptr->params()->ext_links.begin(); - i != m_topology_ptr->params()->ext_links.end(); ++i) { + for (std::vector<BasicExtLink*>::const_iterator i = p->ext_links.begin(); + i != p->ext_links.end(); ++i) { BasicExtLink* ext_link = (*i); if (ext_link->params()->bandwidth_factor != m_ni_flit_size) { fatal("Garnet only supports uniform bw across all links and NIs\n"); } } - for (std::vector<BasicIntLink*>::const_iterator i = - m_topology_ptr->params()->int_links.begin(); - i != m_topology_ptr->params()->int_links.end(); ++i) { + for (std::vector<BasicIntLink*>::const_iterator i = p->int_links.begin(); + i != p->int_links.end(); ++i) { BasicIntLink* int_link = (*i); if (int_link->params()->bandwidth_factor != m_ni_flit_size) { fatal("Garnet only supports uniform bw across all links and NIs\n"); @@ -187,4 +185,3 @@ BaseGarnetNetwork::printPerformanceStats(ostream& out) const out << "-------------" << endl; out << endl; } - |