Repository navigation
Conversation
Now they return number of warnings. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Moved getBaseName from dbEditHierarchy to dbBlock. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…ate/OpenROAD into secure-insert-buffer Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…ate/OpenROAD into secure-insert-buffer Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…g later Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…D-Project-private/OpenROAD into secure-insert-buffer
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
| void dbInsertBuffer::setBufferAttributes(dbInst* buffer_inst) | ||
| { | ||
| new_flat_net_->setSigType(net_->getSigType()); | ||
| buffer_inst->setSourceType(dbSourceType::TIMING); |
There was a problem hiding this comment.
I fixed the source type attribute for the new buffer as TIMING. Is this ok?
|
|
||
| if (dbTechNonDefaultRule* ndr = net_->getNonDefaultRule()) { | ||
| new_flat_net_->setNonDefaultRule(ndr); | ||
| } |
|
No problem to waive clang-tidy |
|
Does this need a metrics PR for any flat flow changes? |
Yes. I am preparing a new ORFS PR. |
|
This is the related ORFS PR The-OpenROAD-Project/OpenROAD-flow-scripts#3737. |
| @@ -34,6 +34,18 @@ class IntegratedFixture : public tst::Fixture | |||
| void dumpVerilogAndOdb(const std::string& name) const; | |||
| void removeFile(const std::string& path); | |||
|
|
|||
| // Compare with verilog string input | |||
| // 'remove_file=false' will keep the output verilog for debug | |||
| void writeAndCompareVerilogOutputString( | |||
There was a problem hiding this comment.
This is fine but eventually I would like VerilogWriter to take an ostream so we can pass an ostringstream and do this in memory.
There was a problem hiding this comment.
I think writing on a file is better for debugging.
When a test case fails, we can debug it easier by opening the output verilog file (can be generated by setting remove_file = false).
If the verilog is just on a memory, we should write it on a file and run a diff for debugging
| return nullptr; | ||
| } | ||
|
|
||
| void dbBTerm::connect(dbNet* db_net, dbModNet* modnet) |
There was a problem hiding this comment.
Does it suffice to only take the dbModNet - would db_net ever not be modnet->findRelatedNet() ?
There was a problem hiding this comment.
It has the following issues.
- If netlist editing finishes successfully,
modnet->findRelatedNet()will find the correctdbNet. But it takes computational cost. - If netlist is being actively edited,
modnet->findRelatedNet()may not return the correctdbNetbecause the netlist is incomplete.
There was a problem hiding this comment.
I worry that some caller could give an invalid pair. Do we have a sanity check for this elsewhere?
| if (buffer_inst == nullptr) { | ||
| logger_->error( | ||
| utl::ODB, 1205, "BeforeLoads: Failed to create buffer instance."); | ||
| return nullptr; |
There was a problem hiding this comment.
Unreachable as error will throw
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
povik
left a comment
There was a problem hiding this comment.
I have reviewed Rebuffer.cc which looks good, I have also reviewed elsewhere in rsz except for the cpp tests
| // - No dont_touch | ||
| // - No pending-move cell | ||
| // - No multiple output cell | ||
| // |
There was a problem hiding this comment.
I haven't reviewed this comment
| // Martin (2024-04-18): This is copied over from original RepairSetup | ||
| // buffering mostly unchanged and is ripe for clean-up/rewrite later. | ||
| // Jaehyun (2025-11-27): Re-implemented using insertBufferBeforeLoads to | ||
| // simplify hierarchy handling and avoid direct use of hierarchicalConnect. |
There was a problem hiding this comment.
@jhkim-pii I think you have now done the rewrite this code was waiting for so we can drop the comments
| insertBuffers = [&](const BufferedNetPtr& node, | ||
| PinSet& current_loads, | ||
| int& count) { | ||
| if (!node) { |
There was a problem hiding this comment.
Nit: I think !node is unreachable
| sdc_network_->pathName(load_pin)); | ||
| return 0; | ||
| // Skip DontTouch pins | ||
| if (resizer_->dontTouch(load_pin)) { |
There was a problem hiding this comment.
I think later we should make sure that the choice topology never has a buffer in front of a dont touch load pin. Otherwise what gets implemented in odb differs from what the buffering algorithm evaluated and we are losing QoR.
There was a problem hiding this comment.
Yeah. It is a better approach.
| // node | ||
| odb::dbITerm* input_term = buf_inst->findITerm(input->name()); | ||
| if (input_term) { | ||
| Pin* sta_input_pin = db_network_->dbToSta(input_term); |
There was a problem hiding this comment.
Can db_network_->dbToSta for an ITerm fail?
There was a problem hiding this comment.
You're right. I don't think so. Let me remove the redundant code.
| /// - This accepts STA objects instead of db objects. | ||
| /// | ||
| Instance* insertBufferBeforeLoads(Net* net, | ||
| PinSeq* loads, |
There was a problem hiding this comment.
As far as I can see the PinSeq* variant isn't being used within rsz
There was a problem hiding this comment.
Yeah. I added it for future usage.
Some logics play with PinSet while other logics paly with PinSeq.
If this overloaded API does not exists, developers will do the PinSeq -> PinSet conversion here and there before calling the insertBuffer API.
IMO, having this prototype looks better to avoid the expected redundant codes in the future.
There was a problem hiding this comment.
I think RepairHold has one case of this conversion in your branch
| const odb::dbNameUniquifyType& uniquify | ||
| = odb::dbNameUniquifyType::ALWAYS, | ||
| bool loads_on_diff_nets = false); | ||
| odb::dbInst* insertBufferBeforeLoads(odb::dbNet* net, |
There was a problem hiding this comment.
Could we drop the odb type variants of the insert APIs on the resizer object? I don't think we use them and one can always do the cast on the caller side
There was a problem hiding this comment.
Hmm.. IMO, it would be better to have these APIs.
- If the caller already plays with ODB objects rather than STA objects by some reasons, calling this API is better because it can omit the redundant ODB -> STA -> ODB object conversions.
There was a problem hiding this comment.
On the other hand we mainly work with STA pointers in the resizer, and we don't provide ODB variants for other APIs
There was a problem hiding this comment.
Oh, I see.
But ODB is more powerful than STA data structures (e.g., due to richer physical data).
So I think we would play more with ODB especially in the future because new algorithm requires more and more physical information.
What do you think about this?
| // These buffers occupy as special place in hierarchy and cannot | ||
| // be removed without destroying the hierarchy. | ||
| // This is the hierarchical equivalent of "bufferBetweenPorts" above | ||
|
|
There was a problem hiding this comment.
@jhkim-pii Does dropping the check above mean that we would allow the removal of a feedthrough buffer?
| keys {-buffer_cell -location -buffer_name -net_name -net -load_pins} \ | ||
| flags {-load_pins_on_diff_nets} | ||
|
|
||
| # Validate mutually exclusive arguments |
There was a problem hiding this comment.
As far as I can tell -net and -load_pins are not mutually exclusive
There was a problem hiding this comment.
You're right. Let me modify the comment.
| # For a single load pin, use insert_buffer_before_load_cmd | ||
| set pin [lindex $loads 0] | ||
| return [rsz::insert_buffer_before_load_cmd $pin $buffer_cell $x $y $has_loc \ | ||
| $new_buf_base_name $new_net_base_name] |
There was a problem hiding this comment.
If both -net and -load_pins are supplied and -load_pins_on_diff_nets is not, are we meant to check all the load pins are on the provided net? If so, the check won't work for load_count==1 as we are discarding $net in that case
There was a problem hiding this comment.
If both -net and -load_pins are supplied and -load_pins_on_diff_nets is not, are we meant to check all the load pins are on the provided net?
Yes. The check is located at dbNet::insertBufferBeforeLoads().
If so, the check won't work for load_count==1 as we are discarding $net in that case
Yes. When the load_count is 1, the both -net and -load_pins_on_diff_nets are meaningless.
There was a problem hiding this comment.
That can surprising to the user as a check occurs or doesn't occur based on the number of loads
There was a problem hiding this comment.
Right.
Let me add this warning in the Resizer.tcl.
if { $load_count == 1 } {
if { $has_net } {
utl::warn RSZ 69 "-net argument is ignored if there is only one load pin."
}
# For a single load pin, use insert_buffer_before_load_cmd
set pin [lindex $loads 0]
return [rsz::insert_buffer_before_load_cmd $pin $buffer_cell $x $y $has_loc \
$new_buf_base_name $new_net_base_name]
Let me add the following statement in insert_buffer.md.
Note that
-load_pins_on_diff_netsand-netare meaningless
when a single load pin is given by-load_pins.
This is a known limitation for large PRs; the only solution is to split into multiple PRs. |
arthurjolo
left a comment
There was a problem hiding this comment.
Changes on LatencyBalancer.cpp looks fine, the changes seem to be replicating the previous code behavior correctly.
I just have one question about the static_cast.
| odb::dbObject* drvrPin = lastBuffer->getFirstOutput(); | ||
| drivingNet = static_cast<odb::dbITerm*>(drvrPin)->getNet(); |
There was a problem hiding this comment.
This is just a question, but I was wondering what is the reason for getting the driver pin as dbObject and static cast it when serching for the net?
There was a problem hiding this comment.
Oops. Thank you for catching this. It is a redundant casting.
|
This same API can also be used to insert inverters. Perhaps it would be better to use |
maliberty
left a comment
There was a problem hiding this comment.
More progress on the simple cases
| if (term_obj == nullptr || buffer_master == nullptr) { | ||
| return nullptr; | ||
| } |
There was a problem hiding this comment.
These seems more like an error by the caller. I think error here would be better than a quiet nullptr.
| } | ||
| mod_net = bterm->getModNet(); | ||
| } else { | ||
| return false; // Invalid term type |
| if (iterm && iterm->getInst()->isDoNotTouch()) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
This limitation can be solved by swapping the roles of the new and existing nets. That can be handled in another PR. I believe the current code does this.
There was a problem hiding this comment.
Got your point.
Let me think more about it.
| } | ||
|
|
||
| mod_net = iterm->getModNet(); | ||
| } else if (term_obj->getObjectType() == dbBTermObj) { |
There was a problem hiding this comment.
Is a dont-touch check needed on the net attached to the bterm?
There was a problem hiding this comment.
I modified the code to check the dont_touch flag of the net connected to the bterm.
| const char* inst_base_name | ||
| = (new_buf_base_name_) ? new_buf_base_name_ : "buf"; |
There was a problem hiding this comment.
I don't think new_buf_base_name_ can be null at this point.
There was a problem hiding this comment.
I think I can be null here. Could you please double check?
There was a problem hiding this comment.
Is it considered acceptable for the user to pass in a nullptr? If so then it could be. I would change the signature from
const char* new_buf_base_name = nullptr
to
const char* new_buf_base_name = "buf"
in that case rather than bury the default deep in the code and also to avoid the conditional here.
There was a problem hiding this comment.
Good suggestion. Let me do this.
// db.h
inline constexpr const char* kDefaultBufBaseName{"buf"};
inline constexpr const char* kDefaultNetBaseName{"net"};
// dbInsertBuffer.h
dbInst* insertBufferBeforeLoad(
dbObject* load_input_term,
const dbMaster* buffer_master,
const Point* loc = nullptr,
const char* new_buf_base_name = kDefaultBufBaseName,
const char* new_net_base_name = kDefaultNetBaseName,
const dbNameUniquifyType& uniquify = dbNameUniquifyType::ALWAYS);
| // This ensures that the net name matches the port name for Verilog | ||
| // compatibility. | ||
|
|
||
| std::string new_net_name = (new_net_base_name_) ? new_net_base_name_ : "net"; |
There was a problem hiding this comment.
I don't think new_net_base_name_ can be null
There was a problem hiding this comment.
I think it can also be null.
// In dbInsertBuffer.h
dbInst* insertBufferAfterDriver(dbObject* drvr_output_term,
const dbMaster* buffer_master,
const Point* loc = nullptr,
const char* new_buf_base_name = nullptr, // CAN BE NULL
const char* new_net_base_name = nullptr, // CAN BE NULL
const dbNameUniquifyType& uniquify
= dbNameUniquifyType::ALWAYS);
...
dbInst* dbInsertBuffer::insertBufferAfterDriver(
dbObject* drvr_output_term,
const dbMaster* buffer_master,
const Point* loc,
const char* new_buf_base_name,
const char* new_net_base_name,
const dbNameUniquifyType& uniquify)
{
dlogInsertBufferStart(++insert_buffer_call_count_, "AfterDriver");
return insertBufferSimple(drvr_output_term,
buffer_master,
loc,
new_buf_base_name, // CAN BE NULL
new_net_base_name, // CAN BE NULL
uniquify,
/* insertBefore */ false);
}
dbInst* dbInsertBuffer::insertBufferSimple(dbObject* term_obj,
const dbMaster* buffer_master,
const Point* loc,
const char* new_buf_base_name,
const char* new_net_base_name,
const dbNameUniquifyType& uniquify,
bool insertBefore)
{
...
buffer_master_ = buffer_master;
new_buf_base_name_ = new_buf_base_name; // CAN BE NULL
new_net_base_name_ = new_net_base_name; // CAN BE NULL
uniquify_ = uniquify;
...
dbInst* buffer_inst = checkAndCreateBuffer();
...
}
dbInst* dbInsertBuffer::checkAndCreateBuffer()
{
...
const char* inst_base_name
= (new_buf_base_name_) ? new_buf_base_name_ : "buf"; // new_buf_base_name_ CAN BE NULL
dbInst* buffer_inst = dbInst::create(block_,
const_cast<dbMaster*>(buffer_master_),
inst_base_name,
uniquify_,
target_module_);
...
}
|
|
||
| dbBTerm* bterm = static_cast<dbBTerm*>(obj); | ||
| std::string_view bterm_name{bterm->getConstName()}; | ||
| if (bterm_name == block_->getBaseName(net_->getConstName())) { |
There was a problem hiding this comment.
Why is getBaseName needed here? You wouldn't want bterm 'X' to match net 'A/X' (which would be very odd to happen in the first place).
There was a problem hiding this comment.
I don't get your point.
It is to check if the original net name is the same as any of output dbBTerm names.
If it is true, the original net (driving the new buffer) name should be changed and the new net (driving load pins) name should have the dbBTerm name.
net_ name has a full hierarchical name. So I used getBaseName() to extract the last token in the full name.
There was a problem hiding this comment.
How can a bterm be connected to a net that is not at the top of the hierarchy (i.e. without any delimiters in its name)?
There was a problem hiding this comment.
By the insert buffer, when a new net "hier/net" is going to be connected to an output bterm "out", it can happen.
"hier/net" can be connected to the bterm "out". But by this logic, it will be renamed to "out" soon.
Regardless of the renaming, "hier/net" connecting to the "out" can happen. In this case, verilog writer generates an assign statement to connect them (e.g., assign out = net; // 'net' from 'hier/net' ).
| // The original net names uses the BTerm name. | ||
| // Rename this net if its name is the same as a port name in loads_pins | ||
| std::string new_orig_net_name = block_->makeNewNetName( | ||
| target_module_ ? target_module_->getModInst() : nullptr, | ||
| "net", | ||
| uniquify_); |
There was a problem hiding this comment.
If uniquify is IF_NEEDED* this may not produce a different name. Would it be better to use ALWAYS*?
| terms.insert(term_obj); | ||
|
|
||
| new_flat_net_ = createNewFlatNet(terms); | ||
| if (new_flat_net_ == nullptr) { |
There was a problem hiding this comment.
The only way this could happen is if you messed up name uniquification. It should be an error in that case.
| dbNet* in_net = insertBefore ? net_ : new_flat_net_; | ||
| dbNet* out_net = insertBefore ? new_flat_net_ : net_; |
There was a problem hiding this comment.
In the driver-side buffering we have insertBefore=false. The doc says:
The original net is connected to the buffer input, and a new net is created for the buffer output to drive all original loads.
however this code says in_net is new_flat_net_ and out_net is net_. This seems to be the opposite.
There was a problem hiding this comment.
Oh, the doc is wrong. Thank you for catching this.
| dbModule* dbInsertBuffer::validateLoadPinsAndFindLCA( | ||
| std::set<dbObject*>& load_pins, | ||
| std::set<dbNet*>& other_dbnets, | ||
| bool loads_on_diff_nets) const |
There was a problem hiding this comment.
const (here and dlogBeforeLoadsParams).
| load_name); | ||
| return nullptr; | ||
| } | ||
| } else if (load_obj->getObjectType() == dbBTermObj) { |
There was a problem hiding this comment.
similar - does a bterm need a dont-touch on the net check?
There was a problem hiding this comment.
Added the dont_touch check logic for the net connected to the bterm.
| while (m1 != m2 && m1 != nullptr && m2 != nullptr) { | ||
| m1 = m1->getModInst() ? m1->getModInst()->getParent() : nullptr; | ||
| m2 = m2->getModInst() ? m2->getModInst()->getParent() : nullptr; | ||
| } |
There was a problem hiding this comment.
The only way you could get these to be null would be if they came from different blocks, otherwise the top_module would also be the common parent. We should error early if we see different blocks as that is a caller error.
There was a problem hiding this comment.
Reimplemented it. How about this?
dbModule* dbInsertBuffer::findLCA(dbModule* m1, dbModule* m2) const
{
dbModule* top_module = block_->getTopModule();
if (m1 == nullptr || m2 == nullptr) {
return top_module;
}
if (m1->getOwner() != m2->getOwner()) {
logger_->error(utl::ODB,
1212,
"findLCA: Two modules '{}' (block: {}) and '{}' (block: {}) "
"must be in the same block.",
m1->getName(),
m1->getOwner()->getName(),
m2->getName(),
m2->getOwner()->getName());
}
if (m1 == top_module || m2 == top_module) {
return top_module;
}
int d1 = getModuleDepth(m1);
int d2 = getModuleDepth(m2);
// Bring m1 and m2 to the same depth
while (d1 > d2) {
m1 = m1->getParentModule();
d1--;
}
while (d2 > d1) {
m2 = m2->getParentModule();
d2--;
}
// Move up until they meet
while (m1 != m2) {
m1 = m1->getParentModule();
m2 = m2->getParentModule();
}
return m1;
}
| target_module = curr_mod; | ||
| first = false; | ||
| } else { | ||
| target_module = findLCA(target_module, curr_mod); |
There was a problem hiding this comment.
if the target_module is the top_module there is no point in calling findLCA
There was a problem hiding this comment.
In the new implementation of findLCA(), I added the top module check logic to cover this.
This can make callers simpler.
| if (target_module == nullptr) { | ||
| target_module = block_->getTopModule(); | ||
| } |
| dbNet* new_flat_net_{nullptr}; // New flat net connected to the new buffer | ||
| dbModNet* new_mod_net_{nullptr}; // New modnet connected to the new buffer | ||
| dbModule* target_module_{nullptr}; // Target module for the new buffer | ||
| const dbMaster* buffer_master_{nullptr}; // Buffer master |
There was a problem hiding this comment.
Comments that don't add any information should be dropped (buffer_master_ is obviously the buffer master).
| trace_module = static_cast<dbITerm*>(trace_obj)->getInst()->getModule(); | ||
| } | ||
|
|
||
| while (trace_module != target_module_ && trace_module != nullptr) { |
There was a problem hiding this comment.
trace_module == nullptr can't happen
| return worker(start_net); | ||
| } | ||
|
|
||
| void dbInsertBuffer::populateReusableNets(const std::set<dbObject*>& load_pins) |
There was a problem hiding this comment.
populateReusableModNets is more precise. A descriptive comment would be helpful.
| if (modnets_in_target_module.contains(curr_modnet)) { | ||
| return curr_modnet; | ||
| } | ||
| curr_modnet = curr_modnet->getNextModNetInFanout(); |
There was a problem hiding this comment.
I unclear on how this works - this search from one path forward. If the module is in a different path it won't be found.
There was a problem hiding this comment.
You're right. I just considered a simple case that there is no multiple fanout.
Let me revise this.
| if (loc) { | ||
| placement_loc = *loc; | ||
| } else { | ||
| placement_loc = computeCentroid(orig_drvr_pin_, load_pins); |
There was a problem hiding this comment.
similar - if all instances are unplaced then don't place this one.
There was a problem hiding this comment.
Refactored the buffer placement code.
IMO,
|
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…ate/OpenROAD into secure-insert-buffer
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…ate/OpenROAD into secure-insert-buffer Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…ate/OpenROAD into secure-insert-buffer
| const std::function<bool(dbModNet*)>& condition, | ||
| dbHierSearchDir dir) const | ||
| { | ||
| std::vector<dbModNet*> worklist; |
There was a problem hiding this comment.
It would be better to use a deque so you can pop off the front rather than having the worklist keep all the visited nets. It can wait for another PR.
| dbModule* dbInsertBuffer::validateLoadPinsAndFindLCA( | ||
| std::set<dbObject*>& load_pins, | ||
| std::set<dbNet*>& other_dbnets, | ||
| bool loads_on_diff_nets) const |
Summary
Added new standard APIs for buffering that handles hierarchy processing.
Goal
Note that this PR affects QoR of the flat flow.
New feature
New APIs to insert buffers
dbNet::insertBufferAfterDriver(dbObject* drvr_term, ...)dbNet::insertBufferBeforeLoad(dbObject* load_term, ...)dbNet::insertBufferBeforeLoads(std::set<dbObject*> load_pins, ...)New Tcl command
insert_buffer -buffer_cell lib_cell [-net net] [-load_pins list_of_pins] [-location {x y}] [-buffer_name name] [-net_name name] [-load_pins_on_diff_nets]-buffer_cell-location{x y}coordinates (in microns) where the buffer should be placed. If not specified, the buffer is placed at the driver or load pin location.-buffer_name-net_name-net-load_pins, it performs driver-side buffering.-load_pins-load_pins_on_diff_nets-load_pinsare on the different nets. If specified, multiple load pins on different flat nets can be buffered together and the target net among the multiple flat nets can be selected by-net. This option should be used with caution not to change the logical function of the design.Detailed explanations in
src/rsz/doc/insert_buffer.md.Enhancement
Enhancement1. Added
dbSta::checkSanity().It checks consistency b/w ODB and STA data structures. It can be executed by the Tcl command
sta::check_axioms.Bug fixes
Fix1. Added overriding APIs
dbNetwork::drivers().ODB has
dbNetanddbModNetwhile OpenSTA has aNet.Network::drivers()API is implemented to handleNetin open STA.But it is not suitable for
dbNetanddbModNetin ODB.So I overridden the
drivers()APIs indbNetworkto support ODB.Fix2.
dbNetwork::net(const Pin*)returnsNet*instead of nullptrPreviously, it returns the
dbNetconnected to the inputdbBTermpin.Modified it to return
dbModNetfirst if the inputdbBTermhas a hier net connection. This is to make it consistent with other pin types (dbITerm).Fix3. Added hierarchical pin handling in
dbNetwork::connectPinAfter(Pin*)anddbNetwork::disconnectPinBefore(Pin*)This is needed to update the
net_drvr_pin_map_correctly.Otherwise, it can remove an existing timing edge or create a wrong timing edge by
sta_->connectPinAfter(pin)when ECO is performed, which is a critical issue breaking STA.Fix4. Made feedthrough connection in a module by enhancing
Verilog2db::constructModNet(Net*, dbModule*)In
Verilog2db::constructModNet(Net*, dbModule*), there is pin iteration, but there is no term iteration.So feedthrough connection b/w input
dbModBTermand outputdbModBTermconnection bydbModNetwas omiited.Added the term iteration as below.
Fix5. Removed redundant betweenPorts restrictions in
UnbufferMove::canRemoveBuffer()There was
remove_bufferrestriction that a buffer driving outputdbBTermcannot be removed.This was due to the incomplete
dbStaimplementation that removing a buffer connecting an inputdbBTermand an outputdbBTermcauses mal-function.Thanks to the
dbStaenhancement in this PR, now we can remove the redundant restrictions incanRemoveBuffer().Fix 6. Used flat net always instead of a mix of flat & hier nets in
Resizer::net_slack_map.This issue caused QoR difference b/w flat and hier flows because a mixed use of flat & hier nets causes
net_slack_map_cache lookup fail in hier flow.Solution
Use flat net always.
Fix 7. Fixed no incremental parasitics invalidation issue when
Net*indicates adbModNetPreviously, the following code skipped incremental parasitics invalidation when a
dbModNetis returned bydbNetwork::net(Pin*), which is wrong.The fix is to find the related
dbNetwith the givendbModNetand invalidate the parasitics correctly.Fix 8. Sorted instances by name in
Resizer::findCellInstances()In hier flow, the cell instances are gathered by visiting module by module while flat flow visits just a single top module.
So the resulting instance orders are different b/w flat and hier flows, which results in QoR gap.
A solution is to sort the cell instances by name.