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

mpl2: adapt IO clusters to our flow #5809

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

AcKoucher
Copy link
Contributor

@AcKoucher AcKoucher commented Sep 26, 2024

When ready, will resolve #4867 and close #5669.

Note: Opening as a draft, because there are regression tests to create.

Goals

  1. Improve QoR in terms of WL.
  2. Ease the life of the annealer for some cases (e.g., sky130hd/uW) that require extreme virtual std cell utilization configurations to converge.
  3. Allow switching from old mpl to mpl2 for cases such as sky130hd/chameleon (This will still require clustering work)

Main Changes

Modify IO Clusters

IO clusters that represent bundledIOs created from the pins placed by random PPL are now groups of unplaced IOs with the same constraints based on the following:

  • Individual Pin Constraints:

    • If an IO has a constraint region in a certain boundary, it is constrained to that entire boundary.
    • If an IO has no constraint region, it is constrained to all boundaries.
  • Global Pins' Constraints (-exclude)

    • If a boundary has more than 70% of its extension blocked, it is considered a blocked boundary for IOs.
      • Clusters connected to pins constrained to a certain blocked boundary A won't be pushed towards A.

What Annealing Sees

  • The distance to boundary that represent WL between clusters and IOs only reduces cost when the cluster is inside outline.
  • If a cluster/macro M (soft/hard) has a connection with an IO cluster that represents a certain boundary A, the WL of this connection is the minimum distance between M's bundled center pin and A.
  • If a cluster/macro M (soft/hard) has a connection with an IO cluster that represents all boundaries, the WL of this connection is the minimum distance between M's bundled center pin and the closest non-blocked boundary.

Collateral Changes

Needed for the Approach to Work

  1. Add Cluster support to HardMacro so that SA can check if they are IO clusters' fixed terminals.
  2. Make both Soft/HardMacroSACores have access to the PhisycalHierarchical data where the global constraints are now stored.

Blockages for Pin Access

Generated based on a combination of both global and individual pins' constraints:

  1. If there are pins constrained to a certain boundary, we'll generate a blockage for that boundary.
  2. If there are no pins constrained a boundary A but there are pins constrained to all boundaries, A won't have a pin access blockage. (Specially important so that SA has more freedom).
  3. The depth of the blockage is a combination of the extension of IO clusters and std cell area (this can definitely be further improved to consider the IOs density)

Orientation Improvement

When iterating a net, compute HPWL based on the center of the constraint region for each IO instead of its location.

Debug Mode

  1. Blocked boundaries are marked with a red X in the center of their extension
  2. Draw distance to constraint || closest boundary only when the cluster/macro is inside the outline

AcKoucher and others added 30 commits September 9, 2024 19:57
1) Remove logic of bundled ios per edge and add one constraint cluster per edge
2) Add checks to prevent crash - for testing
3) Comment blockages creation based on IO placement

Signed-off-by: Arthur Koucher <[email protected]>
1) map bterms when creating a new io cluster
2) remove debug check
3) cluster that represent no constraints have the shape of the die

Signed-off-by: Arthur Koucher <[email protected]>
Signed-off-by: Arthur Koucher <[email protected]>
Signed-off-by: Arthur Koucher <[email protected]>
1) avoid computing WL twice for IO cases
2) add fixed penalty for IO connections when the macro is outside the outline
3) don't draw dist to edge in graphics when macro is outside the outline

Signed-off-by: Arthur Koucher <[email protected]>
Signed-off-by: Arthur Koucher <[email protected]>
Signed-off-by: Arthur Koucher <[email protected]>
… area and io clusters' extensions

Signed-off-by: Arthur Koucher <[email protected]>
Signed-off-by: Arthur Koucher <[email protected]>
@AcKoucher AcKoucher changed the title Mpl2 constraints mpl2: modify IO clusters to our flow Sep 26, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/mpl2/src/SimulatedAnnealingCore.h Outdated Show resolved Hide resolved
src/mpl2/src/clusterEngine.cpp Outdated Show resolved Hide resolved
src/mpl2/src/clusterEngine.h Outdated Show resolved Hide resolved
src/mpl2/src/clusterEngine.h Outdated Show resolved Hide resolved
src/mpl2/src/hier_rtlmp.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@AcKoucher AcKoucher changed the title mpl2: modify IO clusters to our flow mpl2: adapt IO clusters to our flow Sep 26, 2024
src/mpl2/src/SimulatedAnnealingCore.cpp Outdated Show resolved Hide resolved
src/mpl2/src/clusterEngine.cpp Outdated Show resolved Hide resolved
src/mpl2/src/clusterEngine.cpp Show resolved Hide resolved
src/mpl2/src/hier_rtlmp.cpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/mpl2/src/SimulatedAnnealingCore.cpp Outdated Show resolved Hide resolved
src/mpl2/src/SimulatedAnnealingCore.cpp Outdated Show resolved Hide resolved
src/mpl2/src/SimulatedAnnealingCore.cpp Outdated Show resolved Hide resolved
src/mpl2/src/SimulatedAnnealingCore.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

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