changeset db895719c482 in /z/repo/gem5 details: http://repo.gem5.org/gem5?cmd=changeset;node=db895719c482 description: ruby: remove the original garnet code. Only garnet2.0 will be supported henceforth.
diffstat: src/mem/ruby/network/garnet/BaseGarnetNetwork.cc | 123 -- src/mem/ruby/network/garnet/BaseGarnetNetwork.hh | 94 -- src/mem/ruby/network/garnet/BaseGarnetNetwork.py | 41 - src/mem/ruby/network/garnet/NetworkHeader.hh | 41 - src/mem/ruby/network/garnet/SConscript | 39 - src/mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh | 44 - src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.cc | 83 - src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh | 92 -- src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py | 90 -- src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc | 260 ----- src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh | 111 -- src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py | 61 - src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc | 122 -- src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh | 182 ---- src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc | 394 -------- src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh | 102 -- src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc | 89 - src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh | 82 - src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc | 47 - src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh | 72 - src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc | 116 -- src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh | 103 -- src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc | 277 ------ src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh | 134 -- src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc | 90 -- src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh | 57 - src/mem/ruby/network/garnet/fixed-pipeline/SConscript | 53 - src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc | 241 ----- src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh | 84 - src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc | 111 -- src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh | 70 - src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc | 265 ----- src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh | 94 -- src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc | 80 - src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh | 100 -- src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc | 90 -- src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh | 90 -- src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc | 83 - src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh | 115 -- src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh | 49 - src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.cc | 78 - src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh | 89 - src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py | 72 - src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc | 240 ----- src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh | 104 -- src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py | 62 - src/mem/ruby/network/garnet/flexible-pipeline/InVcState.cc | 76 - src/mem/ruby/network/garnet/flexible-pipeline/InVcState.hh | 57 - src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc | 384 -------- src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh | 106 -- src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc | 151 --- src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh | 96 -- src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.cc | 58 - src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh | 52 - src/mem/ruby/network/garnet/flexible-pipeline/Router.cc | 448 ---------- src/mem/ruby/network/garnet/flexible-pipeline/Router.hh | 110 -- src/mem/ruby/network/garnet/flexible-pipeline/SConscript | 48 - src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc | 45 - src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh | 54 - src/mem/ruby/network/garnet/flexible-pipeline/flit.cc | 75 - src/mem/ruby/network/garnet/flexible-pipeline/flit.hh | 93 -- src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.cc | 127 -- src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh | 71 - 63 files changed, 0 insertions(+), 7167 deletions(-) diffs (truncated from 7419 to 300 lines): diff -r 2365e9e396f7 -r db895719c482 src/mem/ruby/network/garnet/BaseGarnetNetwork.cc --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc Thu Oct 06 14:35:20 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2008 Princeton University - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer; - * redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution; - * neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: Niket Agarwal - */ - -#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh" -#include "mem/ruby/network/MessageBuffer.hh" - -using namespace std; - -BaseGarnetNetwork::BaseGarnetNetwork(const Params *p) - : Network(p) -{ - m_ni_flit_size = p->ni_flit_size; - m_vcs_per_vnet = p->vcs_per_vnet; - m_enable_fault_model = p->enable_fault_model; - if (m_enable_fault_model) - fault_model = p->fault_model; - - // Currently Garnet only supports uniform bandwidth for all - // links and network interfaces. - 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 = 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"); - } - } -} - -void -BaseGarnetNetwork::init() -{ - Network::init(); -} - -void -BaseGarnetNetwork::regStats() -{ - Network::regStats(); - - m_flits_received - .init(m_virtual_networks) - .name(name() + ".flits_received") - .flags(Stats::pdf | Stats::total | Stats::nozero | Stats::oneline) - ; - - m_flits_injected - .init(m_virtual_networks) - .name(name() + ".flits_injected") - .flags(Stats::pdf | Stats::total | Stats::nozero | Stats::oneline) - ; - - m_network_latency - .init(m_virtual_networks) - .name(name() + ".network_latency") - .flags(Stats::oneline) - ; - - m_queueing_latency - .init(m_virtual_networks) - .name(name() + ".queueing_latency") - .flags(Stats::oneline) - ; - - for (int i = 0; i < m_virtual_networks; i++) { - m_flits_received.subname(i, csprintf("vnet-%i", i)); - m_flits_injected.subname(i, csprintf("vnet-%i", i)); - m_network_latency.subname(i, csprintf("vnet-%i", i)); - m_queueing_latency.subname(i, csprintf("vnet-%i", i)); - } - - m_avg_vnet_latency - .name(name() + ".average_vnet_latency") - .flags(Stats::oneline); - m_avg_vnet_latency = m_network_latency / m_flits_received; - - m_avg_vqueue_latency - .name(name() + ".average_vqueue_latency") - .flags(Stats::oneline); - m_avg_vqueue_latency = m_queueing_latency / m_flits_received; - - m_avg_network_latency.name(name() + ".average_network_latency"); - m_avg_network_latency = sum(m_network_latency) / sum(m_flits_received); - - m_avg_queueing_latency.name(name() + ".average_queueing_latency"); - m_avg_queueing_latency = sum(m_queueing_latency) / sum(m_flits_received); - - m_avg_latency.name(name() + ".average_latency"); - m_avg_latency = m_avg_network_latency + m_avg_queueing_latency; -} diff -r 2365e9e396f7 -r db895719c482 src/mem/ruby/network/garnet/BaseGarnetNetwork.hh --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh Thu Oct 06 14:35:20 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2008 Princeton University - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer; - * redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution; - * neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: Niket Agarwal - */ - -/* - * This header file is used to define all configuration parameters - * required by the interconnection network. - */ - -#ifndef __MEM_RUBY_NETWORK_GARNET_BASEGARNETNETWORK_HH__ -#define __MEM_RUBY_NETWORK_GARNET_BASEGARNETNETWORK_HH__ - -#include "mem/ruby/network/garnet/NetworkHeader.hh" -#include "mem/ruby/network/Network.hh" -#include "mem/ruby/network/fault_model/FaultModel.hh" -#include "params/BaseGarnetNetwork.hh" - -class BaseGarnetNetwork : public Network -{ - public: - typedef BaseGarnetNetworkParams Params; - BaseGarnetNetwork(const Params *p); - - void init(); - int getNiFlitSize() const { return m_ni_flit_size; } - int getVCsPerVnet() const { return m_vcs_per_vnet; } - bool isFaultModelEnabled() const { return m_enable_fault_model; } - FaultModel* fault_model; - - void increment_injected_flits(int vnet) { m_flits_injected[vnet]++; } - void increment_received_flits(int vnet) { m_flits_received[vnet]++; } - - void - increment_network_latency(Cycles latency, int vnet) - { - m_network_latency[vnet] += latency; - } - - void - increment_queueing_latency(Cycles latency, int vnet) - { - m_queueing_latency[vnet] += latency; - } - - bool isVNetOrdered(int vnet) const { return m_ordered[vnet]; } - - virtual void regStats(); - virtual void collateStats() {} - - protected: - int m_ni_flit_size; - int m_vcs_per_vnet; - bool m_enable_fault_model; - - // Statistical variables - Stats::Vector m_flits_received; - Stats::Vector m_flits_injected; - Stats::Vector m_network_latency; - Stats::Vector m_queueing_latency; - - Stats::Formula m_avg_vnet_latency; - Stats::Formula m_avg_vqueue_latency; - Stats::Formula m_avg_network_latency; - Stats::Formula m_avg_queueing_latency; - Stats::Formula m_avg_latency; -}; - -#endif // __MEM_RUBY_NETWORK_GARNET_BASEGARNETNETWORK_HH__ diff -r 2365e9e396f7 -r db895719c482 src/mem/ruby/network/garnet/BaseGarnetNetwork.py --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.py Thu Oct 06 14:35:20 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -# Copyright (c) 2008 Princeton University -# Copyright (c) 2009 Advanced Micro Devices, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer; -# redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution; -# neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Authors: Steve Reinhardt -# Brad Beckmann - -from m5.params import * -from Network import RubyNetwork - -class BaseGarnetNetwork(RubyNetwork): - type = 'BaseGarnetNetwork' - cxx_header = "mem/ruby/network/garnet/BaseGarnetNetwork.hh" - abstract = True - ni_flit_size = Param.Int(16, "network interface flit size in bytes") - vcs_per_vnet = Param.Int(4, "virtual channels per virtual network"); - enable_fault_model = Param.Bool(False, "enable network fault model"); - fault_model = Param.FaultModel(NULL, "network fault model"); diff -r 2365e9e396f7 -r db895719c482 src/mem/ruby/network/garnet/NetworkHeader.hh --- a/src/mem/ruby/network/garnet/NetworkHeader.hh Thu Oct 06 14:35:20 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2008 Princeton University - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer; - * redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution; - * neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev