summaryrefslogtreecommitdiff
path: root/configs/network
diff options
context:
space:
mode:
authorTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:22 -0400
committerTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:22 -0400
commitdbe8892b761067c5c1e828f889a513ea085b044f (patch)
treed3101cc8dbf74f1d3bc2f3f9ead1b948fd4ac33e /configs/network
parentb512f4bf71fac79fb6e17bb2a9e05c1f494f69f4 (diff)
downloadgem5-dbe8892b761067c5c1e828f889a513ea085b044f.tar.xz
ruby: garnet2.0
Revamped version of garnet with more optimized single-cycle routers, more configurability, and cleaner code.
Diffstat (limited to 'configs/network')
-rw-r--r--configs/network/Network.py55
1 files changed, 40 insertions, 15 deletions
diff --git a/configs/network/Network.py b/configs/network/Network.py
index 871682ff1..3c15a4f79 100644
--- a/configs/network/Network.py
+++ b/configs/network/Network.py
@@ -38,25 +38,44 @@ def define_options(parser):
parser.add_option("--topology", type="string", default="Crossbar",
help="check configs/topologies for complete set")
- parser.add_option("--mesh-rows", type="int", default=1,
+ parser.add_option("--mesh-rows", type="int", default=0,
help="the number of rows in the mesh topology")
- parser.add_option("--garnet-network", type="choice",
- choices=['fixed', 'flexible'], help="'fixed'|'flexible'")
- parser.add_option("--network-fault-model", action="store_true", default=False,
- help="enable network fault model: see src/mem/ruby/network/fault_model/")
+ parser.add_option("--network", type="choice", default="simple",
+ choices=['simple', 'garnet2.0'],
+ help="'simple'|'garnet2.0'")
+ parser.add_option("--router-latency", action="store", type="int",
+ default=1,
+ help="""number of pipeline stages in the garnet router.
+ Has to be >= 1.
+ Can be over-ridden on a per router basis
+ in the topology file.""")
+ parser.add_option("--link-latency", action="store", type="int", default=1,
+ help="""latency of each link the simple/garnet networks.
+ Has to be >= 1.
+ Can be over-ridden on a per link basis
+ in the topology file.""")
+ parser.add_option("--link-width-bits", action="store", type="int",
+ default=128,
+ help="width in bits for all links inside garnet.")
+ parser.add_option("--vcs-per-vnet", action="store", type="int", default=4,
+ help="""number of virtual channels per virtual network
+ inside garnet network.""")
+ parser.add_option("--routing-algorithm", action="store", type="int",
+ 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""")
+ parser.add_option("--network-fault-model", action="store_true",
+ default=False,
+ help="""enable network fault model:
+ see src/mem/ruby/network/fault_model/""")
def create_network(options, ruby):
# Set the network classes based on the command line options
- if options.garnet_network == "fixed":
- NetworkClass = GarnetNetwork_d
- IntLinkClass = GarnetIntLink_d
- ExtLinkClass = GarnetExtLink_d
- RouterClass = GarnetRouter_d
- InterfaceClass = GarnetNetworkInterface_d
-
- elif options.garnet_network == "flexible":
+ if options.network == "garnet2.0":
NetworkClass = GarnetNetwork
IntLinkClass = GarnetIntLink
ExtLinkClass = GarnetExtLink
@@ -79,7 +98,13 @@ def create_network(options, ruby):
def init_network(options, network, InterfaceClass):
- if options.garnet_network is None:
+ if options.network == "garnet2.0":
+ network.num_rows = options.mesh_rows
+ network.vcs_per_vnet = options.vcs_per_vnet
+ network.ni_flit_size = options.link_width_bits / 8
+ network.routing_algorithm = options.routing_algorithm
+
+ if options.network == "simple":
network.setup_buffers()
if InterfaceClass != None:
@@ -88,6 +113,6 @@ def init_network(options, network, InterfaceClass):
network.netifs = netifs
if options.network_fault_model:
- assert(options.garnet_network == "fixed")
+ assert(options.network == "garnet2.0")
network.enable_fault_model = True
network.fault_model = FaultModel()