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 51 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 manual 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:

  1. If a pin has a constraint region, use its center.
  2. If a pin doesn't have a constraint region, use the closest point of the closest boundary to that macro pin.

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]>
Signed-off-by: Arthur Koucher <[email protected]>
@maliberty
Copy link
Member

Conflict to resolve

@AcKoucher
Copy link
Contributor Author

Resolved.

Copy link
Contributor

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

Copy link
Contributor

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

@maliberty
Copy link
Member

Some unit test need fixing:

[2024-11-14T19:15:30.551Z] mpl2
[2024-11-14T19:15:37.996Z] io_constraints1 (tcl) *FAIL*
[2024-11-14T19:15:46.470Z] io_constraints2 (tcl) *FAIL*

@maliberty
Copy link
Member

It would be good to merge master and do a fresh secure CI as this PR is a bit old

Copy link
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

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

Pending updated secure CI.

src/mpl2/src/hier_rtlmp.cpp Outdated Show resolved Hide resolved
@AcKoucher
Copy link
Contributor Author

I ran an updated Secure-CI in the weekend and the only concerning thing is a WL degradation in gf180/uartblocks:

gf180 uart-blocks
[ERROR] globalroute__antenna_diodes_count fail test: 11.0 <= 10.0
[ERROR] detailedroute__route__wirelength fail test: 23164.0 <= 19722.0

I'll investigate it.

1) make pin access blockage creation more succinct
2) update regression tests with PPL updates
3) draw x mark on top of macros in debug (and erase it at the end)

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

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

Copy link
Contributor

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

@AcKoucher
Copy link
Contributor Author

AcKoucher commented Nov 21, 2024

The problem with uart-blocks was due to the fact that I wasn't considering the case in which a pin was not constrained to any region in the orientation improvement step. Now we compute WL with a similar technique used in SA: we get the closest point in the closest boundary and merge it's rect in the net_box.

I'm including this in the PR description for documentation.

Before:

After:

Also:
While updating the regression tests I found a bug in the pin access blockage creation which was fixed.
The same for a bug in graphics.

@AcKoucher
Copy link
Contributor Author

I'm running a new secure-CI with my latest changes and master.

@AcKoucher
Copy link
Contributor Author

Secure-CI is fine. There a couple designs that need metrics update.

Copy link
Collaborator

@eder-matheus eder-matheus left a comment

Choose a reason for hiding this comment

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

I don't have further comments, but I'll wait for @maliberty's final review before merging.

@maliberty
Copy link
Member

maliberty commented Nov 22, 2024

There a couple designs that need metrics update.

Is there a PR for this?

@AcKoucher
Copy link
Contributor Author

Is there a PR for this?

I opened #2582. However, a metrics conflict emerged from another PR. I'm re-running Secure-CI to update the metrics correctly.

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