Repository navigation
Conversation
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new via access search algorithm (ViaAccessSearch) in FlexPA to generate via access points for standard cell pins, along with associated unit tests. The review feedback suggests adding an underflow check for track coordinates on layers to prevent potential out-of-bounds values, and adding a defensive null check for pin_access in revertAccessPoints to avoid a potential null pointer dereference.
| if (count != 0 | ||
| && start + (count - 1) * spacing | ||
| > std::numeric_limits<frCoord>::max()) { | ||
| logger_->error(DRT, | ||
| kMsgIdPinAccessCoordinateDomain, | ||
| "Last pin-access track coordinate on layer {} is outside " | ||
| "the native coordinate range.", | ||
| layer_num); | ||
| } |
There was a problem hiding this comment.
The current check only validates if the last track coordinate exceeds the maximum limit. However, the track coordinates can also underflow the minimum limit of frCoord (e.g., if start is extremely negative). To ensure complete robustness, we should check both the start and last coordinates against the minimum and maximum limits of frCoord.
if (count != 0) {
const int64_t last = start + (count - 1) * spacing;
if (start < std::numeric_limits<frCoord>::min()
|| last > std::numeric_limits<frCoord>::max()) {
logger_->error(DRT,
kMsgIdPinAccessCoordinateDomain,
"Track coordinates on layer {} are outside "
"the native coordinate range.",
layer_num);
}
}There was a problem hiding this comment.
start is already of type frCoord and spacing is unsigned, so coords cannot fall below its minimum. Only an overflow is possible, which the existing check covers.
| auto pin_access = pin->getPinAccess(pin_access_idx); | ||
| for (auto& access_point : pin_access->getAccessPoints()) { |
There was a problem hiding this comment.
If pin_access is null (e.g., if pin access generation failed or was skipped for this pin), dereferencing it with pin_access->getAccessPoints() will cause a null pointer dereference crash. Adding a defensive null check prevents this.
auto pin_access = pin->getPinAccess(pin_access_idx);
if (!pin_access) {
continue;
}
for (auto& access_point : pin_access->getAccessPoints()) {There was a problem hiding this comment.
Initialization allocates an access container for every pin including skipped pins. No APs leave an empty container, generation failures throw before this. So a null check would just mask an initialization bug.
|
I had to update metrics to make this pass. I had a look at all of them and to me this does not seem like a failure or problem with this PR but rather just noise from routing.
Setup is fine, clock skew fails for AES and worst slew margin and worst cap fail for all three. |
8182e7d to
4393a0f
Compare
Use pin and via enclosure geometry to find additional via origins on preferred upper-layer tracks after ordinary pin access generation. Sample manufacturing-grid positions in short intervals and endpoints and midpoints in longer intervals. Retain native candidates and per-pin work limits, and validate additions through the native directional checker. Preserve distinct via identities and continue NearbyGrid generation when the existing pool is insufficient. Keep planar-only and upward-via choices separate at a shared location so pattern checking can retain the original no-via alternative. Enable this generation as normal pin-access behavior with no mode controls. Cover sampling, native access preservation, budgets and coordinate limits with portable fixtures. Signed-off-by: Philippe Sauter <phsauter@iis.ee.ethz.ch>
Regenerate the RAM routing references and post-route antenna-repair log from unchanged stock tests. Additional access choices change route geometry; the stale-wire and routing-demand checks remain zero. Signed-off-by: Philippe Sauter <phsauter@iis.ee.ethz.ch>
4393a0f to
26a6e0b
Compare
Summary
Extends pin access generation to find more viable access points aligned with the preferred upper-layer tracks. It preserves preexisting candidates and via alternatives and just expands on it using an expanded NearbyGrid search when too few access points are found so far.
Type of Change
Impact
Pin access should be able to find more access points especially for pins with few APs before. It still retains and uses the other candidates so I would not expect any impact for most simpler pins.
Verification
./etc/Build.sh).