config: Added the topology description to m5 config.ini

This commit is contained in:
Brad Beckmann 2010-08-20 11:46:11 -07:00
parent c7bd896448
commit 09854be558
4 changed files with 18 additions and 7 deletions

View file

@ -50,6 +50,8 @@ class IntLink(Link):
class Topology(SimObject):
type = 'Topology'
description = Param.String("Not Specified",
"the name of the imported topology module")
ext_links = VectorParam.ExtLink("Links to external nodes")
int_links = VectorParam.IntLink("Links between internal nodes")
num_int_nodes = Param.Int("Nunber of internal nodes")

View file

@ -29,12 +29,15 @@
from m5.params import *
from m5.objects import *
class Crossbar(Topology):
description='Crossbar'
def makeTopology(nodes, options):
ext_links = [ExtLink(ext_node=n, int_node=i)
for (i, n) in enumerate(nodes)]
xbar = len(nodes) # node ID for crossbar switch
int_links = [IntLink(node_a=i, node_b=xbar) for i in range(len(nodes))]
return Topology(ext_links=ext_links, int_links=int_links,
return Crossbar(ext_links=ext_links, int_links=int_links,
num_int_nodes=len(nodes)+1)

View file

@ -29,6 +29,9 @@
from m5.params import *
from m5.objects import *
class Mesh(Topology):
description='Mesh'
# Makes a generic mesh assuming an equal number of cache and directory cntrls
def makeTopology(nodes, options):
@ -87,6 +90,6 @@ def makeTopology(nodes, options):
node_b=south_id,
weight=2))
return Topology(ext_links=ext_links,
int_links=int_links,
num_int_nodes=num_routers)
return Mesh(ext_links=ext_links,
int_links=int_links,
num_int_nodes=num_routers)

View file

@ -29,6 +29,9 @@
from m5.params import *
from m5.objects import *
class MeshDirCorners(Topology):
description='MeshDirCorners'
# This file contains a special network creation function. This
# networks is not general and will only work with specific system
# configurations. The network specified is similar to GEMS old file
@ -105,7 +108,7 @@ def makeTopology(nodes, options):
node_b=south_id,
weight=2))
return Topology(ext_links=ext_links,
int_links=int_links,
num_int_nodes=num_routers)
return MeshDirCorners(ext_links=ext_links,
int_links=int_links,
num_int_nodes=num_routers)