@@ -43,7 +43,6 @@ class WriteTimingModel;
4343class LibertyCellIterator ;
4444class LibertyCellPortIterator ;
4545class LibertyCellPortBitIterator ;
46- class LibertyCellPgPortIterator ;
4746class LibertyPortMemberIterator ;
4847class ModeValueDef ;
4948class TestCell ;
@@ -56,7 +55,6 @@ class LibertyReader;
5655class OcvDerate ;
5756class TimingArcAttrs ;
5857class InternalPowerAttrs ;
59- class LibertyPgPort ;
6058class StaState ;
6159class Corner ;
6260class Corners ;
@@ -90,7 +88,6 @@ typedef Vector<LatchEnable*> LatchEnableSeq;
9088typedef Map<const char *, OcvDerate*, CharPtrLess> OcvDerateMap;
9189typedef Vector<InternalPowerAttrs*> InternalPowerAttrsSeq;
9290typedef Map<std::string, float > SupplyVoltageMap;
93- typedef Map<std::string, LibertyPgPort*> LibertyPgPortMap;
9491typedef Map<std::string, DriverWaveform*> DriverWaveformMap;
9592typedef Vector<DcalcAnalysisPt*> DcalcAnalysisPtSeq;
9693
@@ -100,6 +97,12 @@ enum class DelayModelType { cmos_linear, cmos_pwl, cmos2, table, polynomial, dcm
10097
10198enum class ScanSignalType { enable, enable_inverted, clock, clock_a, clock_b,
10299 input, input_inverted, output, output_inverted, none };
100+ enum class PwrGndType { none,
101+ primary_power, primary_ground,
102+ backup_power, backup_ground,
103+ internal_power, internal_ground,
104+ nwell, pwell,
105+ deepnwell, deeppwell};
103106
104107enum class ScaleFactorPvt { process, volt, temp, unknown };
105108constexpr int scale_factor_pvt_count = int (ScaleFactorPvt::unknown) + 1 ;
@@ -423,8 +426,6 @@ public:
423426 LibertyPort *findLibertyPort (const char *name) const ;
424427 LibertyPortSeq findLibertyPortsMatching (PatternMatch *pattern) const ;
425428 bool hasInternalPorts () const { return has_internal_ports_; }
426- LibertyPgPort *findPgPort (const char *name) const ;
427- size_t pgPortCount () const { return pg_port_map_.size (); }
428429 ScaleFactors *scaleFactors () const { return scale_factors_; }
429430 void setScaleFactors (ScaleFactors *scale_factors);
430431 ModeDef *makeModeDef (const char *name);
@@ -533,7 +534,6 @@ public:
533534 void setOcvArcDepth (float depth);
534535 void setOcvDerate (OcvDerate *derate);
535536 void addOcvDerate (OcvDerate *derate);
536- void addPgPort (LibertyPgPort *pg_port);
537537 void setTestCell (TestCell *test);
538538 void setHasInferedRegTimingArcs (bool infered);
539539 void setIsDisabledConstraint (bool is_disabled);
@@ -643,7 +643,6 @@ protected:
643643 Vector<LibertyCell*> corner_cells_;
644644 float leakage_power_;
645645 bool leakage_power_exists_;
646- LibertyPgPortMap pg_port_map_;
647646 bool has_internal_ports_;
648647 std::atomic<bool > have_voltage_waveforms_;
649648 std::mutex waveform_lock_;
@@ -653,7 +652,6 @@ protected:
653652private:
654653 friend class LibertyLibrary ;
655654 friend class LibertyCellPortIterator ;
656- friend class LibertyCellPgPortIterator ;
657655 friend class LibertyPort ;
658656 friend class LibertyBuilder ;
659657};
@@ -681,17 +679,6 @@ private:
681679 ConcreteCellPortBitIterator *iter_;
682680};
683681
684- class LibertyCellPgPortIterator : public Iterator <LibertyPgPort*>
685- {
686- public:
687- LibertyCellPgPortIterator (const LibertyCell *cell);
688- bool hasNext ();
689- LibertyPgPort *next ();
690-
691- private:
692- LibertyPgPortMap::Iterator iter_;
693- };
694-
695682// //////////////////////////////////////////////////////////////
696683
697684class LibertyPort : public ConcretePort
@@ -704,6 +691,16 @@ public:
704691 LibertyPort *bundlePort () const ;
705692 BusDcl *busDcl () const { return bus_dcl_; }
706693 void setDirection (PortDirection *dir);
694+
695+ // //////////////////////////////////////////////////////////////
696+ // pg_pin functions
697+ bool isPwrGnd () const ;
698+ PwrGndType pwrGndType () const { return pwr_gnd_type_; }
699+ void setPwrGndType (PwrGndType type);
700+ const char *voltageName () const { return voltage_name_.c_str (); }
701+ void setVoltageName (const char *voltage_name);
702+ // //////////////////////////////////////////////////////////////
703+
707704 ScanSignalType scanSignalType () const { return scan_signal_type_; }
708705 void setScanSignalType (ScanSignalType type);
709706 void fanoutLoad (// Return values.
@@ -887,8 +884,10 @@ protected:
887884
888885 LibertyCell *liberty_cell_;
889886 BusDcl *bus_dcl_;
890- FuncExpr *function_;
887+ PwrGndType pwr_gnd_type_;
888+ std::string voltage_name_;
891889 ScanSignalType scan_signal_type_;
890+ FuncExpr *function_;
892891 FuncExpr *tristate_enable_;
893892 ScaledPortMap *scaled_ports_;
894893 RiseFallMinMax capacitance_;
@@ -1136,37 +1135,13 @@ private:
11361135 TablePtr derate_[RiseFall::index_count][EarlyLate::index_count][path_type_count];
11371136};
11381137
1139- // Power/ground port.
1140- class LibertyPgPort
1141- {
1142- public:
1143- enum PgType { unknown,
1144- primary_power, primary_ground,
1145- backup_power, backup_ground,
1146- internal_power, internal_ground,
1147- nwell, pwell,
1148- deepnwell, deeppwell};
1149- LibertyPgPort (const char *name,
1150- LibertyCell *cell);
1151- const char *name () const { return name_.c_str (); }
1152- LibertyCell *cell () const { return cell_; }
1153- PgType pgType () const { return pg_type_; }
1154- void setPgType (PgType type);
1155- const char *voltageName () const { return voltage_name_.c_str (); }
1156- void setVoltageName (const char *voltage_name);
1157- static bool equiv (const LibertyPgPort *port1,
1158- const LibertyPgPort *port2);
1159-
1160- private:
1161- std::string name_;
1162- PgType pg_type_;
1163- std::string voltage_name_;
1164- LibertyCell *cell_;
1165- };
1166-
11671138std::string
11681139portLibertyToSta (const char *port_name);
11691140const char *
11701141scanSignalTypeName (ScanSignalType scan_type);
1142+ const char *
1143+ pwrGndTypeName (PwrGndType pwr_gnd_type);
1144+ PwrGndType
1145+ findPwrGndType (const char *pg_name);
11711146
11721147} // namespace
0 commit comments