Repository navigation
Conversation
…gion Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
…creation threshold Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
This needs empirical justification. On what ORFS design does this PR result in an improvement? |
|
For most designs with clock gaters or macros. mempool_group, ariane136 and cva6 show skew improvements (although not tns improvements for all as cva6 and ariane136 are coling timing). But also private designs show significant tns and skew improvements. |
| return branchSinkLocs_[branchIdx]; | ||
| } | ||
|
|
||
| double getLargestSinkRegionHPWL(unsigned wireSegmentUnit) const |
There was a problem hiding this comment.
Large methods like this should be in the .cpp
| minY = std::min(minY, sinks[j].getY()); | ||
| maxY = std::max(maxY, sinks[j].getY()); | ||
| } | ||
| const double hpwl = ((maxX - minX) + (maxY - minY)) * wireSegmentUnit; |
There was a problem hiding this comment.
You can hoist * wireSegmentUnit to the final return statement.
|
Is it pure improvements or will we need any metrics update? |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc4454542a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (maxWlMicrons > 0) { | ||
| options_->setMaxWl(block_->micronsToDbu(maxWlMicrons)); | ||
| } |
There was a problem hiding this comment.
When a previous clock_tree_synthesis run computed a positive maxWl_, this branch leaves that value in options_ if a later run/design has no positive findMaxWireLength result (for example, no clock wire RC; runTritonCts clears builders/state but does not recreate CtsOptions). HTreeBuilder will then still see getMaxWl() as enabled and apply an obsolete geometric/wirelength threshold to the new run instead of the intended no-max-WL behavior, so the non-positive case should explicitly clear/set maxWl_ to 0.
Useful? React with 👍 / 👎.
| " Stop criterion found. Sink region hpwl " | ||
| "is smaller than max wirelength ({}) and max number of " | ||
| "sinks is {}.", | ||
| options_->getMaxWl() / options_->getWireSegmentUnit(), |
There was a problem hiding this comment.
In the log, max wirelength unit is unclear.
How about using um?
Or it is better to specify the max wirelength unit.
There was a problem hiding this comment.
max wl is in DBUs. I didn't use um because in CTS um is barely used. I don't have strong opinion on what should the units be, so I am ok with changing to um
There was a problem hiding this comment.
For user facing messages um is better. Internally we should use dbu
| : numMaxLeafSinks_); | ||
| break; | ||
| } | ||
| } |
There was a problem hiding this comment.
Minor if-statement structure modification. How about this?
isNumberOfSinksTooSmall(numSinksPerSubRegion)is called once.- Do not call
topologyForEachLevel_.back().getLargestSinkRegionHPWL()if number of sinks is large.
if (isNumberOfSinksTooSmall(numSinksPerSubRegion)) {
if (options_->getMaxWl()) {
const double maxHPWL = ...
if (maxHPWL < options_->getMaxWl() ) {
logger_->into(CTS, 38, ...);
}
} else {
logger_->info(CTS, 32, ...);
}
}
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
Signed-off-by: arthurjolo <arthurjl@precisioninno.com>
|
I addressed all the reviews and made a PR to update one failing metric (The-OpenROAD-Project/OpenROAD-flow-scripts#4350). |
Summary
This PR improves the H-tree level creation stop criterion in CTS by using the actual sink region geometry, preventing shallow trees.
The existing stop criterion for H-tree level creation relied solely on the number of sinks per subregion (isNumberOfSinksTooSmall). This could cause the tree to stop building levels too early or too late, depending on sink distribution — particularly for designs with max_wirelength set or macro trees.
Type of Change
Impact
Combined H-tree level stop criterion: When max_wirelength is set, level creation now stops only when both the largest sink region HPWL is smaller than max_wirelength and the number of sinks per subregion is too small. Previously, the sink-count check alone could stop the tree prematurely when sinks were still geometrically spread out. When max_wirelength is not set, the original sink-count-only criterion is preserved.
Guard against invalid maxWl (TritonCTS.cpp:247-249): setMaxWl is now only called when resizer_->findMaxWireLength() returns a positive value, preventing a zero/negative max wirelength from disabling the geometric check
Verification
./etc/Build.sh).Related Issues