-
Notifications
You must be signed in to change notification settings - Fork 415
Add check route option #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check route option #1288
Changes from 4 commits
fe9e236
752d99e
f99eb2a
99cedb8
caf76ca
0d5dc85
44f8f7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -710,7 +710,13 @@ RouteStatus vpr_route_flow(t_vpr_setup& vpr_setup, const t_arch& arch) { | |
std::string graphics_msg; | ||
if (route_status.success()) { | ||
//Sanity check the routing | ||
check_route(router_opts.route_type); | ||
if (router_opts.check_route == e_check_route_option::QUICK) { | ||
check_route(router_opts.route_type, /*quick=*/true); | ||
} else if (router_opts.check_route == e_check_route_option::FULL) { | ||
check_route(router_opts.route_type, /*quick=*/false); | ||
} else { | ||
VTR_LOG_WARN("The user disabled the check route step."); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest moving this code inside check_route (passing in route_opts.check_route as an argument). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One reason I did put the check_route option check outside of check_route is that, if the option disables it, then check_route should not be called. I thought it was cleaner to leave all the conditions of the check route option in one place There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's OK to put the check inside check_route and have it bail out early, something like: void check_route(e_route_type route_type, e_check_route_option option) {
if (option == e_check_route_option::OFF) {
VTR_LOG_WARN("The user disabled the check route step.");
return;
}
//Normal check route...
} That keeps check_route() more re-usable and ensures the option is respected if more calls to check_route() are ever added in the future (e.g. after tweaking/fine-tuning an existing routing). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also like embedding the check inside check_route to make it all self contained. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, done. Also added a reg test with all the three options. |
||
get_serial_num(); | ||
|
||
//Update status | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd lean towards keeping the default for this option as
full
. That ensures we do the most thorough checking by default (which is what we want, for example in regular VTR). Particularly if #1289 narrows the run-time difference betweenquick
andfull
.If someone (e.g. symbiflow) want to use quick, I feel that should be an end-user/flow override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, moved the option default back to full