summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/garnet
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/garnet
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/garnet')
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc19
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh7
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc13
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh7
4 files changed, 17 insertions, 29 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
index ce919335e..1e36a4cf0 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -127,15 +127,14 @@ GarnetNetwork_d::~GarnetNetwork_d()
*/
void
-GarnetNetwork_d::makeInLink(NodeID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
+GarnetNetwork_d::makeExtInLink(NodeID src, SwitchID dest, BasicLink* link,
const NetDest& routing_table_entry)
{
assert(src < m_nodes);
GarnetExtLink_d* garnet_link = safe_cast<GarnetExtLink_d*>(link);
- NetworkLink_d* net_link = garnet_link->m_network_links[direction];
- CreditLink_d* credit_link = garnet_link->m_credit_links[direction];
+ NetworkLink_d* net_link = garnet_link->m_network_links[0];
+ CreditLink_d* credit_link = garnet_link->m_credit_links[0];
m_links.push_back(net_link);
m_creditlinks.push_back(credit_link);
@@ -151,8 +150,7 @@ GarnetNetwork_d::makeInLink(NodeID src, SwitchID dest, BasicLink* link,
*/
void
-GarnetNetwork_d::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
- LinkDirection direction,
+GarnetNetwork_d::makeExtOutLink(SwitchID src, NodeID dest, BasicLink* link,
const NetDest& routing_table_entry)
{
assert(dest < m_nodes);
@@ -160,8 +158,8 @@ GarnetNetwork_d::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
assert(m_routers[src] != NULL);
GarnetExtLink_d* garnet_link = safe_cast<GarnetExtLink_d*>(link);
- NetworkLink_d* net_link = garnet_link->m_network_links[direction];
- CreditLink_d* credit_link = garnet_link->m_credit_links[direction];
+ NetworkLink_d* net_link = garnet_link->m_network_links[1];
+ CreditLink_d* credit_link = garnet_link->m_credit_links[1];
m_links.push_back(net_link);
m_creditlinks.push_back(credit_link);
@@ -177,12 +175,11 @@ GarnetNetwork_d::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
void
GarnetNetwork_d::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
const NetDest& routing_table_entry)
{
GarnetIntLink_d* garnet_link = safe_cast<GarnetIntLink_d*>(link);
- NetworkLink_d* net_link = garnet_link->m_network_links[direction];
- CreditLink_d* credit_link = garnet_link->m_credit_links[direction];
+ NetworkLink_d* net_link = garnet_link->m_network_links[0];
+ CreditLink_d* credit_link = garnet_link->m_credit_links[0];
m_links.push_back(net_link);
m_creditlinks.push_back(credit_link);
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
index 99ecc02da..a11f3ea50 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
@@ -69,14 +69,11 @@ class GarnetNetwork_d : public BaseGarnetNetwork
}
// 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);
//! Function for performing a functional write. The return value
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
index bd96fc2ed..0b33ab009 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
@@ -94,14 +94,13 @@ GarnetNetwork::~GarnetNetwork()
}
void
-GarnetNetwork::makeInLink(NodeID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
+GarnetNetwork::makeExtInLink(NodeID src, SwitchID dest, BasicLink* link,
const NetDest& routing_table_entry)
{
assert(src < m_nodes);
GarnetExtLink* garnet_link = safe_cast<GarnetExtLink*>(link);
- NetworkLink *net_link = garnet_link->m_network_links[direction];
+ NetworkLink *net_link = garnet_link->m_network_links[0];
net_link->init_net_ptr(this);
m_links.push_back(net_link);
@@ -110,8 +109,7 @@ GarnetNetwork::makeInLink(NodeID src, SwitchID dest, BasicLink* link,
}
void
-GarnetNetwork::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
- LinkDirection direction,
+GarnetNetwork::makeExtOutLink(SwitchID src, NodeID dest, BasicLink* link,
const NetDest& routing_table_entry)
{
assert(dest < m_nodes);
@@ -119,7 +117,7 @@ GarnetNetwork::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
assert(m_routers[src] != NULL);
GarnetExtLink* garnet_link = safe_cast<GarnetExtLink*>(link);
- NetworkLink *net_link = garnet_link->m_network_links[direction];
+ NetworkLink *net_link = garnet_link->m_network_links[1];
net_link->init_net_ptr(this);
m_links.push_back(net_link);
@@ -130,11 +128,10 @@ GarnetNetwork::makeOutLink(SwitchID src, NodeID dest, BasicLink* link,
void
GarnetNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
- LinkDirection direction,
const NetDest& routing_table_entry)
{
GarnetIntLink* garnet_link = safe_cast<GarnetIntLink*>(link);
- NetworkLink *net_link = garnet_link->m_network_links[direction];
+ NetworkLink *net_link = garnet_link->m_network_links[0];
net_link->init_net_ptr(this);
m_links.push_back(net_link);
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
index e9b94809f..18360d475 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
@@ -60,14 +60,11 @@ class GarnetNetwork : public BaseGarnetNetwork
void print(std::ostream& out) const;
// 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);
//! Function for performing a functional read. The return value