Conversation
Signed-off-by: Abdulrasheed Abdulmajeed <miloboy188@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request ensures that explicit -terminal and -dont_route bump assignments survive database checkpoints by persisting them as properties on the bump terminal. The feedback highlights potential robustness issues when restoring these properties, specifically warning about silent failures if a target terminal is missing or if there is a net mismatch between the bump and its target terminal, and suggests adding defensive checks and warnings.
Comment on lines
+249
to
+254
| } else if (auto* target | ||
| = odb::dbStringProperty::find(iterm, kRdlRouteTargetProperty); | ||
| target != nullptr) { | ||
| if (auto* target_iterm = block_->findITerm(target->getValue().c_str())) { | ||
| iterm_pairs.push_back(target_iterm); | ||
| } |
Contributor
There was a problem hiding this comment.
When restoring the explicit routing target from the persisted string property, there are two potential correctness and robustness issues:
- Silent Failure on Missing Target: If the target ITerm is not found in the design (e.g., due to design changes or renaming), the routing is silently skipped because the
elseblock is bypassed. This should be logged as a warning/error. - Net Mismatch: If the restored target ITerm belongs to a different net than the bump ITerm, routing them together would create a short or net mismatch. We should perform a defensive check to ensure their nets match before adding the target to
iterm_pairs.
} else if (auto* target
= odb::dbStringProperty::find(iterm, kRdlRouteTargetProperty);
target != nullptr) {
auto* target_iterm = block_->findITerm(target->getValue().c_str());
if (target_iterm != nullptr) {
if (target_iterm->getNet() == iterm->getNet()) {
iterm_pairs.push_back(target_iterm);
} else {
logger_->warn(utl::PAD,
100,
"Persisted RDL routing target {} net {} does not match bump {}/{} net {}",
target->getValue(),
target_iterm->getNet() ? target_iterm->getNet()->getName() : "NULL",
iterm->getInst()->getName(),
iterm->getMTerm()->getName(),
iterm->getNet() ? iterm->getNet()->getName() : "NULL");
}
} else {
logger_->warn(utl::PAD,
101,
"Persisted RDL routing target {} for bump {}/{} not found in design",
target->getValue(),
iterm->getInst()->getName(),
iterm->getMTerm()->getName());
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Persist explicit
assign_io_bumpRDL routing intent acrosswrite_db/read_db.Problem
assign_io_bump -terminaland-dont_routeare currently stored only inICeWall::routing_map_. After a database checkpoint/reload that map is empty, sordl_routecan silently route a different topology.Changes
-terminaltargets as a string property on the bump ITerm.-dont_routeintent as a boolean property on the bump ITerm.RDLRouterto restore persisted intent when no in-memory routing-map entry exists.rdl_route_assignmentswith a realwrite_db-> separate-processread_dbround trip before routing.Validation
git diff --checkpasses.Fixes #11297