@@ -405,6 +405,44 @@ class dbNetwork : public ConcreteNetwork
405405 double dbuToMeters (int dist) const ;
406406 int metersToDbu (double dist) const ;
407407
408+ // //////////////////////////////////////////////////////////////
409+ // Sequential / Flop / Scan flop utility functions
410+ // clock pin functions
411+ bool isClockPin (odb::dbITerm* iterm) const ;
412+ bool clockOn (odb::dbInst* inst) const ;
413+
414+ // d pin functions
415+ bool isDPin (odb::dbITerm* iterm) const ;
416+ int getNumD (odb::dbInst* inst) const ;
417+
418+ // q(n) pin functions
419+ bool isQPin (odb::dbITerm* iterm) const ;
420+ bool isInvertingQPin (odb::dbITerm* iterm) const ;
421+ int getNumQ (odb::dbInst* inst) const ;
422+
423+ // clear/preset pin functions
424+ bool hasClear (odb::dbInst* inst) const ;
425+ bool isClearPin (odb::dbITerm* iterm) const ;
426+ bool hasPreset (odb::dbInst* inst) const ;
427+ bool isPresetPin (odb::dbITerm* iterm) const ;
428+
429+ // scan cell/pin functions
430+ bool isScanCell (odb::dbInst* inst) const ;
431+ bool isScanIn (odb::dbITerm* iterm) const ;
432+ odb::dbITerm* getScanIn (odb::dbInst* inst) const ;
433+ bool isScanEnable (odb::dbITerm* iterm) const ;
434+ odb::dbITerm* getScanEnable (odb::dbInst* inst) const ;
435+ LibertyPort* getLibertyScanEnable (const LibertyCell* lib_cell) const ;
436+ LibertyPort* getLibertyScanIn (const LibertyCell* lib_cell) const ;
437+ LibertyPort* getLibertyScanOut (const LibertyCell* lib_cell) const ;
438+
439+ // supply pin functions
440+ bool isSupplyPin (odb::dbITerm* iterm) const ;
441+ bool isValidFlop (odb::dbInst* FF ) const ;
442+ bool isValidTray (odb::dbInst* tray) const ;
443+
444+ // //////////////////////////////////////////////////////////////
445+
408446 // hierarchy handler, set in openroad tested in network child traverserser
409447
410448 void setHierarchy () { db_->setHierarchy (true ); }
@@ -483,6 +521,7 @@ class dbNetwork : public ConcreteNetwork
483521 static constexpr unsigned DBIDTAG_WIDTH = 0x4 ;
484522
485523 private:
524+ const LibertyCell* getLibertyCell (const Cell* cell) const ;
486525 void addDriverToCacheIfPresent (const Net* net, const Pin* drvr);
487526 void removeDriverFromCache (const Net* net);
488527 void removeDriverFromCache (const Net* net, const Pin* drvr);
0 commit comments