19 #include <boost/test/unit_test.hpp>
27 BOOST_AUTO_TEST_SUITE(router)
44 BOOST_CHECK_EQUAL(
sizeof(
TraceNode),
sizeof(boost::int32_t)
45 +
sizeof(Tilewire) +
sizeof(std::vector<TraceNode*>)
46 +
sizeof(std::vector<std::pair<Tilewire, TraceNode*> >));
47 BOOST_CHECK_EQUAL(
sizeof(std::vector<TraceNode*>), 24u);
48 BOOST_CHECK_EQUAL(
sizeof(std::vector<std::pair<Tilewire, TraceNode*> >), 24u);
49 BOOST_CHECK_EQUAL(
sizeof(Tilewire), 6u);
50 BOOST_CHECK_EQUAL(
sizeof(
TraceNode), 58u);
51 BOOST_CHECK_EQUAL(
sizeof(
TraceNode*), 8u);
52 BOOST_CHECK_EQUAL(
sizeof(boost::int32_t), 4u);
74 BOOST_CHECK(tracenode1 != 0);
75 BOOST_CHECK(tracenode1->
getDepth() == -1);
78 BOOST_CHECK(tracenode1->
getTilewire() == tilewire1);
79 BOOST_CHECK(tracenode1->
getChild(0) == 0);
80 BOOST_CHECK(tracenode1->
getParent(0) == 0);
101 std::vector<TraceNode*> testvec;
102 testvec.push_back(tracenode5);
103 testvec.push_back(tracenode6);
151 tracenode1->addChild(tracenode3);
158 testvec.push_back(tracenode5);
159 testvec.push_back(tracenode6);
177 BOOST_AUTO_TEST_SUITE_END()
Encapsulation of a tile index in an unsigned 32-bit integer.
Encapsulation of an arc between two tilewires.
Tilewire getTilewire()
Get the Tilewire associated with this node.
void addParent(TraceNode *newParent)
Add parent to the node.
TraceNode * getChild(boost::uint32_t index)
Get a child by index, returns 0 for invalid index.
TraceNode * getParent(boost::uint32_t index)
Get a parent by index, returns 0 for invalid index.
Header for the TraceNode class.
Encapsulation of a wire index in an unsigned 16-bit integer.
boost::int32_t getDepth() const
Get the depth of this node from the furthest node with no parent.
Header for torc::physical output stream helpers.
TraceNode * removeParent(boost::uint32_t index)
Remove a parent by index, returns 0 for invalid index.
Encapsulation of a device tile and wire pair.
static boost::int32_t sLiveNodes
Static allocation and deallocation count.
boost::uint32_t getNumParents()
Get the number of parents.
void addChildren(const TraceNodePtrVector &newChildren)
Add children to the node.
Header for the DDB class.
boost::uint32_t getNumChildren()
Get the number of children.
BOOST_AUTO_TEST_CASE(NetRouterHeuristicT)
Unit test for the Heuristic.
An object that holds more complete path information for routing and tracing.
TraceNode * removeChild(boost::uint32_t index)
Remove a child by index, returns 0 for invalid index.
void addChild(TraceNode *newChild)
brief Add child to the node.