diff -r b4d0bdb52694 -r 909e559f4b41 configs/ruby/Ruby.py --- a/configs/ruby/Ruby.py Wed Aug 01 17:07:34 2012 -0500 +++ b/configs/ruby/Ruby.py Thu Aug 02 15:04:34 2012 -0400 @@ -51,8 +51,9 @@ # ruby network options parser.add_option("--topology", type="string", default="Crossbar", help="check src/mem/ruby/network/topologies for complete set") - parser.add_option("--mesh-rows", type="int", default=1, - help="the number of rows in the mesh topology") + parser.add_option("--mesh-rows", type="int", default=0, + help="the number of rows in the mesh topology" \ + "default = sqrt(num_cpus)") parser.add_option("--garnet-network", type="string", default=None, help="'fixed'|'flexible'") parser.add_option("--network-fault-model", action="store_true", default=False, diff -r b4d0bdb52694 -r 909e559f4b41 configs/topologies/Mesh.py --- a/configs/topologies/Mesh.py Wed Aug 01 17:07:34 2012 -0500 +++ b/configs/topologies/Mesh.py Thu Aug 02 15:04:34 2012 -0400 @@ -26,6 +26,7 @@ # # Authors: Brad Beckmann +import math from m5.params import * from m5.objects import * @@ -43,7 +44,10 @@ nodes = self.nodes num_routers = options.num_cpus - num_rows = options.mesh_rows + if options.mesh_rows == 0: + num_rows = int(math.sqrt(num_routers)) + else: + num_rows = options.mesh_rows # There must be an evenly divisible number of cntrls to routers # Also, obviously the number or rows must be <= the number of routers diff -r b4d0bdb52694 -r 909e559f4b41 configs/topologies/MeshDirCorners.py --- a/configs/topologies/MeshDirCorners.py Wed Aug 01 17:07:34 2012 -0500 +++ b/configs/topologies/MeshDirCorners.py Thu Aug 02 15:04:34 2012 -0400 @@ -26,6 +26,7 @@ # # Authors: Brad Beckmann +import math from m5.params import * from m5.objects import * @@ -46,7 +47,10 @@ nodes = self.nodes num_routers = options.num_cpus - num_rows = options.mesh_rows + if options.mesh_rows == 0: + num_rows = int(math.sqrt(num_routers)) + else: + num_rows = options.mesh_rows # First determine which nodes are cache cntrls vs. dirs vs. dma cache_nodes = []