diff options
author | Tushar Krishna <tushar@ece.gatech.edu> | 2016-10-06 14:35:18 -0400 |
---|---|---|
committer | Tushar Krishna <tushar@ece.gatech.edu> | 2016-10-06 14:35:18 -0400 |
commit | 003c08fa90f8b3eb7fbbbc96e0caa5f46bf58196 (patch) | |
tree | 13b408554ffbebd11ae2322e8a070a0c4d5b9c56 /src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc | |
parent | b9e23a6d741cdcdf0ffb7364c6aae36a487335ef (diff) | |
download | gem5-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/fixed-pipeline/GarnetNetwork_d.cc')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc | 19 |
1 files changed, 8 insertions, 11 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); |