-
Notifications
You must be signed in to change notification settings - Fork 857
[Do Not Merge Yet] Missing para dbmodnet #9745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
39ac5ac
35f274e
09730f1
0489b20
46be33b
b19079f
6832007
73558ab
b614eb5
51a1bb5
62d242f
ea8cf58
8603606
1623227
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2016,9 +2016,18 @@ void dbNetwork::visitConnectedPins(const Net* net, | |
| } | ||
| } | ||
|
|
||
| // Caution: | ||
| //- Network::highestConnectedNet(Net *net) retrieves the highest hierarchical | ||
| // net connected to the given net. | ||
| // - But `dbNetwork::highestConnectedNet(Net* net)` retrieves the corresponding | ||
| // flat net for the given net. | ||
| // - It behaves differently to cope with the issue 9724. | ||
| // - This redefinition may cause another issue later when | ||
| // `Network::highestConnectedNet(Net *net)` is used elsewhere. | ||
| const Net* dbNetwork::highestConnectedNet(Net* net) const | ||
| { | ||
| return net; | ||
| const Net* flat = findFlatNet(net); | ||
| return flat ? flat : net; | ||
| } | ||
|
|
||
| //////////////////////////////////////////////////////////////// | ||
|
|
@@ -5198,11 +5207,15 @@ Net* dbNetwork::highestNetAbove(Net* net) const | |
| } | ||
|
|
||
| if (modnet) { | ||
| // Return the flat net associated with this mod net. | ||
| // Parasitic externality checks in | ||
| // ConcreteParasiticNetwork::ensureParasiticNode compare against net_ which | ||
| // is always a flat net (set via makeParasiticNetwork). Returning the | ||
| // highest mod net causes all pin nodes on hierarchically-connected nets to | ||
| // compare unequal to net_ and be incorrectly marked as external, making | ||
| // node_count_ = 0 and crashing PRIMA in measureThresholds. | ||
| if (dbNet* related_dbnet = modnet->findRelatedNet()) { | ||
| if (odb::dbModNet* highest_modnet | ||
| = related_dbnet->findModNetInHighestHier()) { | ||
| return dbToSta(highest_modnet); // Found the highest modnet | ||
| } | ||
| return dbToSta(related_dbnet); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Net* dbNetwork::highestNetAbove that I modified is not called by ReportPath::descriptionNet(const Pin *pin). Rather it calls Network::highestNetAbove(Net *net) function. This highestNetAbove is defined virtual in the Network class
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay I see what you mean. In OpenROAD binary, ReportPath::descriptionNet() dispatches to dbNetwork::highestNetAbove(). So the opposite is guaranteed: OpenROAD will always call dbNetwork::highestNetAbove(), not Network::highestNetAbove(). Hmm.. I don't know the answer yet- I don't see any regression failures, but I will get CC to check for this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, dbNetwork::highestNetAbove() changes report_checks output (and any command using ReportPath::descriptionNet), but only for hierarchical designs with modNets — and it changes the net name displayed, not the timing values. top --> u_core (instance of "core") --> u_alu (instance of "alu") --> adder gate drives wire "sum_out"
If the same physical signal has a different modNet name at each hierarchy level as shown above, after flattening, one flat dbNet is created. Its name depends on where/how flattening named it — suppose it's u_core/alu_result (a common convention: the net retains the name from an intermediate hierarchy level).
The old behavior always showed the topmost hierarchical name — the name at the highest module boundary the signal reached. The new behavior shows the flat dbNet name, which is whatever name the net was assigned during flattening/synthesis. What is NOT affected
|
||
| } | ||
| } | ||
|
|
||
|
|
||



There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The objective of
Network::highestConnectedNet(Net* net)is to retrieve the hierarchical net in the highest module.But the this
dbNetwork::highestConnectedNet(Net* net)finds the corresponding flat net for the given hier net, which is a different behavior.Fortunately, there is only one caller
Parasitics::findParasiticNet(const Pin *pin). So the current fix works.But if
Network::highestConnectedNet(Net* net)is used by another caller for a different purpose later, this fix can make a trouble.I don't have a better idea about how to solve this issue.
But let's leave a comment to describe this issue.
e.g.,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me the clean solution is to only ever expose hierarchical nets to STA since that seems to be what it's expecting and that's how
ConcreteNetworkimplementsNetworkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately that isn't possible with the way hierarchy was implemented in odb. For a net that is local to a single module we only create the flat net and skip the hierarchical one (since it would be equivalent as the net doesn't span a boundary). That complicates the API but does save memory on a flat design. The tradeoff could be revisited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maliberty in that case shouldn't we expose dbNet to STA only for those nets local to a module, and use dbModNet otherwise? That would match ConcreteNetwork as far as STA could tell