DRT: filter unsupported rules at io and fix minarea in FlexGC#10180
DRT: filter unsupported rules at io and fix minarea in FlexGC#10180openroad-ci wants to merge 5 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
There was a problem hiding this comment.
Code Review
This pull request refactors the handling of LEF58 area constraints by separating them into general area and rectwidth-specific lists, ensuring they are sorted for optimized checking. It also updates the parser to skip unsupported LEF58 rule branches and refactors the geometric verification logic. Feedback identifies a logic bug in the area check where non-rectangle shapes could prematurely skip constraints, notes that RECTWIDTH comparisons should be inclusive to match the LEF58 specification, and highlights a potential null pointer dereference for drWorker_.
| lef58AreaConstraints_.push_back(in); | ||
| // This vector should be sorted by area in a descending order | ||
| auto area = in->getODBRule()->getArea(); | ||
| auto it = std::ranges::lower_bound(lef58AreaConstraints_.begin(), |
There was a problem hiding this comment.
warning: no header providing "std::ranges::lower_bound" is directly included [misc-include-cleaner]
src/drt/src/db/tech/frLayer.h:5:
- #include <algorithm>
+ #include <bits/ranges_algo.h>
+ #include <algorithm>Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
Summary
refactor(drt): filter unsupported rules at IO instead of GC
Unsupported LEF58_AREA and LEF58_CUTSPACING sub-branches were accepted in io.cpp but warned per-invocation in GC — noisy and wasteful. Reject them once at parse time, skip storing. In addition, the logic for checking the LEF58_AREA rules was flawed.
Type of Change
Impact
This is expected to change how DRT patches for min area rules.
Verification
./etc/Build.sh).