99 bool flag_resources =
true;
101 unsigned int numNets = nets.size();
103 flag_resources =
true;
105 int routingPasses = 0;
110 double updatetime = 0;
112 for (
unsigned int i = 0; i < numNets; i++) {
113 RouteNet& net = nets[i];
116 if (!(net.hasOneSource() && net.hasAnySinks())) {
117 std::cout <<
"BAD NET: " << net.getName() << std::endl;
132 std::cout <<
"Failed routing net " << i <<
": " << std::endl;
139 std::cout <<
"Initial routes time: " <<
iterationtimer.elapsed() << std::endl;
141 for (
unsigned int i = 0; i < numNets; i++) {
142 for (
unsigned int j = 0; j < nets[i].routeNodes().size(); j++) {
148 while (flag_resources) {
150 std::cout <<
"." << std::flush;
152 double avgroutetime = 0;
153 double minroutetime = std::numeric_limits<double>::max();
154 double maxroutetime = std::numeric_limits<double>::min();
158 for (
unsigned int n = 0; n < numNets; n++) {
159 RouteNet& net = nets[n];
173 std::cout <<
"Failed routing net " << net.getName() <<
" index: "
174 << n <<
" of " << nets.size() << std::endl;
180 if (routetime < minroutetime)
181 minroutetime = routetime;
182 if (routetime > maxroutetime)
183 maxroutetime = routetime;
184 avgroutetime += routetime;
188 avgroutetime = avgroutetime / netsRouted;
191 PathFinderSharingMap::iterator p;
192 unsigned int conflicts = 0;
193 unsigned int maxpresent = 0;
194 unsigned int maxhistory = 0;
199 if ((*p).second.mPresentSharing > 1)
201 (*p).second.mHistorySharing += (*p).second.mPresentSharing;
205 if ((*p).second.mPresentSharing > maxpresent)
207 maxpresent = (*p).second.mPresentSharing;
208 maxPresentTilewire = (*p).first;
210 if ((*p).second.mHistorySharing > maxhistory)
212 maxhistory = (*p).second.mHistorySharing;
213 maxHistoryTilewire = (*p).first;
228 if (netsRouted == 1) {
229 flag_resources =
false;
230 for (
unsigned int i = 0; i < numNets; i++) {
231 RouteNet& net = nets[i];
233 std::cout <<
"FOUND SELF CONFLICT NET: " << net.getName() << std::endl;
235 for (
unsigned int j = 0; j < net.routeNodes().size(); j++) {
236 std::cout <<
"\t" << net.routeNodes()[j]->getArc() << std::endl;
245 if (conflicts == 0) flag_resources =
false;
248 std::cout << std::endl;
249 std::cout <<
"Total time: " <<
totaltimer.elapsed() <<
" Update time: " << updatetime
bool testReroute(RouteNodePtrVector ¤tRoute)
NetRouterBase * mNetRouter
Pointer to the underlying net router.
void unmarkSourcesAndSinks(RouteNet &net)
void clear(void)
Marks all wires as being unused, without releasing the bitset objects.
WireUsage mConflictWireUsage
boost::timer iterationtimer
void updateSharing(RouteNodePtrVector &outRoute)
PathFinderSharingMap mConflicts
architecture::Tilewire Tilewire
void route(RouteNet &inNet)
Primary route call.
void unrouteNet(RouteNodePtrVector &routeVector, const string &netname)
DDB & mDB
Database reference.
void markSourcesAndSinks(RouteNet &net)