diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-03-20 09:14:14 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-03-20 09:14:14 -0500 |
commit | 4b67ada89e2e47b26ad07562774ff65beb5633a5 (patch) | |
tree | a93e52d39595313eec559d9c4d9b164f76418706 /src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | |
parent | 4f7ef51efba1c1688eadc14f628a1411512b235e (diff) | |
download | gem5-4b67ada89e2e47b26ad07562774ff65beb5633a5.tar.xz |
ruby: garnet: convert network interfaces into clocked objects
This helps in configuring the network interfaces from the python script and
these objects no longer rely on the network object for the timing information.
Diffstat (limited to 'src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc')
-rw-r--r-- | src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc index 856e90d1f..280917bab 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc @@ -56,6 +56,11 @@ GarnetNetwork::GarnetNetwork(const Params *p) Router* router = safe_cast<Router*>(*i); m_routers.push_back(router); } + + for (int i=0; i < m_nodes; i++) { + NetworkInterface *ni = safe_cast<NetworkInterface *>(p->netifs[i]); + m_nis.push_back(ni); + } } void @@ -74,10 +79,8 @@ GarnetNetwork::init() } for (int i=0; i < m_nodes; i++) { - NetworkInterface *ni = new NetworkInterface(i, m_virtual_networks, - this); - ni->addNode(m_toNetQueues[i], m_fromNetQueues[i]); - m_nis.push_back(ni); + m_nis[i]->init_net_ptr(this); + m_nis[i]->addNode(m_toNetQueues[i], m_fromNetQueues[i]); } m_topology_ptr->createLinks(this); |