summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/simple
diff options
context:
space:
mode:
authorTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:18 -0400
committerTushar Krishna <tushar@ece.gatech.edu>2016-10-06 14:35:18 -0400
commit003c08fa90f8b3eb7fbbbc96e0caa5f46bf58196 (patch)
tree13b408554ffbebd11ae2322e8a070a0c4d5b9c56 /src/mem/ruby/network/simple
parentb9e23a6d741cdcdf0ffb7364c6aae36a487335ef (diff)
downloadgem5-003c08fa90f8b3eb7fbbbc96e0caa5f46bf58196.tar.xz
config: make internal links in network topology unidirectional.
This patch makes the internal links within the network topology unidirectional, thus allowing any deadlock-free routing algorithms to be specified from the topology itself using weights. This patch also renames Mesh.py and MeshDirCorners.py to Mesh_XY.py and MeshDirCorners_XY.py (Mesh with XY routing). It also adds a Mesh_westfirst.py and CrossbarGarnet.py topologies.
Diffstat (limited to 'src/mem/ruby/network/simple')
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc7
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.hh7
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.py8
3 files changed, 7 insertions, 15 deletions
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index 2fc7b6440..b30bd8731 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -78,8 +78,7 @@ SimpleNetwork::~SimpleNetwork()
// From a switch to an endpoint node
void
-SimpleNetwork::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
- LinkDirection direction,
+SimpleNetwork::makeExtOutLink(SwitchID src, NodeID dest, BasicLink* link,
const NetDest& routing_table_entry)
{
assert(dest < m_nodes);
@@ -95,8 +94,7 @@ SimpleNetwork::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
// From an endpoint node to a switch
void
-SimpleNetwork::makeInLink(NodeID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
+SimpleNetwork::makeExtInLink(NodeID src, SwitchID dest, BasicLink* link,
const NetDest& routing_table_entry)
{
assert(src < m_nodes);
@@ -106,7 +104,6 @@ SimpleNetwork::makeInLink(NodeID src, SwitchID dest, BasicLink* link,
// From a switch to a switch
void
SimpleNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
const NetDest& routing_table_entry)
{
// Create a set of new MessageBuffers
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh
index 434dfa702..6a325d2a4 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.hh
+++ b/src/mem/ruby/network/simple/SimpleNetwork.hh
@@ -59,14 +59,11 @@ class SimpleNetwork : public Network
bool isVNetOrdered(int vnet) const { return m_ordered[vnet]; }
// Methods used by Topology to setup the network
- void makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
- LinkDirection direction,
+ void makeExtOutLink(SwitchID src, NodeID dest, BasicLink* link,
const NetDest& routing_table_entry);
- void makeInLink(NodeID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
+ void makeExtInLink(NodeID src, SwitchID dest, BasicLink* link,
const NetDest& routing_table_entry);
void makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
const NetDest& routing_table_entry);
void print(std::ostream& out) const;
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.py b/src/mem/ruby/network/simple/SimpleNetwork.py
index 87de0fb46..3d6f7e854 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.py
+++ b/src/mem/ruby/network/simple/SimpleNetwork.py
@@ -56,12 +56,10 @@ class SimpleNetwork(RubyNetwork):
# Also add buffers for all router-link connections
for router in self.routers:
router_buffers = []
- # Add message buffers to routers for each internal link connection
+ # Add message buffers to routers at the end of each
+ # unidirectional internal link
for link in self.int_links:
- if link.node_a == router:
- for i in xrange(self.number_of_virtual_networks):
- router_buffers.append(MessageBuffer(ordered = True))
- if link.node_b == router:
+ if link.dst_node == router:
for i in xrange(self.number_of_virtual_networks):
router_buffers.append(MessageBuffer(ordered = True))