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: IOs abstraction adaptation to ORFS flow - first version (simplified) #5809

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

AcKoucher
Copy link
Contributor

@AcKoucher AcKoucher commented Sep 26, 2024

Resolve the first top level task in #5669.
Close #4867.

Introductory Considerations

  • This is the first step of the enhancements to adapt the IOs abstractions inside mpl2 to ORFS flow.
  • This first version will not consider the dimensions of the constraints whether they are -exclude constraints or pins' constraint regions.

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. Further steps into 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.

What Annealing Sees

  • WL between a cluster/macro (soft/hard) M and an IO cluster IO is represented as follow:
    • If IO represents pins constrained to a certain boundary A, WL is the minimum distance between M's bundled center pin and A.
    • If IO represents unconstrained pins, WL is the minimum distance between M's bundled center pin and the closest non-blocked boundary.

Obs: This distance only reduces cost when M is inside the outline.

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.
  3. Make fixed terminals that represent IO clusters have the cluster data inside them so that this data is accessible inside SA for both Soft and Hard. I.e., the cluster of a fixed terminal that represents an IO cluster will be != nullptr

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 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! 👍"

Copy link
Contributor

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

@AcKoucher AcKoucher marked this pull request as ready for review October 14, 2024 13:14
Copy link
Contributor

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

@maliberty
Copy link
Member

"Lint Tcl code" needs fixing.

If a pin has been manually placed with place_pin (status=FIRM), will this code consider its location rather than its constraint?

@AcKoucher AcKoucher changed the title mpl2: adapt IO clusters to our flow mpl2: IOs abstraction adaptation to ORFS flow - first version (simplified) Oct 15, 2024
…pushed to it even if the edge is blocked

Signed-off-by: Arthur Koucher <[email protected]>
@AcKoucher
Copy link
Contributor Author

AcKoucher commented Oct 15, 2024

@maliberty I edited the description of the PR/Issue to make it clear that this is a simplified version of these enhancements.
I also pushed the change regarding the blocked boundaries as discussed (I'll also add a regression for this - it will help testing the debugger as well).

When addressing the review I'll fix the Lint Tcl.

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
Development

Successfully merging this pull request may close these issues.

Improve mpl2 so that sky130hd-microwatt does not have to rely on enhanced measures
3 participants