{"action":"created","comment":{"url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/comments/37824393","id":37824393,"diff_hunk":"@@ -514,27 +556,114 @@ bool timing_driven_route_net(int inet, int itry, float pres_fac, float max_criti\n \t * case the rr_graph is disconnected and you can give up. If slacks = NULL, *\r\n \t * give each net a dummy criticality of 0.\t\t\t\t\t\t\t\t\t*/\r\n \r\n-\tunsigned int ipin;\r\n-\tint num_sinks, itarget, target_pin, target_node, inode;\r\n-\tfloat target_criticality, old_total_cost, new_total_cost, largest_criticality,\r\n-\t\told_back_cost, new_back_cost;\r\n-\tt_rt_node *rt_root;\r\n-\t\r\n-\tstruct s_trace *new_route_start_tptr;\r\n-\tint highfanout_rlim;\r\n+\t// for nets below a certain size (min_incremental_reroute_fanout), rip up any old routing\r\n+\t// otherwise, we incrementally reroute by reusing legal parts of the previous iteration\r\n+\t// convert the previous iteration's traceback into the starting route tree for this iteration\r\n \r\n-\t/* Rip-up any old routing. */\r\n+\tINCREMENTAL_REROUTING_ASSERT(sanity_check_lookup());\r\n \r\n-\tpathfinder_update_one_cost(trace_head[inet], -1, pres_fac);\r\n-\tfree_traceback(inet);\r\n-\t\r\n-\tfor (ipin = 1; ipin < g_clbs_nlist.net[inet].pins.size(); ipin++) {\r\n-\t\tif (!slacks) {\r\n-\t\t\t/* Use criticality of 1. This makes all nets critical.  Note: There is a big difference between setting pin criticality to 0\r\n-\t\t\tcompared to 1.  If pin criticality is set to 0, then the current path delay is completely ignored during routing.  By setting\r\n-\t\t\tpin criticality to 1, the current path delay to the pin will always be considered and optimized for */\r\n-\t\t\tpin_criticality[ipin] = 1.0;\r\n-\t\t} else { \r\n+\tt_rt_node* rt_root;\r\n+\tremaining_targets.clear();\t// efficient clearing by just resetting size without allocation\r\n+\tunsigned int num_sinks = g_clbs_nlist.net[inet].num_sinks();\r\n+\r\n+\tif ((int)num_sinks < min_incremental_reroute_fanout || itry == 1) {\r\n+#ifdef PROFILE\r\n+\t\t++entire_net_rerouted;\r\n+#endif\r\n+\t\t// rip up the whole net\r\n+\t\tpathfinder_update_one_cost(trace_head[inet], -1, pres_fac);\r\n+\t\tfree_traceback(inet);\r\n+\r\n+\t\trt_root = init_route_tree_to_source(inet);\r\n+\t\tfor (unsigned int sink_pin = 1; sink_pin <= num_sinks; ++sink_pin)\r\n+\t\t\tremaining_targets.push_back(sink_pin);\r\n+\t\t// when we don't prune the tree, we also don't know the sink node indices \r\n+\t\t// thus we'll use functions that act on pin indices like mark_ends instead\r\n+\t\t// of their versions that act on node indices directly like mark_remaining_ends\r\n+\t\tmark_ends(inet);\r\n+\t}\r\n+\telse {\r\n+\t\treached_sinks.clear();\r\n+#ifdef PROFILE\r\n+\t\tclock_t rebuild_start = clock();\r\n+#endif\r\n+\t\t// convert the previous iteration's traceback into the partial route tree for this iteration\r\n+\t\trt_root = traceback_to_route_tree(inet);\r\n+\r\n+\t\t// check for edge correctness\r\n+\t\tINCREMENTAL_REROUTING_ASSERT(is_valid_skeleton_tree(rt_root));\r\n+\t\tINCREMENTAL_REROUTING_ASSERT(should_route_net(inet));\r\n+\t\tINCREMENTAL_REROUTING_ASSERT(!is_uncongested_route_tree(rt_root));\r\n+\r\n+\t\t// prune the branches of the tree that don't legally lead to sinks\r\n+\t\t// destroyed represents whether the entire tree is illegal\r\n+\t\tbool destroyed {prune_route_tree(rt_root, pres_fac, reached_sinks, remaining_targets)};\r","path":"vpr/SRC/route/route_timing.c","position":302,"original_position":302,"commit_id":"a6e4991e99ecbaac73f4605a8cc38b7a47ae890f","original_commit_id":"a6e4991e99ecbaac73f4605a8cc38b7a47ae890f","user":{"login":"LemonPi","id":5508542,"avatar_url":"https://avatars.githubusercontent.com/u/5508542?v=3","gravatar_id":"","url":"https://api.github.com/users/LemonPi","html_url":"https://github.com/LemonPi","followers_url":"https://api.github.com/users/LemonPi/followers","following_url":"https://api.github.com/users/LemonPi/following{/other_user}","gists_url":"https://api.github.com/users/LemonPi/gists{/gist_id}","starred_url":"https://api.github.com/users/LemonPi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LemonPi/subscriptions","organizations_url":"https://api.github.com/users/LemonPi/orgs","repos_url":"https://api.github.com/users/LemonPi/repos","events_url":"https://api.github.com/users/LemonPi/events{/privacy}","received_events_url":"https://api.github.com/users/LemonPi/received_events","type":"User","site_admin":false},"body":"{} assignment warns against conversions that = allows (silently). I think it's generally a Good Thing, but you're right here that bool assigned to a function returning bool shouldn't have conversion problems. ","created_at":"2015-08-25T01:26:32Z","updated_at":"2015-08-25T01:26:32Z","html_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/104#discussion_r37824393","pull_request_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104","_links":{"self":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/comments/37824393"},"html":{"href":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/104#discussion_r37824393"},"pull_request":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104","id":43064667,"html_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/104","diff_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/104.diff","patch_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/104.patch","issue_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/104","number":104,"state":"open","locked":false,"title":"Connection based routing","user":{"login":"LemonPi","id":5508542,"avatar_url":"https://avatars.githubusercontent.com/u/5508542?v=3","gravatar_id":"","url":"https://api.github.com/users/LemonPi","html_url":"https://github.com/LemonPi","followers_url":"https://api.github.com/users/LemonPi/followers","following_url":"https://api.github.com/users/LemonPi/following{/other_user}","gists_url":"https://api.github.com/users/LemonPi/gists{/gist_id}","starred_url":"https://api.github.com/users/LemonPi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LemonPi/subscriptions","organizations_url":"https://api.github.com/users/LemonPi/orgs","repos_url":"https://api.github.com/users/LemonPi/repos","events_url":"https://api.github.com/users/LemonPi/events{/privacy}","received_events_url":"https://api.github.com/users/LemonPi/received_events","type":"User","site_admin":false},"body":"Please leave code review comments below (keep this open until all of the PROFILE items get eventually removed when the changes have been fully tested).","created_at":"2015-08-21T18:06:25Z","updated_at":"2015-08-25T01:26:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d913614140bfb7fcdd57c307476e800a79d18c23","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104/commits","review_comments_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104/comments","review_comment_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/104/comments","statuses_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/statuses/a6e4991e99ecbaac73f4605a8cc38b7a47ae890f","head":{"label":"verilog-to-routing:connection_based_routing","ref":"connection_based_routing","sha":"a6e4991e99ecbaac73f4605a8cc38b7a47ae890f","user":{"login":"verilog-to-routing","id":11666515,"avatar_url":"https://avatars.githubusercontent.com/u/11666515?v=3","gravatar_id":"","url":"https://api.github.com/users/verilog-to-routing","html_url":"https://github.com/verilog-to-routing","followers_url":"https://api.github.com/users/verilog-to-routing/followers","following_url":"https://api.github.com/users/verilog-to-routing/following{/other_user}","gists_url":"https://api.github.com/users/verilog-to-routing/gists{/gist_id}","starred_url":"https://api.github.com/users/verilog-to-routing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verilog-to-routing/subscriptions","organizations_url":"https://api.github.com/users/verilog-to-routing/orgs","repos_url":"https://api.github.com/users/verilog-to-routing/repos","events_url":"https://api.github.com/users/verilog-to-routing/events{/privacy}","received_events_url":"https://api.github.com/users/verilog-to-routing/received_events","type":"Organization","site_admin":false},"repo":{"id":38118370,"name":"vtr-verilog-to-routing","full_name":"verilog-to-routing/vtr-verilog-to-routing","owner":{"login":"verilog-to-routing","id":11666515,"avatar_url":"https://avatars.githubusercontent.com/u/11666515?v=3","gravatar_id":"","url":"https://api.github.com/users/verilog-to-routing","html_url":"https://github.com/verilog-to-routing","followers_url":"https://api.github.com/users/verilog-to-routing/followers","following_url":"https://api.github.com/users/verilog-to-routing/following{/other_user}","gists_url":"https://api.github.com/users/verilog-to-routing/gists{/gist_id}","starred_url":"https://api.github.com/users/verilog-to-routing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verilog-to-routing/subscriptions","organizations_url":"https://api.github.com/users/verilog-to-routing/orgs","repos_url":"https://api.github.com/users/verilog-to-routing/repos","events_url":"https://api.github.com/users/verilog-to-routing/events{/privacy}","received_events_url":"https://api.github.com/users/verilog-to-routing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing","description":"Verilog to Routing -- Open Source CAD Flow for FPGA Research","fork":false,"url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing","forks_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/forks","keys_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/teams","hooks_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/hooks","issue_events_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/events{/number}","events_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/events","assignees_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/assignees{/user}","branches_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/branches{/branch}","tags_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/tags","blobs_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/refs{/sha}","trees_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/statuses/{sha}","languages_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/languages","stargazers_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/stargazers","contributors_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/contributors","subscribers_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/subscribers","subscription_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/subscription","commits_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/commits{/sha}","git_commits_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/commits{/sha}","comments_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/comments{/number}","issue_comment_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/comments{/number}","contents_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/contents/{+path}","compare_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/merges","archive_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/downloads","issues_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues{/number}","pulls_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls{/number}","milestones_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/milestones{/number}","notifications_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/labels{/name}","releases_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/releases{/id}","created_at":"2015-06-26T15:24:42Z","updated_at":"2015-08-05T19:14:48Z","pushed_at":"2015-08-24T15:40:57Z","git_url":"git://github.com/verilog-to-routing/vtr-verilog-to-routing.git","ssh_url":"git@github.com:verilog-to-routing/vtr-verilog-to-routing.git","clone_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing.git","svn_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing","homepage":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/wiki","size":108990,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":50,"forks":3,"open_issues":50,"watchers":3,"default_branch":"master"}},"base":{"label":"verilog-to-routing:master","ref":"master","sha":"ee939b44571e13748b9cd9f45af95a7ff62d538d","user":{"login":"verilog-to-routing","id":11666515,"avatar_url":"https://avatars.githubusercontent.com/u/11666515?v=3","gravatar_id":"","url":"https://api.github.com/users/verilog-to-routing","html_url":"https://github.com/verilog-to-routing","followers_url":"https://api.github.com/users/verilog-to-routing/followers","following_url":"https://api.github.com/users/verilog-to-routing/following{/other_user}","gists_url":"https://api.github.com/users/verilog-to-routing/gists{/gist_id}","starred_url":"https://api.github.com/users/verilog-to-routing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verilog-to-routing/subscriptions","organizations_url":"https://api.github.com/users/verilog-to-routing/orgs","repos_url":"https://api.github.com/users/verilog-to-routing/repos","events_url":"https://api.github.com/users/verilog-to-routing/events{/privacy}","received_events_url":"https://api.github.com/users/verilog-to-routing/received_events","type":"Organization","site_admin":false},"repo":{"id":38118370,"name":"vtr-verilog-to-routing","full_name":"verilog-to-routing/vtr-verilog-to-routing","owner":{"login":"verilog-to-routing","id":11666515,"avatar_url":"https://avatars.githubusercontent.com/u/11666515?v=3","gravatar_id":"","url":"https://api.github.com/users/verilog-to-routing","html_url":"https://github.com/verilog-to-routing","followers_url":"https://api.github.com/users/verilog-to-routing/followers","following_url":"https://api.github.com/users/verilog-to-routing/following{/other_user}","gists_url":"https://api.github.com/users/verilog-to-routing/gists{/gist_id}","starred_url":"https://api.github.com/users/verilog-to-routing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verilog-to-routing/subscriptions","organizations_url":"https://api.github.com/users/verilog-to-routing/orgs","repos_url":"https://api.github.com/users/verilog-to-routing/repos","events_url":"https://api.github.com/users/verilog-to-routing/events{/privacy}","received_events_url":"https://api.github.com/users/verilog-to-routing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing","description":"Verilog to Routing -- Open Source CAD Flow for FPGA Research","fork":false,"url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing","forks_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/forks","keys_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/teams","hooks_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/hooks","issue_events_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/events{/number}","events_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/events","assignees_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/assignees{/user}","branches_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/branches{/branch}","tags_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/tags","blobs_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/refs{/sha}","trees_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/statuses/{sha}","languages_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/languages","stargazers_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/stargazers","contributors_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/contributors","subscribers_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/subscribers","subscription_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/subscription","commits_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/commits{/sha}","git_commits_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/git/commits{/sha}","comments_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/comments{/number}","issue_comment_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/comments{/number}","contents_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/contents/{+path}","compare_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/merges","archive_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/downloads","issues_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues{/number}","pulls_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls{/number}","milestones_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/milestones{/number}","notifications_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/labels{/name}","releases_url":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/releases{/id}","created_at":"2015-06-26T15:24:42Z","updated_at":"2015-08-05T19:14:48Z","pushed_at":"2015-08-24T15:40:57Z","git_url":"git://github.com/verilog-to-routing/vtr-verilog-to-routing.git","ssh_url":"git@github.com:verilog-to-routing/vtr-verilog-to-routing.git","clone_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing.git","svn_url":"https://github.com/verilog-to-routing/vtr-verilog-to-routing","homepage":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/wiki","size":108990,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":50,"forks":3,"open_issues":50,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104"},"html":{"href":"https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/104"},"issue":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/104"},"comments":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/verilog-to-routing/vtr-verilog-to-routing/statuses/a6e4991e99ecbaac73f4605a8cc38b7a47ae890f"}}}}