Skip to content
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

[RWRoute] Adjust wire base costs + cross SLR estimates #1030

Draft
wants to merge 19 commits into
base: rwroute_capped_bias
Choose a base branch
from

Conversation

eddieh-xlnx
Copy link
Collaborator

@eddieh-xlnx eddieh-xlnx commented Jul 12, 2024

  1. Adjust wire base costs such that:
    i. A NODE_SINGLE/NODE_DOUBLE can (typically) no longer lead to a lower total path cost than the NODE_LOCAL that feeds it, even if it gets us closer to the sink. The reasoning is that we want all the equivalent-cost NODE_LOCAL-s to be explored before allowing single/double wires to be taken, in case there is a chance that a longer wire (double/quad) that can get us there even more efficiently.

Take for example the following, where the sink is solely to its north:

LAG_LAG_X102Y359/RXD1 -> INT_X103Y359/INT_NODE_SDQ_74_INT_OUT0 [C0] -> INT_X103Y359/EE4_W_BEG4
                                                                    -> INT_X103Y359/NN1_W_BEG4  [C1]
                                                                    -> INT_X103Y359/NN2_W_BEG4  [C2]
                                                                    -> INT_X103Y359/WW4_W_BEG4
                      -> INT_X103Y359/INT_NODE_SDQ_74_INT_OUT1 [C0] -> INT_X103Y359/EE2_W_BEG5
                                                                    -> INT_X103Y359/NN1_W_BEG5
                                                                    -> INT_X103Y359/NN4_W_BEG4  [C3]
                                                                    -> INT_X103Y359/WW2_W_BEG5
                      -> INT_X103Y359/INT_NODE_SDQ_76_INT_OUT0 [C0] -> ...
                      -> INT_X103Y359/INT_NODE_SDQ_76_INT_OUT0 [C0] -> ...

Now, expansion of LAG_LAG_X102Y359/RXD1 would place all INT_NODE_SDQ_7[46]_INT_OUT[01] nodes onto the priority queue, all with the same cost of C0.

If NN1 or NN2's cost (C1/C2) was smaller than C0, then RWRoute would explore those nodes ahead of the other INT_NODE_SDQs and miss out on the NN4 (which potentially leads to a NN12)

Ideally, we want: C1 (NN1) > C2 (NN2) > C0 > C3 (NN4) assuming that the sink is at least 4 tiles away such that single and double wires are not explored before all the SDQ nodes are explored, but quads and longs that close the distance to the sink will take priority.

  1. Fix distance estimate to sink for cross-SLR connections
  2. Do not explore RouteNodeGraph.accessibleWireOnlyIfAboveBelowTarget nodes (e.g. INT_NODE_IMUX/BYPASS/BOUNCE/etc.) nodes if no SLR crossing needed to reach sink

Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
@eddieh-xlnx eddieh-xlnx force-pushed the rwroute_new_base_costs branch from a20d0ed to 3dfc9b6 Compare July 12, 2024 22:44
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
@eddieh-xlnx eddieh-xlnx force-pushed the rwroute_new_base_costs branch from 4398fd7 to 56e41f0 Compare July 16, 2024 20:57
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
@@ -1911,6 +1911,7 @@ private float getNodeCost(RouteNode rnode, Connection connection, int countSameS
// CRoute paper states that the bias factor cannot be more than half of the wire cost
// (it may exceed this here because we may not be using the minimum-sized bounding box)
float biasCost = rnode.getBaseCost() * Math.min(distToCenter * net.getBiasFactor(), 0.5f);
biasCost = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
biasCost = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant