max_slew/fanout/capacitance_check_slack in user units
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
f15c1b9d33
commit
bfb849d3d7
|
|
@ -26,6 +26,10 @@ public:
|
||||||
Unit(float scale,
|
Unit(float scale,
|
||||||
const char *suffix,
|
const char *suffix,
|
||||||
int digits);
|
int digits);
|
||||||
|
// Convert from sta units to user interface units.
|
||||||
|
double staToUser(double value);
|
||||||
|
// Convert from user interface units to sta units.
|
||||||
|
double userToSta(double value);
|
||||||
void operator=(const Unit &unit);
|
void operator=(const Unit &unit);
|
||||||
float scale() const { return scale_; }
|
float scale() const { return scale_; }
|
||||||
void setScale(float scale);
|
void setScale(float scale);
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,18 @@ Unit::operator=(const Unit &unit)
|
||||||
digits_ = unit.digits_;
|
digits_ = unit.digits_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double
|
||||||
|
Unit::staToUser(double value)
|
||||||
|
{
|
||||||
|
return value / scale_;
|
||||||
|
}
|
||||||
|
|
||||||
|
double
|
||||||
|
Unit::userToSta(double value)
|
||||||
|
{
|
||||||
|
return value * scale_;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Unit::setScale(float scale)
|
Unit::setScale(float scale)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ CheckFanoutLimits::checkFanout(const Pin *pin,
|
||||||
findLimit(pin, min_max, limit1, limit1_exists);
|
findLimit(pin, min_max, limit1, limit1_exists);
|
||||||
if (limit1_exists)
|
if (limit1_exists)
|
||||||
checkFanout(pin, min_max, limit1,
|
checkFanout(pin, min_max, limit1,
|
||||||
fanout, slack, limit);
|
fanout, limit, slack);
|
||||||
}
|
}
|
||||||
|
|
||||||
// return the tightest limit.
|
// return the tightest limit.
|
||||||
|
|
@ -184,8 +184,8 @@ CheckFanoutLimits::checkFanout(const Pin *pin,
|
||||||
float limit1,
|
float limit1,
|
||||||
// Return values.
|
// Return values.
|
||||||
float &fanout,
|
float &fanout,
|
||||||
float &slack,
|
float &limit,
|
||||||
float &limit) const
|
float &slack) const
|
||||||
{
|
{
|
||||||
float fanout1 = fanoutLoad(pin);
|
float fanout1 = fanoutLoad(pin);
|
||||||
float slack1 = (min_max == MinMax::max())
|
float slack1 = (min_max == MinMax::max())
|
||||||
|
|
|
||||||
|
|
@ -41,15 +41,15 @@ public:
|
||||||
PinSeq *checkFanoutLimits(Net *net,
|
PinSeq *checkFanoutLimits(Net *net,
|
||||||
bool violators,
|
bool violators,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
|
|
||||||
|
protected:
|
||||||
void checkFanout(const Pin *pin,
|
void checkFanout(const Pin *pin,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
float limit1,
|
float limit1,
|
||||||
// Return values.
|
// Return values.
|
||||||
float &fanout,
|
float &fanout,
|
||||||
float &slack,
|
float &limit,
|
||||||
float &limit) const;
|
float &slack) const;
|
||||||
|
|
||||||
protected:
|
|
||||||
void findLimit(const Pin *pin,
|
void findLimit(const Pin *pin,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// Return values.
|
||||||
|
|
|
||||||
|
|
@ -5277,7 +5277,7 @@ Sta::maxFanoutCheckSlack()
|
||||||
Pin *pin = (*pins)[0];
|
Pin *pin = (*pins)[0];
|
||||||
float fanout;
|
float fanout;
|
||||||
float limit;
|
float limit;
|
||||||
check_fanout_limits_->checkFanout(pin, MinMax::max(), true,
|
check_fanout_limits_->checkFanout(pin, MinMax::max(),
|
||||||
fanout, limit, slack);
|
fanout, limit, slack);
|
||||||
}
|
}
|
||||||
delete pins;
|
delete pins;
|
||||||
|
|
|
||||||
38
tcl/StaTcl.i
38
tcl/StaTcl.i
|
|
@ -3918,89 +3918,91 @@ format_area(const char *value,
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Unit converstion from sta unit to user interface and visa versa.
|
// <unit>_sta_ui conversion from sta units to user interface units.
|
||||||
|
// <unit>_ui_sta conversion from user interface units to sta units.
|
||||||
|
|
||||||
double
|
double
|
||||||
time_ui_sta(double value)
|
time_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->timeUnit()->scale();
|
return Sta::sta()->units()->timeUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
time_sta_ui(double value)
|
time_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->timeUnit()->scale();
|
return Sta::sta()->units()->timeUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
capacitance_ui_sta(double value)
|
capacitance_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->capacitanceUnit()->scale();
|
return Sta::sta()->units()->capacitanceUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
capacitance_sta_ui(double value)
|
capacitance_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->capacitanceUnit()->scale();
|
return Sta::sta()->units()->capacitanceUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
resistance_ui_sta(double value)
|
resistance_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->resistanceUnit()->scale();
|
return Sta::sta()->units()->resistanceUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
resistance_sta_ui(double value)
|
resistance_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->resistanceUnit()->scale();
|
return Sta::sta()->units()->resistanceUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
voltage_ui_sta(double value)
|
voltage_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->voltageUnit()->scale();
|
return Sta::sta()->units()->voltageUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
voltage_sta_ui(double value)
|
voltage_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->voltageUnit()->scale();
|
return Sta::sta()->units()->voltageUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
current_ui_sta(double value)
|
current_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->currentUnit()->scale();
|
return Sta::sta()->units()->currentUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
current_sta_ui(double value)
|
current_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->currentUnit()->scale();
|
return Sta::sta()->units()->currentUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
power_ui_sta(double value)
|
power_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->powerUnit()->scale();
|
return Sta::sta()->units()->powerUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
power_sta_ui(double value)
|
power_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->powerUnit()->scale();
|
return Sta::sta()->units()->powerUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
distance_ui_sta(double value)
|
distance_ui_sta(double value)
|
||||||
{
|
{
|
||||||
return value * Sta::sta()->units()->distanceUnit()->scale();
|
return Sta::sta()->units()->distanceUnit()->userToSta(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
distance_sta_ui(double value)
|
distance_sta_ui(double value)
|
||||||
{
|
{
|
||||||
return value / Sta::sta()->units()->distanceUnit()->scale();
|
return Sta::sta()->units()->distanceUnit()->staToUser(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
|
|
@ -4759,7 +4761,8 @@ float
|
||||||
max_slew_check_slack()
|
max_slew_check_slack()
|
||||||
{
|
{
|
||||||
cmdLinkedNetwork();
|
cmdLinkedNetwork();
|
||||||
return Sta::sta()->maxSlewCheckSlack();
|
Sta *sta = Sta::sta();
|
||||||
|
return sta->units()->timeUnit()->staToUser(sta->maxSlewCheckSlack());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -4852,7 +4855,8 @@ float
|
||||||
max_capacitance_check_slack()
|
max_capacitance_check_slack()
|
||||||
{
|
{
|
||||||
cmdLinkedNetwork();
|
cmdLinkedNetwork();
|
||||||
return Sta::sta()->maxCapacitanceCheckSlack();
|
Sta *sta = Sta::sta();
|
||||||
|
return sta->units()->capacitanceUnit()->staToUser(sta->maxCapacitanceCheckSlack());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue