OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

mpl: conversion from microns to dbu

Open openroad-ci opened this issue 2 weeks ago • 8 comments

This PR converts all internal structures of MPL to use DBU instead of microns. The conversion doesn't result in equal results for most designs, since the small conversion error adds up and leads to different annealing results over time, so placement results are expected to change while maintaining a similar quality between the micron and DBU versions. UI should display all values in microns (except some debug interfaces) and API should accept only values in microns as well.

Main changes:

  • Removal of mpl::Rect and use of odb::Rect in all instances;
  • Use of int for height and width and int64_t for area and perimeter for MPL classes: Cluster, SoftMacro, HardMacro, Tiling, etc..

Next steps:

  • mpl::Point is redundant and should be removed;
  • Revisit SA weights and penalties: the conversion made penalty values explode for WL, area, and others, requiring a conversion back to micron in order to maintain some semblance of similarity of results between MPL results using micron and DBU.

openroad-ci avatar Dec 03 '25 21:12 openroad-ci

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 03 '25 21:12 github-actions[bot]

@joaomai It looks like there's a problem with (Tcl) Flow Tests nangate45/tinyRocket

AcKoucher avatar Dec 03 '25 22:12 AcKoucher

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 04 '25 17:12 github-actions[bot]

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 05 '25 16:12 github-actions[bot]

@rovinski Are you referring to a specific class? All the annealing mechanism is templated - but that is necessary.

AcKoucher avatar Dec 05 '25 22:12 AcKoucher

Hmm I guess on closer look it maybe does. Disregard.

rovinski avatar Dec 06 '25 05:12 rovinski

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 08 '25 16:12 github-actions[bot]

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 09 '25 14:12 github-actions[bot]

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 11 '25 22:12 github-actions[bot]

This will resolve #8591.

AcKoucher avatar Dec 12 '25 16:12 AcKoucher

conflicts to resolve

maliberty avatar Dec 13 '25 02:12 maliberty

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 13 '25 13:12 github-actions[bot]

In mock-array, this still needs fixing

[2025-12-13T13:13:42.999Z] [ERROR MPL-0016] The instance area considering the macros' halos 5978325000 exceeds the floorplan area 74649600
[2025-12-13T13:13:42.999Z] Error: macro_place.tcl, 5 MPL-0016

maliberty avatar Dec 13 '25 16:12 maliberty

@maliberty From what Arthur K explained to me, it is failing because Bazel's ORFS is not updated with a change in the global fence default value. I think #9024 fixes the issue.

joaomai avatar Dec 13 '25 17:12 joaomai

Ok I've merged that PR. Try merging master to your branch

maliberty avatar Dec 13 '25 17:12 maliberty

With #9024, the default values for the global fence will be correct in the Bazel tests. However, I'm not sure it will solve the problem pointed out by Matt. It will probably require some more investigation.

AcKoucher avatar Dec 14 '25 15:12 AcKoucher

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 15 '25 18:12 github-actions[bot]

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 15 '25 19:12 github-actions[bot]

waiting for secure-ci/metrics

maliberty avatar Dec 15 '25 21:12 maliberty

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Dec 17 '25 03:12 github-actions[bot]

@maliberty Good to go. PR #3707 on ORFS.

joaomai avatar Dec 17 '25 12:12 joaomai