mpl: conversion from microns to dbu
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.
clang-tidy review says "All clean, LGTM! :+1:"
@joaomai It looks like there's a problem with (Tcl) Flow Tests nangate45/tinyRocket
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
@rovinski Are you referring to a specific class? All the annealing mechanism is templated - but that is necessary.
Hmm I guess on closer look it maybe does. Disregard.
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
This will resolve #8591.
conflicts to resolve
clang-tidy review says "All clean, LGTM! :+1:"
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 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.
Ok I've merged that PR. Try merging master to your branch
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.
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
waiting for secure-ci/metrics
clang-tidy review says "All clean, LGTM! :+1:"
@maliberty Good to go. PR #3707 on ORFS.