-
Notifications
You must be signed in to change notification settings - Fork 415
WIP: Enhancing VPR lookahead map #1351
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
Closed
Closed
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
8885050
Add connection box lookahead.
acomodi 4f49a02
Integrate upstream uxsdcxx parser with connection box lookahead
acomodi b71a487
Complete connection box lookahead to be aware of connection box.
litghost 596c10f
Mark file location function as static.
litghost 15b676b
Add bounds checking when search grid.
litghost 78ef779
Updates to connection box lookahead map.
litghost b351679
add documentation
HackerFoo 3c1a190
un-shadow a variable
HackerFoo 5d19549
remove method from set_cost_map
HackerFoo 39af170
replace std::list with std::vector
HackerFoo aec3721
parallelize connection box lookahead
HackerFoo 31b2f47
performance improvements
HackerFoo 9d1aaa9
suggested changes
HackerFoo 9c9437b
changes suggested in PR
HackerFoo 8abd79f
add penalty to Cost_Map::find_cost for points outside of the map
HackerFoo e5ddec7
store penalties
HackerFoo f00073f
printf -> VTR_LOG
HackerFoo 56a28ce
change sampling method
HackerFoo ff57a66
remove unnecessary lookups
HackerFoo afc36aa
remove SimpleCache, use vtr::hash_combine, add timing stats
HackerFoo 2446c03
integrate lighost's patches
HackerFoo d654bd4
independently minimize delay and base cost (congestion)
HackerFoo 24eeb80
Expand delay and base cost independently
HackerFoo 578d084
site_pin_delay shouldn't affect congestion
HackerFoo bb9943e
use histogram to choose sample sizes, set minimum penalty
HackerFoo 0eda42b
Use get_rr_cong_cost to compute base_cost's.
litghost 01a3c41
run expansions in a region until a number of paths are found
HackerFoo a9f7b12
use std::make_tuple()
HackerFoo 2c1631d
suggested changes
HackerFoo 502acf9
Add debugging prints and add fill output to lookahead.
litghost 8530fef
Fix missing #include <string>
hzeller 669d580
Remove cached segment map from connection map lookahead file.
HackerFoo e6c691b
Refactor lookahead computation.
litghost 7144db3
Skip empty windows.
litghost c900a78
vpr: lookahead map enhanced with CHAN -> IPIN delay information
acomodi feeab99
route: extract lookahead sampling to external file
acomodi 880e40b
route: avoid using connection box information
acomodi b51ccec
make format
acomodi 52014e7
lookahead: move connection box to router lookahead map
acomodi 309a96d
Revert "Integrate upstream uxsdcxx parser with connection box lookahead"
acomodi 1334f91
WIP: Fixes to have Series7 place-delay and lookahead being computed
acomodi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@0x876ec83c2fea5a18; | ||
|
||
using Matrix = import "matrix.capnp"; | ||
|
||
struct VprCostEntry { | ||
delay @0 :Float32; | ||
congestion @1 :Float32; | ||
fill @2 :Bool; | ||
} | ||
|
||
struct VprVector2D { | ||
x @0 :Int64; | ||
y @1 :Int64; | ||
} | ||
|
||
struct VprFloatEntry { | ||
value @0 :Float32; | ||
} | ||
|
||
struct VprCostMap { | ||
costMap @0 :Matrix.Matrix((Matrix.Matrix(VprCostEntry))); | ||
offset @1 :Matrix.Matrix(VprVector2D); | ||
depField @2 :List(Int64); | ||
penalty @3 :Matrix.Matrix(VprFloatEntry); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
#include "globals.h" | ||
#include "vpr_types.h" | ||
#include "route_profiling.h" | ||
#include "rr_graph.h" | ||
|
||
namespace profiling { | ||
|
||
|
@@ -29,6 +30,10 @@ void time_on_fanout_analysis() {} | |
|
||
void profiling_initialization(unsigned /*max_net_fanout*/) {} | ||
|
||
void conn_start() {} | ||
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. The changes to route_profiling.cpp/.h should likely be in another PR. |
||
void conn_finish(int /*src_rr*/, int /*sink_rr*/, float /*criticality*/) {} | ||
void net_finish() {} | ||
|
||
#else | ||
|
||
constexpr unsigned int fanout_per_bin = 1; | ||
|
@@ -181,6 +186,12 @@ void congestion_analysis() { | |
# endif | ||
} | ||
|
||
static clock_t conn_start_time; | ||
static float worst_conn_time = 0.f; | ||
static int worst_src_rr; | ||
static int worst_sink_rr; | ||
static float worst_crit; | ||
|
||
void profiling_initialization(unsigned max_fanout) { | ||
// add 1 so that indexing on the max fanout would still be valid | ||
time_on_fanout.resize((max_fanout / fanout_per_bin) + 1, 0); | ||
|
@@ -195,8 +206,37 @@ void profiling_initialization(unsigned max_fanout) { | |
part_tree_preserved = 0; | ||
connections_forced_to_reroute = 0; | ||
connections_rerouted_due_to_forcing = 0; | ||
worst_conn_time = 0.f; | ||
return; | ||
} | ||
|
||
void conn_start() { | ||
conn_start_time = clock(); | ||
} | ||
void conn_finish(int src_rr, int sink_rr, float criticality) { | ||
float route_time = static_cast<float>(clock() - conn_start_time) / CLOCKS_PER_SEC; | ||
if (route_time > worst_conn_time) { | ||
worst_src_rr = src_rr; | ||
worst_sink_rr = sink_rr; | ||
worst_conn_time = route_time; | ||
worst_crit = criticality; | ||
} | ||
|
||
VTR_LOG("%s to %s (crit: %f) took %f\n", | ||
describe_rr_node(src_rr).c_str(), | ||
describe_rr_node(sink_rr).c_str(), | ||
criticality, | ||
route_time); | ||
} | ||
void net_finish() { | ||
if (worst_conn_time > 0.f) { | ||
VTR_LOG("Worst conn was %s to %s (crit: %f) took %f\n", | ||
describe_rr_node(worst_src_rr).c_str(), | ||
describe_rr_node(worst_sink_rr).c_str(), | ||
worst_crit, | ||
worst_conn_time); | ||
} | ||
} | ||
#endif | ||
|
||
} // end namespace profiling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1096,6 +1096,8 @@ bool timing_driven_route_net(ConnectionRouter& router, | |
conn_delay_budget.short_path_criticality = budgeting_inf.get_crit_short_path(net_id, target_pin); | ||
} | ||
|
||
profiling::conn_start(); | ||
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. Should move out of this PR with the route_profiling.h/.cpp changes |
||
|
||
// build a branch in the route tree to the target | ||
if (!timing_driven_route_sink(router, | ||
net_id, | ||
|
@@ -1109,10 +1111,15 @@ bool timing_driven_route_net(ConnectionRouter& router, | |
router_stats)) | ||
return false; | ||
|
||
profiling::conn_finish(route_ctx.net_rr_terminals[net_id][0], | ||
sink_rr, | ||
pin_criticality[target_pin]); | ||
|
||
++router_stats.connections_routed; | ||
} // finished all sinks | ||
|
||
++router_stats.nets_routed; | ||
profiling::net_finish(); | ||
|
||
/* For later timing analysis. */ | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
connection_map.capnp shouldn't be required, because it isn't used?
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.
Or if we are going to use this, it should move to map_lookahead.capnp