Skip to content

Commit 6e89003

Browse files
committed
vpr: Prime router lookahead for placement
This should ensure lookahead construction time is not attributed to the placer (since it is also re-used by the router).
1 parent a2d1cea commit 6e89003

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

vpr/src/base/vpr_api.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,16 @@ bool vpr_place_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
602602
}
603603

604604
void vpr_place(t_vpr_setup& vpr_setup, const t_arch& arch) {
605+
if (placer_needs_lookahead(vpr_setup)) {
606+
// Prime lookahead cache to avoid adding lookahead computation cost to
607+
// the placer timer.
608+
get_cached_router_lookahead(
609+
vpr_setup.RouterOpts.lookahead_type,
610+
vpr_setup.RouterOpts.write_router_lookahead,
611+
vpr_setup.RouterOpts.read_router_lookahead,
612+
vpr_setup.Segments);
613+
}
614+
605615
vtr::ScopedStartFinishTimer timer("Placement");
606616

607617
try_place(vpr_setup.PlacerOpts,

vpr/src/place/place.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,3 +2609,7 @@ static void print_resources_utilization() {
26092609
}
26102610
VTR_LOG("\n");
26112611
}
2612+
2613+
bool placer_needs_lookahead(const t_vpr_setup& vpr_setup) {
2614+
return (vpr_setup.PlacerOpts.place_algorithm == PATH_TIMING_DRIVEN_PLACE);
2615+
}

vpr/src/place/place.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ void try_place(const t_placer_opts& placer_opts,
1212
t_direct_inf* directs,
1313
int num_directs);
1414

15+
bool placer_needs_lookahead(const t_vpr_setup& vpr_setup);
1516
#endif

0 commit comments

Comments
 (0)