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,
|
||||
const char *suffix,
|
||||
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);
|
||||
float scale() const { return scale_; }
|
||||
void setScale(float scale);
|
||||
|
|
|
|||
|
|
@ -58,6 +58,18 @@ Unit::operator=(const Unit &unit)
|
|||
digits_ = unit.digits_;
|
||||
}
|
||||
|
||||
double
|
||||
Unit::staToUser(double value)
|
||||
{
|
||||
return value / scale_;
|
||||
}
|
||||
|
||||
double
|
||||
Unit::userToSta(double value)
|
||||
{
|
||||
return value * scale_;
|
||||
}
|
||||
|
||||
void
|
||||
Unit::setScale(float scale)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ CheckFanoutLimits::checkFanout(const Pin *pin,
|
|||
findLimit(pin, min_max, limit1, limit1_exists);
|
||||
if (limit1_exists)
|
||||
checkFanout(pin, min_max, limit1,
|
||||
fanout, slack, limit);
|
||||
fanout, limit, slack);
|
||||
}
|
||||
|
||||
// return the tightest limit.
|
||||
|
|
@ -184,8 +184,8 @@ CheckFanoutLimits::checkFanout(const Pin *pin,
|
|||
float limit1,
|
||||
// Return values.
|
||||
float &fanout,
|
||||
float &slack,
|
||||
float &limit) const
|
||||
float &limit,
|
||||
float &slack) const
|
||||
{
|
||||
float fanout1 = fanoutLoad(pin);
|
||||
float slack1 = (min_max == MinMax::max())
|
||||
|
|
|
|||
|
|
@ -41,15 +41,15 @@ public:
|
|||
PinSeq *checkFanoutLimits(Net *net,
|
||||
bool violators,
|
||||
const MinMax *min_max);
|
||||
|
||||
protected:
|
||||
void checkFanout(const Pin *pin,
|
||||
const MinMax *min_max,
|
||||
float limit1,
|
||||
// Return values.
|
||||
float &fanout,
|
||||
float &slack,
|
||||
float &limit) const;
|
||||
|
||||
protected:
|
||||
float &limit,
|
||||
float &slack) const;
|
||||
void findLimit(const Pin *pin,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
|
|
|
|||
|
|
@ -5277,7 +5277,7 @@ Sta::maxFanoutCheckSlack()
|
|||
Pin *pin = (*pins)[0];
|
||||
float fanout;
|
||||
float limit;
|
||||
check_fanout_limits_->checkFanout(pin, MinMax::max(), true,
|
||||
check_fanout_limits_->checkFanout(pin, MinMax::max(),
|
||||
fanout, limit, slack);
|
||||
}
|
||||
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
|
||||
time_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->timeUnit()->scale();
|
||||
return Sta::sta()->units()->timeUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
time_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->timeUnit()->scale();
|
||||
return Sta::sta()->units()->timeUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
capacitance_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->capacitanceUnit()->scale();
|
||||
return Sta::sta()->units()->capacitanceUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
capacitance_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->capacitanceUnit()->scale();
|
||||
return Sta::sta()->units()->capacitanceUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
resistance_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->resistanceUnit()->scale();
|
||||
return Sta::sta()->units()->resistanceUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
resistance_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->resistanceUnit()->scale();
|
||||
return Sta::sta()->units()->resistanceUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
voltage_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->voltageUnit()->scale();
|
||||
return Sta::sta()->units()->voltageUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
voltage_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->voltageUnit()->scale();
|
||||
return Sta::sta()->units()->voltageUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
current_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->currentUnit()->scale();
|
||||
return Sta::sta()->units()->currentUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
current_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->currentUnit()->scale();
|
||||
return Sta::sta()->units()->currentUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
power_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->powerUnit()->scale();
|
||||
return Sta::sta()->units()->powerUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
power_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->powerUnit()->scale();
|
||||
return Sta::sta()->units()->powerUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
distance_ui_sta(double value)
|
||||
{
|
||||
return value * Sta::sta()->units()->distanceUnit()->scale();
|
||||
return Sta::sta()->units()->distanceUnit()->userToSta(value);
|
||||
}
|
||||
|
||||
double
|
||||
distance_sta_ui(double value)
|
||||
{
|
||||
return value / Sta::sta()->units()->distanceUnit()->scale();
|
||||
return Sta::sta()->units()->distanceUnit()->staToUser(value);
|
||||
}
|
||||
|
||||
double
|
||||
|
|
@ -4759,7 +4761,8 @@ float
|
|||
max_slew_check_slack()
|
||||
{
|
||||
cmdLinkedNetwork();
|
||||
return Sta::sta()->maxSlewCheckSlack();
|
||||
Sta *sta = Sta::sta();
|
||||
return sta->units()->timeUnit()->staToUser(sta->maxSlewCheckSlack());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -4852,7 +4855,8 @@ float
|
|||
max_capacitance_check_slack()
|
||||
{
|
||||
cmdLinkedNetwork();
|
||||
return Sta::sta()->maxCapacitanceCheckSlack();
|
||||
Sta *sta = Sta::sta();
|
||||
return sta->units()->capacitanceUnit()->staToUser(sta->maxCapacitanceCheckSlack());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in New Issue