liberty ccs support

commit 8f90f9e7ba1eb29621faa3efed9154501c600537
Author: James Cherry <[email protected]>
Date:   Fri Feb 3 09:02:22 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 0bb6b07fd965dc948a63ed383ac05893af4cbd87
Author: James Cherry <[email protected]>
Date:   Thu Feb 2 08:07:17 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 408a19ae7750bdd41641ac6efebec0df565987bc
Author: James Cherry <[email protected]>
Date:   Wed Feb 1 16:55:03 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit a193adf0efdfa9c2a3b4272609e03f9279fc3479
Author: James Cherry <[email protected]>
Date:   Wed Feb 1 16:37:36 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit f26f47698ccd3a43d31f031f5cb6a70f0ffe1f91
Author: James Cherry <[email protected]>
Date:   Wed Feb 1 10:34:41 2023 -0700

    cleanup

    Signed-off-by: James Cherry <[email protected]>

commit 54613569fcb9d714b77833d54492b4dc8121a966
Author: James Cherry <[email protected]>
Date:   Wed Feb 1 10:18:20 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 4e34c391abc46e9e98d78725e139d739aff7fd44
Author: James Cherry <[email protected]>
Date:   Wed Feb 1 09:05:43 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 7b1e5af344948d84f82621d054efa206508a5cb8
Author: James Cherry <[email protected]>
Date:   Tue Jan 31 08:58:23 2023 -0700

    table report

    Signed-off-by: James Cherry <[email protected]>

commit 501a53715f27a1ada6477f29b2efdc96fbaec8be
Author: James Cherry <[email protected]>
Date:   Tue Jan 31 08:33:53 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit e68cd932db03724e1344259d79bd6397cca777d2
Author: James Cherry <[email protected]>
Date:   Mon Jan 30 11:47:01 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 1b279d3ae1e4a8fc156ee92999eab92e6a0a50ff
Author: James Cherry <[email protected]>
Date:   Sun Jan 29 13:56:05 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 43e039650373f9a9bb9e7b7cae6b48d7d2db455b
Author: James Cherry <[email protected]>
Date:   Sun Jan 29 11:54:08 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 648965c2433f4e7ed87371fced85e80d0198df10
Author: James Cherry <[email protected]>
Date:   Fri Jan 27 19:16:39 2023 -0700

    ccs

    Signed-off-by: James Cherry <[email protected]>

commit 02ac4e3e3f3f97308ff71a2f9984aa3aacb6e7ee
Author: James Cherry <[email protected]>
Date:   Tue Jan 24 09:40:22 2023 -0700

    ccs liberty

    Signed-off-by: James Cherry <[email protected]>

Signed-off-by: James Cherry <[email protected]>
This commit is contained in:
James Cherry
2023-02-08 09:23:24 -07:00
parent 72d63492dd
commit ab698d2549
11 changed files with 1104 additions and 496 deletions
+4 -1
View File
@@ -85,7 +85,7 @@ enum class DelayModelType { cmos_linear, cmos_pwl, cmos2, table, polynomial, dcm
enum class ScaleFactorPvt { process, volt, temp, unknown };
constexpr int scale_factor_pvt_count = int(ScaleFactorPvt::unknown) + 1;
enum class TableTemplateType { delay, power, output_current, ocv };
enum class TableTemplateType { delay, power, output_current, capacitance, ocv };
constexpr int table_template_type_count = int(TableTemplateType::ocv) + 1;
enum class LevelShifterType { HL, LH, HL_LH };
@@ -778,6 +778,8 @@ public:
void setRelatedGroundPin(const char *related_ground_pin);
const char *relatedPowerPin() const { return related_power_pin_; }
void setRelatedPowerPin(const char *related_power_pin);
ReceiverModelPtr receiverModel() const { return receiver_model_; }
void setReceiverModel(ReceiverModelPtr receiver_model);
static bool equiv(const LibertyPort *port1,
const LibertyPort *port2);
@@ -817,6 +819,7 @@ protected:
const char *related_ground_pin_;
const char *related_power_pin_;
Vector<LibertyPort*> corner_ports_;
ReceiverModelPtr receiver_model_;
unsigned int min_pulse_width_exists_:RiseFall::index_count;
bool min_period_exists_:1;
+2 -2
View File
@@ -57,6 +57,7 @@ class TimingRole;
class Transition;
class RiseFall;
class RiseFallBoth;
class ReceiverModel;
typedef Vector<LibertyLibrary*> LibertyLibrarySeq;
typedef Vector<LibertyCell*> LibertyCellSeq;
@@ -66,11 +67,10 @@ typedef Vector<LibertyPort*> LibertyPortSeq;
typedef Set<LibertyPort*> LibertyPortSet;
typedef std::pair<const LibertyPort*,const LibertyPort*> LibertyPortPair;
typedef Set<LibertyCell*> LibertyCellSet;
typedef Vector<float> FloatSeq;
typedef Vector<FloatSeq*> FloatTable;
typedef std::shared_ptr<Table> TablePtr;
typedef std::shared_ptr<TimingArcAttrs> TimingArcAttrsPtr;
typedef std::shared_ptr<TableAxis> TableAxisPtr;
typedef std::shared_ptr<ReceiverModel> ReceiverModelPtr;
enum class ScaleFactorType : unsigned {
pin_cap,
+101 -3
View File
@@ -33,6 +33,12 @@ class Unit;
class Units;
class Report;
class Table;
class OutputCurrent;
class OutputCurrentWaveform;
typedef Vector<float> FloatSeq;
typedef Vector<FloatSeq*> FloatTable;
typedef Vector<OutputCurrentWaveform*> OutputCurrentWaveformSeq;
TableAxisVariable
stringTableAxisVariable(const char *variable);
@@ -48,7 +54,9 @@ public:
GateTableModel(TableModel *delay_model,
TableModel *delay_sigma_models[EarlyLate::index_count],
TableModel *slew_model,
TableModel *slew_sigma_models[EarlyLate::index_count]);
TableModel *slew_sigma_models[EarlyLate::index_count],
ReceiverModelPtr receiver_model,
OutputCurrent *output_current);
virtual ~GateTableModel();
virtual void gateDelay(const LibertyCell *cell,
const Pvt *pvt,
@@ -118,6 +126,8 @@ protected:
TableModel *delay_sigma_models_[EarlyLate::index_count];
TableModel *slew_model_;
TableModel *slew_sigma_models_[EarlyLate::index_count];
ReceiverModelPtr receiver_model_;
OutputCurrent *output_current_;
};
class CheckTableModel : public CheckTimingModel
@@ -223,7 +233,8 @@ public:
const char *comment1,
float value2,
float value3,
int digits,
const Unit *table_unit,
int digits,
string *result) const;
void report(const Units *units,
Report *report) const;
@@ -246,7 +257,7 @@ protected:
bool is_scaled_:1;
};
// Abstract base class for tables.
// Abstract base class for 0, 1, 2, or 3 dimesnion float tables.
class Table
{
public:
@@ -280,6 +291,7 @@ public:
const char *comment1,
float value2,
float value3,
const Unit *table_unit,
int digits,
string *result) const = 0;
virtual void report(const Units *units,
@@ -306,6 +318,7 @@ public:
const char *comment1,
float value2,
float value3,
const Unit *table_unit,
int digits,
string *result) const;
virtual void report(const Units *units,
@@ -340,6 +353,7 @@ public:
const char *comment1,
float value2,
float value3,
const Unit *table_unit,
int digits,
string *result) const;
virtual void report(const Units *units,
@@ -370,6 +384,7 @@ public:
virtual float findValue(float value1,
float value2,
float value3) const;
FloatTable *values3() { return values_; }
virtual void reportValue(const char *result_name,
const LibertyLibrary *library,
const LibertyCell *cell,
@@ -378,6 +393,7 @@ public:
const char *comment1,
float value2,
float value3,
const Unit *table_unit,
int digits,
string *result) const;
virtual void report(const Units *units,
@@ -417,6 +433,7 @@ public:
const char *comment1,
float value2,
float value3,
const Unit *table_unit,
int digits,
string *result) const;
virtual void report(const Units *units,
@@ -434,10 +451,16 @@ public:
FloatSeq *values);
~TableAxis();
TableAxisVariable variable() const { return variable_; }
const char *variableString() const;
const Unit *unit(const Units *units);
size_t size() const { return values_->size(); }
float axisValue(size_t index) const { return (*values_)[index]; }
// Find the index for value such that axis[index] <= value < axis[index+1].
size_t findAxisIndex(float value) const;
void findAxisIndex(float value,
// Return values.
size_t &index,
bool &exists) const;
FloatSeq *values() const { return values_; }
private:
@@ -445,4 +468,79 @@ private:
FloatSeq *values_;
};
////////////////////////////////////////////////////////////////
class ReceiverModel
{
public:
ReceiverModel();
~ReceiverModel();
void setCapacitanceModel(TableModel *table_model,
int index,
RiseFall *rf);
static bool checkAxes(TablePtr table);
private:
TableModel *capacitance_models_[2][RiseFall::index_count];
};
class OutputCurrentWaveform
{
public:
OutputCurrentWaveform(float axis_value1,
float axis_value2,
TableAxisPtr axis,
Table1 *currents,
float reference_time);
~OutputCurrentWaveform();
float axisValue1() const { return axis_value1_; }
float axisValue2() const { return axis_value2_; }
TableAxisPtr axis() const { return axis_; }
Table1 *currents() const { return currents_; }
float referenceTime() const { return reference_time_; }
void reportWaveform(const Units *units,
int digits,
string *result);
static bool checkAxes(TableTemplate *tbl_template);
private:
float axis_value1_;
float axis_value2_;
TableAxisPtr axis_;
Table1 *currents_;
float reference_time_;
};
// Two dimensional table of one dimensional time/current tables.
class OutputCurrent
{
public:
OutputCurrent(TableAxisPtr axis1,
TableAxisPtr axis2,
Vector<OutputCurrentWaveform*> &waveforms);
~OutputCurrent();
void reportWaveform(const LibertyCell *cell,
const Pvt *pvt,
float in_slew,
float load_cap,
int digits,
string *result) const;
private:
void findAxisValues(float in_slew,
float load_cap,
// Return values.
float &axis_value1,
float &axis_value2) const;
float axisValue(TableAxisPtr axis,
float in_slew,
float load_cap) const;
// Row.
TableAxisPtr axis1_;
// Column.
TableAxisPtr axis2_;
OutputCurrentWaveformSeq waveforms_;
};
} // namespace
+2 -2
View File
@@ -24,7 +24,7 @@ namespace sta {
using std::string;
// Abstract base class for timing models.
// Abstract base class for GateTimingModel and CheckTimingModel.
class TimingModel
{
public:
@@ -36,7 +36,7 @@ protected:
friend class LibertyCell;
};
// Abstract base class for gate timing models.
// Abstract base class for LinearModel and TableModel.
class GateTimingModel : public TimingModel
{
public: