From 7957b1c43b3df2c9e9b6ec17eb7fc97976c9988d Mon Sep 17 00:00:00 2001 From: Srikant Bharadwaj Date: Thu, 10 Sep 2020 03:39:45 -0400 Subject: [PATCH] mem-garnet: Upgrade garnet version to 3.0 This version of garnet includes HeteroGarnet which supports heterogenous interconnect systems, flexible router and link configurations, and better debugging resources. This patch changes the garnet directory structure to not include the version number. The user will be informed about the garnet version being used. Change-Id: Id4763421528305193ae0cd10c159b385a9513553 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34259 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- configs/network/Network.py | 25 +++++++++++++------ .../{garnet2.0 => garnet}/CommonTypes.hh | 6 ++--- .../network/{garnet2.0 => garnet}/Credit.cc | 2 +- .../network/{garnet2.0 => garnet}/Credit.hh | 10 ++++---- .../{garnet2.0 => garnet}/CreditLink.hh | 8 +++--- .../{garnet2.0 => garnet}/CrossbarSwitch.cc | 6 ++--- .../{garnet2.0 => garnet}/CrossbarSwitch.hh | 10 ++++---- .../{garnet2.0 => garnet}/GarnetLink.cc | 8 +++--- .../{garnet2.0 => garnet}/GarnetLink.hh | 12 ++++----- .../{garnet2.0 => garnet}/GarnetLink.py | 10 ++++---- .../{garnet2.0 => garnet}/GarnetNetwork.cc | 17 +++++++------ .../{garnet2.0 => garnet}/GarnetNetwork.hh | 10 +++++--- .../{garnet2.0 => garnet}/GarnetNetwork.py | 6 ++--- .../{garnet2.0 => garnet}/InputUnit.cc | 6 ++--- .../{garnet2.0 => garnet}/InputUnit.hh | 18 ++++++------- .../{garnet2.0 => garnet}/NetworkBridge.cc | 2 +- .../{garnet2.0 => garnet}/NetworkBridge.hh | 16 ++++++------ .../{garnet2.0 => garnet}/NetworkInterface.cc | 6 ++--- .../{garnet2.0 => garnet}/NetworkInterface.hh | 18 ++++++------- .../{garnet2.0 => garnet}/NetworkLink.cc | 4 +-- .../{garnet2.0 => garnet}/NetworkLink.hh | 10 ++++---- .../{garnet2.0 => garnet}/OutVcState.cc | 2 +- .../{garnet2.0 => garnet}/OutVcState.hh | 10 ++++---- .../{garnet2.0 => garnet}/OutputUnit.cc | 10 ++++---- .../{garnet2.0 => garnet}/OutputUnit.hh | 12 ++++----- .../network/{garnet2.0 => garnet}/README.txt | 14 ++++++++--- .../network/{garnet2.0 => garnet}/Router.cc | 12 ++++----- .../network/{garnet2.0 => garnet}/Router.hh | 18 ++++++------- .../{garnet2.0 => garnet}/RoutingUnit.cc | 6 ++--- .../{garnet2.0 => garnet}/RoutingUnit.hh | 12 ++++----- .../network/{garnet2.0 => garnet}/SConscript | 0 .../{garnet2.0 => garnet}/SwitchAllocator.cc | 10 ++++---- .../{garnet2.0 => garnet}/SwitchAllocator.hh | 8 +++--- .../{garnet2.0 => garnet}/VirtualChannel.cc | 2 +- .../{garnet2.0 => garnet}/VirtualChannel.hh | 10 ++++---- .../network/{garnet2.0 => garnet}/flit.cc | 2 +- .../network/{garnet2.0 => garnet}/flit.hh | 8 +++--- .../{garnet2.0 => garnet}/flitBuffer.cc | 2 +- .../{garnet2.0 => garnet}/flitBuffer.hh | 10 ++++---- 39 files changed, 190 insertions(+), 168 deletions(-) rename src/mem/ruby/network/{garnet2.0 => garnet}/CommonTypes.hh (94%) rename src/mem/ruby/network/{garnet2.0 => garnet}/Credit.cc (98%) rename src/mem/ruby/network/{garnet2.0 => garnet}/Credit.hh (90%) rename src/mem/ruby/network/{garnet2.0 => garnet}/CreditLink.hh (89%) rename src/mem/ruby/network/{garnet2.0 => garnet}/CrossbarSwitch.cc (95%) rename src/mem/ruby/network/{garnet2.0 => garnet}/CrossbarSwitch.hh (89%) rename src/mem/ruby/network/{garnet2.0 => garnet}/GarnetLink.cc (95%) rename src/mem/ruby/network/{garnet2.0 => garnet}/GarnetLink.hh (90%) rename src/mem/ruby/network/{garnet2.0 => garnet}/GarnetLink.py (95%) rename src/mem/ruby/network/{garnet2.0 => garnet}/GarnetNetwork.cc (97%) rename src/mem/ruby/network/{garnet2.0 => garnet}/GarnetNetwork.hh (96%) rename src/mem/ruby/network/{garnet2.0 => garnet}/GarnetNetwork.py (95%) rename src/mem/ruby/network/{garnet2.0 => garnet}/InputUnit.cc (97%) rename src/mem/ruby/network/{garnet2.0 => garnet}/InputUnit.hh (90%) rename src/mem/ruby/network/{garnet2.0 => garnet}/NetworkBridge.cc (99%) rename src/mem/ruby/network/{garnet2.0 => garnet}/NetworkBridge.hh (86%) rename src/mem/ruby/network/{garnet2.0 => garnet}/NetworkInterface.cc (99%) rename src/mem/ruby/network/{garnet2.0 => garnet}/NetworkInterface.hh (94%) rename src/mem/ruby/network/{garnet2.0 => garnet}/NetworkLink.cc (97%) rename src/mem/ruby/network/{garnet2.0 => garnet}/NetworkLink.hh (92%) rename src/mem/ruby/network/{garnet2.0 => garnet}/OutVcState.cc (97%) rename src/mem/ruby/network/{garnet2.0 => garnet}/OutVcState.hh (89%) rename src/mem/ruby/network/{garnet2.0 => garnet}/OutputUnit.cc (95%) rename src/mem/ruby/network/{garnet2.0 => garnet}/OutputUnit.hh (91%) rename src/mem/ruby/network/{garnet2.0 => garnet}/README.txt (89%) rename src/mem/ruby/network/{garnet2.0 => garnet}/Router.cc (96%) rename src/mem/ruby/network/{garnet2.0 => garnet}/Router.hh (91%) rename src/mem/ruby/network/{garnet2.0 => garnet}/RoutingUnit.cc (98%) rename src/mem/ruby/network/{garnet2.0 => garnet}/RoutingUnit.hh (91%) rename src/mem/ruby/network/{garnet2.0 => garnet}/SConscript (100%) rename src/mem/ruby/network/{garnet2.0 => garnet}/SwitchAllocator.cc (98%) rename src/mem/ruby/network/{garnet2.0 => garnet}/SwitchAllocator.hh (92%) rename src/mem/ruby/network/{garnet2.0 => garnet}/VirtualChannel.cc (97%) rename src/mem/ruby/network/{garnet2.0 => garnet}/VirtualChannel.hh (91%) rename src/mem/ruby/network/{garnet2.0 => garnet}/flit.cc (98%) rename src/mem/ruby/network/{garnet2.0 => garnet}/flit.hh (95%) rename src/mem/ruby/network/{garnet2.0 => garnet}/flitBuffer.cc (98%) rename src/mem/ruby/network/{garnet2.0 => garnet}/flitBuffer.hh (90%) diff --git a/configs/network/Network.py b/configs/network/Network.py index 20d68c0ae..a907d9ac4 100644 --- a/configs/network/Network.py +++ b/configs/network/Network.py @@ -31,7 +31,7 @@ import math import m5 from m5.objects import * from m5.defines import buildEnv -from m5.util import addToPath, fatal +from m5.util import addToPath, fatal, warn def define_options(parser): # By default, ruby uses the simple timing cpu @@ -42,8 +42,9 @@ def define_options(parser): parser.add_option("--mesh-rows", type="int", default=0, help="the number of rows in the mesh topology") parser.add_option("--network", type="choice", default="simple", - choices=['simple', 'garnet2.0'], - help="'simple'|'garnet2.0'") + choices=['simple', 'garnet'], + help="""'simple'|'garnet' (garnet2.0 will be + deprecated.)""") parser.add_option("--router-latency", action="store", type="int", default=1, help="""number of pipeline stages in the garnet router. @@ -65,8 +66,8 @@ def define_options(parser): default=0, help="""routing algorithm in network. 0: weight-based table - 1: XY (for Mesh. see garnet2.0/RoutingUnit.cc) - 2: Custom (see garnet2.0/RoutingUnit.cc""") + 1: XY (for Mesh. see garnet/RoutingUnit.cc) + 2: Custom (see garnet/RoutingUnit.cc""") parser.add_option("--network-fault-model", action="store_true", default=False, help="""enable network fault model: @@ -77,8 +78,16 @@ def define_options(parser): def create_network(options, ruby): - # Set the network classes based on the command line options + # Allow legacy users to use garnet through garnet2.0 option + # until next gem5 release. if options.network == "garnet2.0": + warn("Usage of option 'garnet2.0' will be depracated. " \ + "Please use 'garnet' for using the latest garnet " \ + "version. Current version: 3.0") + options.network = "garnet" + + # Set the network classes based on the command line options + if options.network == "garnet": NetworkClass = GarnetNetwork IntLinkClass = GarnetIntLink ExtLinkClass = GarnetExtLink @@ -101,7 +110,7 @@ def create_network(options, ruby): def init_network(options, network, InterfaceClass): - if options.network == "garnet2.0": + if options.network == "garnet": network.num_rows = options.mesh_rows network.vcs_per_vnet = options.vcs_per_vnet network.ni_flit_size = options.link_width_bits / 8 @@ -181,6 +190,6 @@ def init_network(options, network, InterfaceClass): network.netifs = netifs if options.network_fault_model: - assert(options.network == "garnet2.0") + assert(options.network == "garnet") network.enable_fault_model = True network.fault_model = FaultModel() diff --git a/src/mem/ruby/network/garnet2.0/CommonTypes.hh b/src/mem/ruby/network/garnet/CommonTypes.hh similarity index 94% rename from src/mem/ruby/network/garnet2.0/CommonTypes.hh rename to src/mem/ruby/network/garnet/CommonTypes.hh index 643ce8cda..affbccc52 100644 --- a/src/mem/ruby/network/garnet2.0/CommonTypes.hh +++ b/src/mem/ruby/network/garnet/CommonTypes.hh @@ -28,8 +28,8 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_COMMONTYPES_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_COMMONTYPES_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_COMMONTYPES_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_COMMONTYPES_HH__ #include "mem/ruby/common/NetDest.hh" @@ -65,4 +65,4 @@ struct RouteInfo #define INFINITE_ 10000 -#endif //__MEM_RUBY_NETWORK_GARNET2_0_COMMONTYPES_HH__ +#endif //__MEM_RUBY_NETWORK_GARNET_0_COMMONTYPES_HH__ diff --git a/src/mem/ruby/network/garnet2.0/Credit.cc b/src/mem/ruby/network/garnet/Credit.cc similarity index 98% rename from src/mem/ruby/network/garnet2.0/Credit.cc rename to src/mem/ruby/network/garnet/Credit.cc index bde9484b8..b24003f45 100644 --- a/src/mem/ruby/network/garnet2.0/Credit.cc +++ b/src/mem/ruby/network/garnet/Credit.cc @@ -27,7 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "mem/ruby/network/garnet2.0/Credit.hh" +#include "mem/ruby/network/garnet/Credit.hh" #include "base/trace.hh" #include "debug/RubyNetwork.hh" diff --git a/src/mem/ruby/network/garnet2.0/Credit.hh b/src/mem/ruby/network/garnet/Credit.hh similarity index 90% rename from src/mem/ruby/network/garnet2.0/Credit.hh rename to src/mem/ruby/network/garnet/Credit.hh index bcfd76f24..db5823c47 100644 --- a/src/mem/ruby/network/garnet2.0/Credit.hh +++ b/src/mem/ruby/network/garnet/Credit.hh @@ -28,15 +28,15 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_CREDIT_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_CREDIT_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_CREDIT_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_CREDIT_HH__ #include #include #include "base/types.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/flit.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/flit.hh" // Credit Signal for buffers inside VC // Carries m_vc (inherits from flit.hh) @@ -61,4 +61,4 @@ class Credit : public flit bool m_is_free_signal; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_CREDIT_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_CREDIT_HH__ diff --git a/src/mem/ruby/network/garnet2.0/CreditLink.hh b/src/mem/ruby/network/garnet/CreditLink.hh similarity index 89% rename from src/mem/ruby/network/garnet2.0/CreditLink.hh rename to src/mem/ruby/network/garnet/CreditLink.hh index 13e670d24..87358247b 100644 --- a/src/mem/ruby/network/garnet2.0/CreditLink.hh +++ b/src/mem/ruby/network/garnet/CreditLink.hh @@ -28,10 +28,10 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_CREDITLINK_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_CREDITLINK_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_CREDITLINK_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_CREDITLINK_HH__ -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" #include "params/CreditLink.hh" class CreditLink : public NetworkLink @@ -41,4 +41,4 @@ class CreditLink : public NetworkLink CreditLink(const Params *p) : NetworkLink(p) {} }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_CREDITLINK_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_CREDITLINK_HH__ diff --git a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc b/src/mem/ruby/network/garnet/CrossbarSwitch.cc similarity index 95% rename from src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc rename to src/mem/ruby/network/garnet/CrossbarSwitch.cc index 3148446aa..6b158df2c 100644 --- a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc +++ b/src/mem/ruby/network/garnet/CrossbarSwitch.cc @@ -29,11 +29,11 @@ */ -#include "mem/ruby/network/garnet2.0/CrossbarSwitch.hh" +#include "mem/ruby/network/garnet/CrossbarSwitch.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/OutputUnit.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" +#include "mem/ruby/network/garnet/OutputUnit.hh" +#include "mem/ruby/network/garnet/Router.hh" CrossbarSwitch::CrossbarSwitch(Router *router) : Consumer(router), m_router(router), m_num_vcs(m_router->get_num_vcs()), diff --git a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh b/src/mem/ruby/network/garnet/CrossbarSwitch.hh similarity index 89% rename from src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh rename to src/mem/ruby/network/garnet/CrossbarSwitch.hh index 7dee78439..ee3a5eca4 100644 --- a/src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh +++ b/src/mem/ruby/network/garnet/CrossbarSwitch.hh @@ -29,15 +29,15 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_CROSSBARSWITCH_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_CROSSBARSWITCH_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_CROSSBARSWITCH_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_CROSSBARSWITCH_HH__ #include #include #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" class Router; @@ -68,4 +68,4 @@ class CrossbarSwitch : public Consumer std::vector switchBuffers; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_CROSSBARSWITCH_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_CROSSBARSWITCH_HH__ diff --git a/src/mem/ruby/network/garnet2.0/GarnetLink.cc b/src/mem/ruby/network/garnet/GarnetLink.cc similarity index 95% rename from src/mem/ruby/network/garnet2.0/GarnetLink.cc rename to src/mem/ruby/network/garnet/GarnetLink.cc index 99d891f95..ae969330d 100644 --- a/src/mem/ruby/network/garnet2.0/GarnetLink.cc +++ b/src/mem/ruby/network/garnet/GarnetLink.cc @@ -28,12 +28,12 @@ */ -#include "mem/ruby/network/garnet2.0/GarnetLink.hh" +#include "mem/ruby/network/garnet/GarnetLink.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/NetworkBridge.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/NetworkBridge.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" GarnetIntLink::GarnetIntLink(const Params *p) : BasicIntLink(p) diff --git a/src/mem/ruby/network/garnet2.0/GarnetLink.hh b/src/mem/ruby/network/garnet/GarnetLink.hh similarity index 90% rename from src/mem/ruby/network/garnet2.0/GarnetLink.hh rename to src/mem/ruby/network/garnet/GarnetLink.hh index 089bcce45..554a0da5b 100644 --- a/src/mem/ruby/network/garnet2.0/GarnetLink.hh +++ b/src/mem/ruby/network/garnet/GarnetLink.hh @@ -28,17 +28,17 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_GARNETLINK_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_GARNETLINK_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_GARNETLINK_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_GARNETLINK_HH__ #include #include #include #include "mem/ruby/network/BasicLink.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/NetworkBridge.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/NetworkBridge.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" #include "params/GarnetExtLink.hh" #include "params/GarnetIntLink.hh" @@ -123,4 +123,4 @@ operator<<(std::ostream& out, const GarnetExtLink& obj) return out; } -#endif //__MEM_RUBY_NETWORK_GARNET2_0_GARNETLINK_HH__ +#endif //__MEM_RUBY_NETWORK_GARNET_0_GARNETLINK_HH__ diff --git a/src/mem/ruby/network/garnet2.0/GarnetLink.py b/src/mem/ruby/network/garnet/GarnetLink.py similarity index 95% rename from src/mem/ruby/network/garnet2.0/GarnetLink.py rename to src/mem/ruby/network/garnet/GarnetLink.py index 9f7fe8b14..45350b580 100644 --- a/src/mem/ruby/network/garnet2.0/GarnetLink.py +++ b/src/mem/ruby/network/garnet/GarnetLink.py @@ -37,7 +37,7 @@ class CDCType(Enum): vals = [ class NetworkLink(ClockedObject): type = 'NetworkLink' - cxx_header = "mem/ruby/network/garnet2.0/NetworkLink.hh" + cxx_header = "mem/ruby/network/garnet/NetworkLink.hh" link_id = Param.Int(Parent.link_id, "link id") link_latency = Param.Cycles(Parent.latency, "link latency") vcs_per_vnet = Param.Int(Parent.vcs_per_vnet, @@ -50,11 +50,11 @@ class NetworkLink(ClockedObject): class CreditLink(NetworkLink): type = 'CreditLink' - cxx_header = "mem/ruby/network/garnet2.0/CreditLink.hh" + cxx_header = "mem/ruby/network/garnet/CreditLink.hh" class NetworkBridge(CreditLink): type = 'NetworkBridge' - cxx_header = "mem/ruby/network/garnet2.0/NetworkBridge.hh" + cxx_header = "mem/ruby/network/garnet/NetworkBridge.hh" link = Param.NetworkLink("Associated Network Link") vtype = Param.CDCType('LINK_OBJECT', "Direction of CDC LINK->OBJECT or OBJECT->LINK") @@ -64,7 +64,7 @@ class NetworkBridge(CreditLink): # Interior fixed pipeline links between routers class GarnetIntLink(BasicIntLink): type = 'GarnetIntLink' - cxx_header = "mem/ruby/network/garnet2.0/GarnetLink.hh" + cxx_header = "mem/ruby/network/garnet/GarnetLink.hh" # The internal link includes one forward link (for flit) # and one backward flow-control link (for credit) network_link = Param.NetworkLink(NetworkLink(), "forward link") @@ -101,7 +101,7 @@ class GarnetIntLink(BasicIntLink): # Exterior fixed pipeline links between a router and a controller class GarnetExtLink(BasicExtLink): type = 'GarnetExtLink' - cxx_header = "mem/ruby/network/garnet2.0/GarnetLink.hh" + cxx_header = "mem/ruby/network/garnet/GarnetLink.hh" # The external link is bi-directional. # It includes two forward links (for flits) # and two backward flow-control links (for credits), diff --git a/src/mem/ruby/network/garnet2.0/GarnetNetwork.cc b/src/mem/ruby/network/garnet/GarnetNetwork.cc similarity index 97% rename from src/mem/ruby/network/garnet2.0/GarnetNetwork.cc rename to src/mem/ruby/network/garnet/GarnetNetwork.cc index bcc476fe2..833410735 100644 --- a/src/mem/ruby/network/garnet2.0/GarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/GarnetNetwork.cc @@ -29,7 +29,7 @@ */ -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" #include @@ -37,12 +37,12 @@ #include "debug/RubyNetwork.hh" #include "mem/ruby/common/NetDest.hh" #include "mem/ruby/network/MessageBuffer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/GarnetLink.hh" -#include "mem/ruby/network/garnet2.0/NetworkInterface.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/GarnetLink.hh" +#include "mem/ruby/network/garnet/NetworkInterface.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" +#include "mem/ruby/network/garnet/Router.hh" #include "mem/ruby/system/RubySystem.hh" using namespace std; @@ -93,6 +93,9 @@ GarnetNetwork::GarnetNetwork(const Params *p) m_nis.push_back(ni); ni->init_net_ptr(this); } + + // Print Garnet version + inform("Garnet version %s\n", garnetVersion); } void diff --git a/src/mem/ruby/network/garnet2.0/GarnetNetwork.hh b/src/mem/ruby/network/garnet/GarnetNetwork.hh similarity index 96% rename from src/mem/ruby/network/garnet2.0/GarnetNetwork.hh rename to src/mem/ruby/network/garnet/GarnetNetwork.hh index bb4b24a8a..2f9f543bc 100644 --- a/src/mem/ruby/network/garnet2.0/GarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/GarnetNetwork.hh @@ -29,15 +29,15 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_GARNETNETWORK_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_GARNETNETWORK_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_GARNETNETWORK_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_GARNETNETWORK_HH__ #include #include #include "mem/ruby/network/Network.hh" #include "mem/ruby/network/fault_model/FaultModel.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" #include "params/GarnetNetwork.hh" class FaultModel; @@ -56,6 +56,8 @@ class GarnetNetwork : public Network void init(); + const char *garnetVersion = "3.0"; + // Configuration (set externally) // for 2D topology @@ -202,4 +204,4 @@ operator<<(std::ostream& out, const GarnetNetwork& obj) return out; } -#endif //__MEM_RUBY_NETWORK_GARNET2_0_GARNETNETWORK_HH__ +#endif //__MEM_RUBY_NETWORK_GARNET_0_GARNETNETWORK_HH__ diff --git a/src/mem/ruby/network/garnet2.0/GarnetNetwork.py b/src/mem/ruby/network/garnet/GarnetNetwork.py similarity index 95% rename from src/mem/ruby/network/garnet2.0/GarnetNetwork.py rename to src/mem/ruby/network/garnet/GarnetNetwork.py index 012ab60d8..d7a3f0d14 100644 --- a/src/mem/ruby/network/garnet2.0/GarnetNetwork.py +++ b/src/mem/ruby/network/garnet/GarnetNetwork.py @@ -36,7 +36,7 @@ from m5.objects.ClockedObject import ClockedObject class GarnetNetwork(RubyNetwork): type = 'GarnetNetwork' - cxx_header = "mem/ruby/network/garnet2.0/GarnetNetwork.hh" + cxx_header = "mem/ruby/network/garnet/GarnetNetwork.hh" num_rows = Param.Int(0, "number of rows if 2D (mesh/torus/..) topology"); ni_flit_size = Param.UInt32(16, "network interface flit size in bytes") vcs_per_vnet = Param.UInt32(4, "virtual channels per virtual network"); @@ -52,7 +52,7 @@ class GarnetNetwork(RubyNetwork): class GarnetNetworkInterface(ClockedObject): type = 'GarnetNetworkInterface' cxx_class = 'NetworkInterface' - cxx_header = "mem/ruby/network/garnet2.0/NetworkInterface.hh" + cxx_header = "mem/ruby/network/garnet/NetworkInterface.hh" id = Param.UInt32("ID in relation to other network interfaces") vcs_per_vnet = Param.UInt32(Parent.vcs_per_vnet, @@ -65,7 +65,7 @@ class GarnetNetworkInterface(ClockedObject): class GarnetRouter(BasicRouter): type = 'GarnetRouter' cxx_class = 'Router' - cxx_header = "mem/ruby/network/garnet2.0/Router.hh" + cxx_header = "mem/ruby/network/garnet/Router.hh" vcs_per_vnet = Param.UInt32(Parent.vcs_per_vnet, "virtual channels per virtual network") virt_nets = Param.UInt32(Parent.number_of_virtual_networks, diff --git a/src/mem/ruby/network/garnet2.0/InputUnit.cc b/src/mem/ruby/network/garnet/InputUnit.cc similarity index 97% rename from src/mem/ruby/network/garnet2.0/InputUnit.cc rename to src/mem/ruby/network/garnet/InputUnit.cc index db24aefad..72c1b5c89 100644 --- a/src/mem/ruby/network/garnet2.0/InputUnit.cc +++ b/src/mem/ruby/network/garnet/InputUnit.cc @@ -29,11 +29,11 @@ */ -#include "mem/ruby/network/garnet2.0/InputUnit.hh" +#include "mem/ruby/network/garnet/InputUnit.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/Credit.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" +#include "mem/ruby/network/garnet/Credit.hh" +#include "mem/ruby/network/garnet/Router.hh" using namespace std; diff --git a/src/mem/ruby/network/garnet2.0/InputUnit.hh b/src/mem/ruby/network/garnet/InputUnit.hh similarity index 90% rename from src/mem/ruby/network/garnet2.0/InputUnit.hh rename to src/mem/ruby/network/garnet/InputUnit.hh index 40ef251fb..e57f0be73 100644 --- a/src/mem/ruby/network/garnet2.0/InputUnit.hh +++ b/src/mem/ruby/network/garnet/InputUnit.hh @@ -29,19 +29,19 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_INPUTUNIT_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_INPUTUNIT_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_INPUTUNIT_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_INPUTUNIT_HH__ #include #include #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" -#include "mem/ruby/network/garnet2.0/VirtualChannel.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" +#include "mem/ruby/network/garnet/Router.hh" +#include "mem/ruby/network/garnet/VirtualChannel.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" class InputUnit : public Consumer { @@ -163,4 +163,4 @@ class InputUnit : public Consumer std::vector m_num_buffer_reads; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_INPUTUNIT_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_INPUTUNIT_HH__ diff --git a/src/mem/ruby/network/garnet2.0/NetworkBridge.cc b/src/mem/ruby/network/garnet/NetworkBridge.cc similarity index 99% rename from src/mem/ruby/network/garnet2.0/NetworkBridge.cc rename to src/mem/ruby/network/garnet/NetworkBridge.cc index e7d340a80..9a1490c64 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkBridge.cc +++ b/src/mem/ruby/network/garnet/NetworkBridge.cc @@ -34,7 +34,7 @@ */ -#include "mem/ruby/network/garnet2.0/NetworkBridge.hh" +#include "mem/ruby/network/garnet/NetworkBridge.hh" #include diff --git a/src/mem/ruby/network/garnet2.0/NetworkBridge.hh b/src/mem/ruby/network/garnet/NetworkBridge.hh similarity index 86% rename from src/mem/ruby/network/garnet2.0/NetworkBridge.hh rename to src/mem/ruby/network/garnet/NetworkBridge.hh index 0e8ac0ca1..c6c37cb79 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkBridge.hh +++ b/src/mem/ruby/network/garnet/NetworkBridge.hh @@ -33,19 +33,19 @@ * Authors: Srikant Bharadwaj */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_NETWORK_BRIDGE_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_NETWORK_BRIDGE_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_NETWORK_BRIDGE_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_NETWORK_BRIDGE_HH__ #include #include #include #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/GarnetLink.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/GarnetLink.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" #include "params/NetworkBridge.hh" class GarnetNetwork; @@ -97,4 +97,4 @@ class NetworkBridge: public CreditLink }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_NETWORK_BRIDGE_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_NETWORK_BRIDGE_HH__ diff --git a/src/mem/ruby/network/garnet2.0/NetworkInterface.cc b/src/mem/ruby/network/garnet/NetworkInterface.cc similarity index 99% rename from src/mem/ruby/network/garnet2.0/NetworkInterface.cc rename to src/mem/ruby/network/garnet/NetworkInterface.cc index 1b3c2620a..6dbe0d999 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkInterface.cc +++ b/src/mem/ruby/network/garnet/NetworkInterface.cc @@ -30,7 +30,7 @@ */ -#include "mem/ruby/network/garnet2.0/NetworkInterface.hh" +#include "mem/ruby/network/garnet/NetworkInterface.hh" #include #include @@ -38,8 +38,8 @@ #include "base/cast.hh" #include "debug/RubyNetwork.hh" #include "mem/ruby/network/MessageBuffer.hh" -#include "mem/ruby/network/garnet2.0/Credit.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/Credit.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" #include "mem/ruby/slicc_interface/Message.hh" using namespace std; diff --git a/src/mem/ruby/network/garnet2.0/NetworkInterface.hh b/src/mem/ruby/network/garnet/NetworkInterface.hh similarity index 94% rename from src/mem/ruby/network/garnet2.0/NetworkInterface.hh rename to src/mem/ruby/network/garnet/NetworkInterface.hh index 09a13d94e..2f9077220 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkInterface.hh +++ b/src/mem/ruby/network/garnet/NetworkInterface.hh @@ -30,19 +30,19 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_NETWORKINTERFACE_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_NETWORKINTERFACE_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_NETWORKINTERFACE_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_NETWORKINTERFACE_HH__ #include #include #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/Credit.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" -#include "mem/ruby/network/garnet2.0/OutVcState.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/Credit.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" +#include "mem/ruby/network/garnet/OutVcState.hh" #include "mem/ruby/slicc_interface/Message.hh" #include "params/GarnetNetworkInterface.hh" @@ -297,4 +297,4 @@ class NetworkInterface : public ClockedObject, public Consumer OutputPort *getOutportForVnet(int vnet); }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_NETWORKINTERFACE_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_NETWORKINTERFACE_HH__ diff --git a/src/mem/ruby/network/garnet2.0/NetworkLink.cc b/src/mem/ruby/network/garnet/NetworkLink.cc similarity index 97% rename from src/mem/ruby/network/garnet2.0/NetworkLink.cc rename to src/mem/ruby/network/garnet/NetworkLink.cc index e947781e9..872159db5 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkLink.cc +++ b/src/mem/ruby/network/garnet/NetworkLink.cc @@ -30,11 +30,11 @@ */ -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" #include "base/trace.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" NetworkLink::NetworkLink(const Params *p) : ClockedObject(p), Consumer(this), m_id(p->link_id), diff --git a/src/mem/ruby/network/garnet2.0/NetworkLink.hh b/src/mem/ruby/network/garnet/NetworkLink.hh similarity index 92% rename from src/mem/ruby/network/garnet2.0/NetworkLink.hh rename to src/mem/ruby/network/garnet/NetworkLink.hh index 9cf2efb92..22b1a7c72 100644 --- a/src/mem/ruby/network/garnet2.0/NetworkLink.hh +++ b/src/mem/ruby/network/garnet/NetworkLink.hh @@ -30,15 +30,15 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_NETWORKLINK_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_NETWORKLINK_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_NETWORKLINK_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_NETWORKLINK_HH__ #include #include #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" #include "params/NetworkLink.hh" #include "sim/clocked_object.hh" @@ -97,4 +97,4 @@ class NetworkLink : public ClockedObject, public Consumer }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_NETWORKLINK_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_NETWORKLINK_HH__ diff --git a/src/mem/ruby/network/garnet2.0/OutVcState.cc b/src/mem/ruby/network/garnet/OutVcState.cc similarity index 97% rename from src/mem/ruby/network/garnet2.0/OutVcState.cc rename to src/mem/ruby/network/garnet/OutVcState.cc index 812038de2..1bb869868 100644 --- a/src/mem/ruby/network/garnet2.0/OutVcState.cc +++ b/src/mem/ruby/network/garnet/OutVcState.cc @@ -28,7 +28,7 @@ */ -#include "mem/ruby/network/garnet2.0/OutVcState.hh" +#include "mem/ruby/network/garnet/OutVcState.hh" #include "mem/ruby/system/RubySystem.hh" diff --git a/src/mem/ruby/network/garnet2.0/OutVcState.hh b/src/mem/ruby/network/garnet/OutVcState.hh similarity index 89% rename from src/mem/ruby/network/garnet2.0/OutVcState.hh rename to src/mem/ruby/network/garnet/OutVcState.hh index 915c46f1c..c78af08eb 100644 --- a/src/mem/ruby/network/garnet2.0/OutVcState.hh +++ b/src/mem/ruby/network/garnet/OutVcState.hh @@ -28,11 +28,11 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_OUTVCSTATE_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_OUTVCSTATE_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_OUTVCSTATE_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_OUTVCSTATE_HH__ -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" class OutVcState { @@ -64,4 +64,4 @@ class OutVcState int m_max_credit_count; }; -#endif //__MEM_RUBY_NETWORK_GARNET2_0_OUTVCSTATE_HH__ +#endif //__MEM_RUBY_NETWORK_GARNET_0_OUTVCSTATE_HH__ diff --git a/src/mem/ruby/network/garnet2.0/OutputUnit.cc b/src/mem/ruby/network/garnet/OutputUnit.cc similarity index 95% rename from src/mem/ruby/network/garnet2.0/OutputUnit.cc rename to src/mem/ruby/network/garnet/OutputUnit.cc index dfa63e3d9..ac9673c7d 100644 --- a/src/mem/ruby/network/garnet2.0/OutputUnit.cc +++ b/src/mem/ruby/network/garnet/OutputUnit.cc @@ -29,13 +29,13 @@ */ -#include "mem/ruby/network/garnet2.0/OutputUnit.hh" +#include "mem/ruby/network/garnet/OutputUnit.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/Credit.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/Credit.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/Router.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" OutputUnit::OutputUnit(int id, PortDirection direction, Router *router, uint32_t consumerVcs) diff --git a/src/mem/ruby/network/garnet2.0/OutputUnit.hh b/src/mem/ruby/network/garnet/OutputUnit.hh similarity index 91% rename from src/mem/ruby/network/garnet2.0/OutputUnit.hh rename to src/mem/ruby/network/garnet/OutputUnit.hh index 3e80dde8d..3cb924d2c 100644 --- a/src/mem/ruby/network/garnet2.0/OutputUnit.hh +++ b/src/mem/ruby/network/garnet/OutputUnit.hh @@ -29,17 +29,17 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_OUTPUTUNIT_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_OUTPUTUNIT_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_OUTPUTUNIT_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_OUTPUTUNIT_HH__ #include #include #include "base/compiler.hh" #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" -#include "mem/ruby/network/garnet2.0/OutVcState.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" +#include "mem/ruby/network/garnet/OutVcState.hh" class CreditLink; class Router; @@ -111,4 +111,4 @@ class OutputUnit : public Consumer std::vector outVcState; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_OUTPUTUNIT_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_OUTPUTUNIT_HH__ diff --git a/src/mem/ruby/network/garnet2.0/README.txt b/src/mem/ruby/network/garnet/README.txt similarity index 89% rename from src/mem/ruby/network/garnet2.0/README.txt rename to src/mem/ruby/network/garnet/README.txt index 817b1d48d..573ab6072 100644 --- a/src/mem/ruby/network/garnet2.0/README.txt +++ b/src/mem/ruby/network/garnet/README.txt @@ -1,6 +1,6 @@ -README for Garnet2.0 +README for Garnet3.0 Written By: Tushar Krishna (tushar@ece.gatech.edu) -Last Updated: Jul 9, 2016 +Last Updated: Sep 9, 2020 ------------------------------------------------------- Garnet Network Parameters and Setup: @@ -15,7 +15,7 @@ CODE FLOW - NetworkInterface.cc::wakeup() * Every NI connected to one coherence protocol controller on one end, and one router on the other. * receives messages from coherence protocol buffer in appropriate vnet and converts them into network packets and sends them into the network. - * garnet2.0 adds the ability to capture a network trace at this point. + * garnet adds the ability to capture a network trace at this point. * receives flits from the network, extracts the protocol message and sends it to the coherence protocol buffer in appropriate vnet. * manages flow-control (i.e., credits) with its attached router. * The consuming flit/credit output link of the NI is put in the global event queue with a timestamp set to next cycle. @@ -69,3 +69,11 @@ CODE FLOW The eventqueue calls the wakeup function in the consumer. +If a clock domain crossing(CDC) or Serializer-Deserializer unit is +instantiated, then the Network Brisge takes over the flit in HeteroGarnet. +- NetworkBridge::wakeup() + * Check if SerDes is enabled and do appropriate calculations for + serializing or deserializing the flits + * Check if CDC is enabled and schedule all the flits according + to the consumers clock domain. + diff --git a/src/mem/ruby/network/garnet2.0/Router.cc b/src/mem/ruby/network/garnet/Router.cc similarity index 96% rename from src/mem/ruby/network/garnet2.0/Router.cc rename to src/mem/ruby/network/garnet/Router.cc index 9802b6922..47cb9be08 100644 --- a/src/mem/ruby/network/garnet2.0/Router.cc +++ b/src/mem/ruby/network/garnet/Router.cc @@ -30,14 +30,14 @@ */ -#include "mem/ruby/network/garnet2.0/Router.hh" +#include "mem/ruby/network/garnet/Router.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/CreditLink.hh" -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" -#include "mem/ruby/network/garnet2.0/InputUnit.hh" -#include "mem/ruby/network/garnet2.0/NetworkLink.hh" -#include "mem/ruby/network/garnet2.0/OutputUnit.hh" +#include "mem/ruby/network/garnet/CreditLink.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/InputUnit.hh" +#include "mem/ruby/network/garnet/NetworkLink.hh" +#include "mem/ruby/network/garnet/OutputUnit.hh" using namespace std; diff --git a/src/mem/ruby/network/garnet2.0/Router.hh b/src/mem/ruby/network/garnet/Router.hh similarity index 91% rename from src/mem/ruby/network/garnet2.0/Router.hh rename to src/mem/ruby/network/garnet/Router.hh index 312ab4de2..59d16bdf0 100644 --- a/src/mem/ruby/network/garnet2.0/Router.hh +++ b/src/mem/ruby/network/garnet/Router.hh @@ -29,8 +29,8 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_ROUTER_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_ROUTER_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_ROUTER_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_ROUTER_HH__ #include #include @@ -39,12 +39,12 @@ #include "mem/ruby/common/Consumer.hh" #include "mem/ruby/common/NetDest.hh" #include "mem/ruby/network/BasicRouter.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/CrossbarSwitch.hh" -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" -#include "mem/ruby/network/garnet2.0/RoutingUnit.hh" -#include "mem/ruby/network/garnet2.0/SwitchAllocator.hh" -#include "mem/ruby/network/garnet2.0/flit.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/CrossbarSwitch.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/RoutingUnit.hh" +#include "mem/ruby/network/garnet/SwitchAllocator.hh" +#include "mem/ruby/network/garnet/flit.hh" #include "params/GarnetRouter.hh" class NetworkLink; @@ -154,4 +154,4 @@ class Router : public BasicRouter, public Consumer Stats::Scalar m_crossbar_activity; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_ROUTER_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_ROUTER_HH__ diff --git a/src/mem/ruby/network/garnet2.0/RoutingUnit.cc b/src/mem/ruby/network/garnet/RoutingUnit.cc similarity index 98% rename from src/mem/ruby/network/garnet2.0/RoutingUnit.cc rename to src/mem/ruby/network/garnet/RoutingUnit.cc index 5ba0dec6b..835f05290 100644 --- a/src/mem/ruby/network/garnet2.0/RoutingUnit.cc +++ b/src/mem/ruby/network/garnet/RoutingUnit.cc @@ -28,12 +28,12 @@ */ -#include "mem/ruby/network/garnet2.0/RoutingUnit.hh" +#include "mem/ruby/network/garnet/RoutingUnit.hh" #include "base/cast.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/InputUnit.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" +#include "mem/ruby/network/garnet/InputUnit.hh" +#include "mem/ruby/network/garnet/Router.hh" #include "mem/ruby/slicc_interface/Message.hh" RoutingUnit::RoutingUnit(Router *router) diff --git a/src/mem/ruby/network/garnet2.0/RoutingUnit.hh b/src/mem/ruby/network/garnet/RoutingUnit.hh similarity index 91% rename from src/mem/ruby/network/garnet2.0/RoutingUnit.hh rename to src/mem/ruby/network/garnet/RoutingUnit.hh index a0ed90127..8881ea413 100644 --- a/src/mem/ruby/network/garnet2.0/RoutingUnit.hh +++ b/src/mem/ruby/network/garnet/RoutingUnit.hh @@ -28,14 +28,14 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_ROUTINGUNIT_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_ROUTINGUNIT_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_ROUTINGUNIT_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_ROUTINGUNIT_HH__ #include "mem/ruby/common/Consumer.hh" #include "mem/ruby/common/NetDest.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" -#include "mem/ruby/network/garnet2.0/flit.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/flit.hh" class InputUnit; class Router; @@ -88,4 +88,4 @@ class RoutingUnit std::map m_outports_dirn2idx; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_ROUTINGUNIT_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_ROUTINGUNIT_HH__ diff --git a/src/mem/ruby/network/garnet2.0/SConscript b/src/mem/ruby/network/garnet/SConscript similarity index 100% rename from src/mem/ruby/network/garnet2.0/SConscript rename to src/mem/ruby/network/garnet/SConscript diff --git a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc b/src/mem/ruby/network/garnet/SwitchAllocator.cc similarity index 98% rename from src/mem/ruby/network/garnet2.0/SwitchAllocator.cc rename to src/mem/ruby/network/garnet/SwitchAllocator.cc index 1ed6de1e6..0b3141ed6 100644 --- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc +++ b/src/mem/ruby/network/garnet/SwitchAllocator.cc @@ -29,13 +29,13 @@ */ -#include "mem/ruby/network/garnet2.0/SwitchAllocator.hh" +#include "mem/ruby/network/garnet/SwitchAllocator.hh" #include "debug/RubyNetwork.hh" -#include "mem/ruby/network/garnet2.0/GarnetNetwork.hh" -#include "mem/ruby/network/garnet2.0/InputUnit.hh" -#include "mem/ruby/network/garnet2.0/OutputUnit.hh" -#include "mem/ruby/network/garnet2.0/Router.hh" +#include "mem/ruby/network/garnet/GarnetNetwork.hh" +#include "mem/ruby/network/garnet/InputUnit.hh" +#include "mem/ruby/network/garnet/OutputUnit.hh" +#include "mem/ruby/network/garnet/Router.hh" SwitchAllocator::SwitchAllocator(Router *router) : Consumer(router) diff --git a/src/mem/ruby/network/garnet2.0/SwitchAllocator.hh b/src/mem/ruby/network/garnet/SwitchAllocator.hh similarity index 92% rename from src/mem/ruby/network/garnet2.0/SwitchAllocator.hh rename to src/mem/ruby/network/garnet/SwitchAllocator.hh index b30973599..82ee67eea 100644 --- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.hh +++ b/src/mem/ruby/network/garnet/SwitchAllocator.hh @@ -29,14 +29,14 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_SWITCHALLOCATOR_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_SWITCHALLOCATOR_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_SWITCHALLOCATOR_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_SWITCHALLOCATOR_HH__ #include #include #include "mem/ruby/common/Consumer.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" class Router; class InputUnit; @@ -83,4 +83,4 @@ class SwitchAllocator : public Consumer std::vector> m_vc_winners; // a list for each outport }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_SWITCHALLOCATOR_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_SWITCHALLOCATOR_HH__ diff --git a/src/mem/ruby/network/garnet2.0/VirtualChannel.cc b/src/mem/ruby/network/garnet/VirtualChannel.cc similarity index 97% rename from src/mem/ruby/network/garnet2.0/VirtualChannel.cc rename to src/mem/ruby/network/garnet/VirtualChannel.cc index 0b53983f9..103566040 100644 --- a/src/mem/ruby/network/garnet2.0/VirtualChannel.cc +++ b/src/mem/ruby/network/garnet/VirtualChannel.cc @@ -29,7 +29,7 @@ */ -#include "mem/ruby/network/garnet2.0/VirtualChannel.hh" +#include "mem/ruby/network/garnet/VirtualChannel.hh" VirtualChannel::VirtualChannel() : inputBuffer(), m_vc_state(IDLE_, Tick(0)), m_output_port(-1), diff --git a/src/mem/ruby/network/garnet2.0/VirtualChannel.hh b/src/mem/ruby/network/garnet/VirtualChannel.hh similarity index 91% rename from src/mem/ruby/network/garnet2.0/VirtualChannel.hh rename to src/mem/ruby/network/garnet/VirtualChannel.hh index f20629964..c538451cc 100644 --- a/src/mem/ruby/network/garnet2.0/VirtualChannel.hh +++ b/src/mem/ruby/network/garnet/VirtualChannel.hh @@ -29,13 +29,13 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_VIRTUALCHANNEL_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_VIRTUALCHANNEL_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_VIRTUALCHANNEL_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_VIRTUALCHANNEL_HH__ #include -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" class VirtualChannel { @@ -96,4 +96,4 @@ class VirtualChannel int m_output_vc; }; -#endif // __MEM_RUBY_NETWORK_GARNET2_0_VIRTUALCHANNEL_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_VIRTUALCHANNEL_HH__ diff --git a/src/mem/ruby/network/garnet2.0/flit.cc b/src/mem/ruby/network/garnet/flit.cc similarity index 98% rename from src/mem/ruby/network/garnet2.0/flit.cc rename to src/mem/ruby/network/garnet/flit.cc index 28a79d4a4..50a8911f4 100644 --- a/src/mem/ruby/network/garnet2.0/flit.cc +++ b/src/mem/ruby/network/garnet/flit.cc @@ -28,7 +28,7 @@ */ -#include "mem/ruby/network/garnet2.0/flit.hh" +#include "mem/ruby/network/garnet/flit.hh" #include "base/intmath.hh" #include "debug/RubyNetwork.hh" diff --git a/src/mem/ruby/network/garnet2.0/flit.hh b/src/mem/ruby/network/garnet/flit.hh similarity index 95% rename from src/mem/ruby/network/garnet2.0/flit.hh rename to src/mem/ruby/network/garnet/flit.hh index 1bbd152a7..0396c97fc 100644 --- a/src/mem/ruby/network/garnet2.0/flit.hh +++ b/src/mem/ruby/network/garnet/flit.hh @@ -28,14 +28,14 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_FLIT_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_FLIT_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_FLIT_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_FLIT_HH__ #include #include #include "base/types.hh" -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" #include "mem/ruby/slicc_interface/Message.hh" class flit @@ -127,4 +127,4 @@ operator<<(std::ostream& out, const flit& obj) return out; } -#endif // __MEM_RUBY_NETWORK_GARNET2_0_FLIT_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_FLIT_HH__ diff --git a/src/mem/ruby/network/garnet2.0/flitBuffer.cc b/src/mem/ruby/network/garnet/flitBuffer.cc similarity index 98% rename from src/mem/ruby/network/garnet2.0/flitBuffer.cc rename to src/mem/ruby/network/garnet/flitBuffer.cc index c72163985..6c0c1ad2a 100644 --- a/src/mem/ruby/network/garnet2.0/flitBuffer.cc +++ b/src/mem/ruby/network/garnet/flitBuffer.cc @@ -29,7 +29,7 @@ */ -#include "mem/ruby/network/garnet2.0/flitBuffer.hh" +#include "mem/ruby/network/garnet/flitBuffer.hh" flitBuffer::flitBuffer() { diff --git a/src/mem/ruby/network/garnet2.0/flitBuffer.hh b/src/mem/ruby/network/garnet/flitBuffer.hh similarity index 90% rename from src/mem/ruby/network/garnet2.0/flitBuffer.hh rename to src/mem/ruby/network/garnet/flitBuffer.hh index f98ecf6df..40af826c4 100644 --- a/src/mem/ruby/network/garnet2.0/flitBuffer.hh +++ b/src/mem/ruby/network/garnet/flitBuffer.hh @@ -28,15 +28,15 @@ */ -#ifndef __MEM_RUBY_NETWORK_GARNET2_0_FLITBUFFER_HH__ -#define __MEM_RUBY_NETWORK_GARNET2_0_FLITBUFFER_HH__ +#ifndef __MEM_RUBY_NETWORK_GARNET_0_FLITBUFFER_HH__ +#define __MEM_RUBY_NETWORK_GARNET_0_FLITBUFFER_HH__ #include #include #include -#include "mem/ruby/network/garnet2.0/CommonTypes.hh" -#include "mem/ruby/network/garnet2.0/flit.hh" +#include "mem/ruby/network/garnet/CommonTypes.hh" +#include "mem/ruby/network/garnet/flit.hh" class flitBuffer { @@ -88,4 +88,4 @@ operator<<(std::ostream& out, const flitBuffer& obj) return out; } -#endif // __MEM_RUBY_NETWORK_GARNET2_0_FLITBUFFER_HH__ +#endif // __MEM_RUBY_NETWORK_GARNET_0_FLITBUFFER_HH__ -- 2.30.2