32a33,50
> class Link(SimObject):
> type = 'Link'
> latency = Param.Int(1, "")
> bw_multiplier = Param.Int("")
> weight = Param.Int(1, "")
>
> class ExtLink(Link):
> type = 'ExtLink'
> ext_node = Param.RubyController("External node")
> int_node = Param.Int("ID of internal node")
> bw_multiplier = 64
>
> class IntLink(Link):
> type = 'IntLink'
> node_a = Param.Int("ID of internal node on one end")
> node_b = Param.Int("ID of internal node on other end")
> bw_multiplier = 16
>
35c53,55
< connections = Param.String("")
---
> 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")
38a59,66
> def makeCrossbar(nodes):
> 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,
> num_int_nodes=len(nodes)+1)
>