diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2015-08-30 12:24:18 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2015-08-30 12:24:18 -0500 |
commit | bf8ae288fa81ad66c56eae483eea1814afaa2119 (patch) | |
tree | a41d47e7fbe981d152aa300e9e9afb1deccc8e2e /src/mem/ruby/network/garnet/fixed-pipeline | |
parent | 7175db4a3fcd7f5767d740a7c11b5fcf215d0018 (diff) | |
download | gem5-bf8ae288fa81ad66c56eae483eea1814afaa2119.tar.xz |
ruby: network: drop member m_in_use
This member indicates whether or not a particular virtual network is in use.
Instead of having a default big value for the number of virtual networks and
then checking whether a virtual network is in use, the next patch removes the
default value and the protocol configuration file would now specify the
number of virtual networks it requires.
Additionally, the patch also refactors some of the code used for computing the
virtual channel next in the round robin order.
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline')
3 files changed, 4 insertions, 19 deletions
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 5aa967e8f..196ebb089 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc @@ -189,8 +189,7 @@ GarnetNetwork_d::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, void GarnetNetwork_d::checkNetworkAllocation(NodeID id, bool ordered, - int network_num, - string vnet_type) + int network_num, string vnet_type) { assert(id < m_nodes); assert(network_num < m_virtual_networks); @@ -198,7 +197,6 @@ GarnetNetwork_d::checkNetworkAllocation(NodeID id, bool ordered, if (ordered) { m_ordered[network_num] = true; } - m_in_use[network_num] = true; if (vnet_type == "response") m_vnet_type[network_num] = DATA_VNET_; // carries data (and ctrl) packets diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc index 1e636b589..06afee845 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc @@ -95,14 +95,9 @@ SWallocator_d::arbitrate_inports() // Select next round robin vc candidate within valid vnet int next_round_robin_invc = invc; - do { - next_round_robin_invc++; - - if (next_round_robin_invc >= m_num_vcs) - next_round_robin_invc = 0; - } while (!((m_router->get_net_ptr())->validVirtualNetwork( - get_vnet(next_round_robin_invc)))); - + next_round_robin_invc++; + if (next_round_robin_invc >= m_num_vcs) + next_round_robin_invc = 0; m_round_robin_inport[inport] = next_round_robin_invc; for (int invc_iter = 0; invc_iter < m_num_vcs; invc_iter++) { @@ -110,10 +105,6 @@ SWallocator_d::arbitrate_inports() if (invc >= m_num_vcs) invc = 0; - if (!((m_router->get_net_ptr())->validVirtualNetwork( - get_vnet(invc)))) - continue; - if (m_input_unit[inport]->need_stage(invc, ACTIVE_, SA_, m_router->curCycle()) && m_input_unit[inport]->has_credits(invc)) { diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc index a7430b06e..d389f07ba 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc @@ -180,10 +180,6 @@ VCallocator_d::arbitrate_invcs() { for (int inport_iter = 0; inport_iter < m_num_inports; inport_iter++) { for (int invc_iter = 0; invc_iter < m_num_vcs; invc_iter++) { - if (!((m_router->get_net_ptr())->validVirtualNetwork( - get_vnet(invc_iter)))) - continue; - if (m_input_unit[inport_iter]->need_stage(invc_iter, VC_AB_, VA_, m_router->curCycle())) { if (!is_invc_candidate(inport_iter, invc_iter)) |