Skip to content

Commit

Permalink
Merge pull request #6077 from The-OpenROAD-Project-staging/sta-reset-…
Browse files Browse the repository at this point in the history
…on-sigtype

odb/dbSta: reset sta on dbBTerm::setSigType
  • Loading branch information
maliberty authored Oct 31, 2024
2 parents 901913f + 5ea4a4b commit ed665d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/dbSta/src/dbSta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class dbStaCbk : public dbBlockCallBackObj
void inDbBTermCreate(dbBTerm*) override;
void inDbBTermDestroy(dbBTerm* bterm) override;
void inDbBTermSetIoType(dbBTerm* bterm, const dbIoType& io_type) override;
void inDbBTermSetSigType(dbBTerm* bterm, const dbSigType& sig_type) override;

private:
dbSta* sta_;
Expand Down Expand Up @@ -882,6 +883,13 @@ void dbStaCbk::inDbBTermSetIoType(dbBTerm* bterm, const dbIoType& io_type)
sta_->getDbNetwork()->setTopPortDirection(bterm, io_type);
}

void dbStaCbk::inDbBTermSetSigType(dbBTerm* bterm, const dbSigType& sig_type)
{
// sta can't handle such changes, see OpenROAD#6025 so just reset the whole
// thing.
sta_->networkChanged();
}

////////////////////////////////////////////////////////////////

// Highlight path in the gui.
Expand Down
2 changes: 2 additions & 0 deletions src/odb/include/odb/dbBlockCallBackObj.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class dbPlacementStatus;
class dbObstruction;
class dbRegion;
class dbRow;
class dbSigType;
class dbSBox;
class dbSWire;
class dbMarker;
Expand Down Expand Up @@ -107,6 +108,7 @@ class dbBlockCallBackObj
virtual void inDbBTermPreDisconnect(dbBTerm*) {}
virtual void inDbBTermPostDisConnect(dbBTerm*, dbNet*) {}
virtual void inDbBTermSetIoType(dbBTerm*, const dbIoType&) {}
virtual void inDbBTermSetSigType(dbBTerm*, const dbSigType&) {}
// dbBTerm End

// dbBPin Start
Expand Down
4 changes: 4 additions & 0 deletions src/odb/src/db/dbBTerm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ void dbBTerm::setSigType(dbSigType type)
block->_journal->updateField(
this, _dbBTerm::FLAGS, prev_flags, flagsToUInt(bterm));
}

for (auto callback : block->_callbacks) {
callback->inDbBTermSetSigType(this, type);
}
}

dbSigType dbBTerm::getSigType()
Expand Down
2 changes: 1 addition & 1 deletion src/sta

0 comments on commit ed665d3

Please sign in to comment.