58,61c58,65
< // analyze both the internal and external links, create data structures
< // Note that the python created links are bi-directional, but that the
< // topology and networks utilize uni-directional links. Thus each
< // BasicLink is converted to two calls to add link, on for each direction
---
> // analyze both the internal and external links, create data structures.
> // The python created external links are bi-directional,
> // and the python created internal links are uni-directional.
> // The networks and topology utilize uni-directional links.
> // Thus each external link is converted to two calls to addLink,
> // one for each direction.
> //
> // External Links
74,77c78,81
< // the first direction is marked: In
< addLink(ext_idx1, int_idx, ext_link, LinkDirection_In);
< // the first direction is marked: Out
< addLink(int_idx, ext_idx2, ext_link, LinkDirection_Out);
---
> // ext to int
> addLink(ext_idx1, int_idx, ext_link);
> // int to ext
> addLink(int_idx, ext_idx2, ext_link);
79a84
> // Internal Links
83,84c88,89
< BasicRouter *router_a = int_link->params()->node_a;
< BasicRouter *router_b = int_link->params()->node_b;
---
> BasicRouter *router_src = int_link->params()->src_node;
> BasicRouter *router_dst = int_link->params()->dst_node;
89,90c94,95
< int a = router_a->params()->router_id + 2*m_nodes;
< int b = router_b->params()->router_id + 2*m_nodes;
---
> int src = router_src->params()->router_id + 2*m_nodes;
> int dst = router_dst->params()->router_id + 2*m_nodes;
92,96c97,98
< // create the internal uni-directional links in both directions
< // the first direction is marked: In
< addLink(a, b, int_link, LinkDirection_In);
< // the second direction is marked: Out
< addLink(b, a, int_link, LinkDirection_Out);
---
> // create the internal uni-directional link from src to dst
> addLink(src, dst, int_link);
154,155c156
< Topology::addLink(SwitchID src, SwitchID dest, BasicLink* link,
< LinkDirection dir)
---
> Topology::addLink(SwitchID src, SwitchID dest, BasicLink* link)
165d165
< link_entry.direction = dir;
185,186c185,186
< net->makeInLink(src, dest - (2 * m_nodes), link_entry.link,
< link_entry.direction, routing_table_entry);
---
> net->makeExtInLink(src, dest - (2 * m_nodes), link_entry.link,
> routing_table_entry);
193,194c193,194
< net->makeOutLink(src - (2 * m_nodes), node, link_entry.link,
< link_entry.direction, routing_table_entry);
---
> net->makeExtOutLink(src - (2 * m_nodes), node, link_entry.link,
> routing_table_entry);
201c201
< link_entry.link, link_entry.direction,
---
> link_entry.link,