write_timing_model ignore set_input_delay, set_input_delay, set_load
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
bbaecd8c97
commit
d163ccbf8e
|
|
@ -1140,7 +1140,7 @@ GraphDelayCalc1::netCaps(const Pin *drvr_pin,
|
|||
float &fanout,
|
||||
bool &has_set_load) const
|
||||
{
|
||||
MultiDrvrNet *multi_drvr = 0;
|
||||
MultiDrvrNet *multi_drvr = nullptr;
|
||||
if (graph_) {
|
||||
Vertex *drvr_vertex = graph_->pinDrvrVertex(drvr_pin);
|
||||
multi_drvr = multiDrvrNet(drvr_vertex);
|
||||
|
|
|
|||
BIN
doc/OpenSTA.odt
BIN
doc/OpenSTA.odt
Binary file not shown.
|
|
@ -545,6 +545,9 @@ public:
|
|||
Clock *clk,
|
||||
RiseFall *clk_rf,
|
||||
MinMaxAll *min_max);
|
||||
static void movePortDelays(Sdc *from,
|
||||
Sdc *to);
|
||||
|
||||
// Set port external pin load (set_load -pin_load port).
|
||||
void setPortExtPinCap(Port *port,
|
||||
const RiseFall *rf,
|
||||
|
|
@ -557,6 +560,8 @@ public:
|
|||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
float cap);
|
||||
static void movePortExtCaps(Sdc *from,
|
||||
Sdc *to);
|
||||
// Remove all "set_load" and "set_fanout_load" annotations.
|
||||
void removeLoadCaps();
|
||||
// Remove all "set_load net" annotations.
|
||||
|
|
|
|||
42
sdc/Sdc.cc
42
sdc/Sdc.cc
|
|
@ -2790,6 +2790,33 @@ Sdc::deleteInputDelay(InputDelay *input_delay)
|
|||
delete input_delay;
|
||||
}
|
||||
|
||||
void
|
||||
Sdc::movePortDelays(Sdc *from,
|
||||
Sdc *to)
|
||||
{
|
||||
to->input_delays_ = from->input_delays_;
|
||||
from->input_delays_.clear();
|
||||
to->input_delay_pin_map_ = from->input_delay_pin_map_;
|
||||
from->input_delay_pin_map_.clear();
|
||||
to->input_delay_index_ = from->input_delay_index_;
|
||||
from->input_delay_index_ = 0;
|
||||
to->input_delay_ref_pin_map_ = from->input_delay_ref_pin_map_;
|
||||
from->input_delay_ref_pin_map_.clear();
|
||||
to->input_delay_leaf_pin_map_ = from->input_delay_leaf_pin_map_;
|
||||
from->input_delay_leaf_pin_map_.clear();
|
||||
to->input_delay_internal_pin_map_ = from->input_delay_internal_pin_map_;
|
||||
from->input_delay_internal_pin_map_.clear();
|
||||
|
||||
to->output_delays_ = from->output_delays_;
|
||||
from->output_delays_.clear();
|
||||
to->output_delay_pin_map_ = from->output_delay_pin_map_;
|
||||
from->output_delay_pin_map_.clear();
|
||||
to->output_delay_ref_pin_map_ = from->output_delay_ref_pin_map_;
|
||||
from->output_delay_ref_pin_map_.clear();
|
||||
to->output_delay_leaf_pin_map_ = from->output_delay_leaf_pin_map_;
|
||||
from->output_delay_leaf_pin_map_.clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
|
|
@ -3382,6 +3409,21 @@ Sdc::ensurePortExtPinCap(Port *port)
|
|||
return port_cap;
|
||||
}
|
||||
|
||||
void
|
||||
Sdc::movePortExtCaps(Sdc *from,
|
||||
Sdc *to)
|
||||
{
|
||||
if (from->port_cap_map_) {
|
||||
to->port_cap_map_ = from->port_cap_map_;
|
||||
from->port_cap_map_ = nullptr;
|
||||
}
|
||||
|
||||
if (from->net_wire_cap_map_) {
|
||||
to->net_wire_cap_map_ = from->net_wire_cap_map_;
|
||||
from->net_wire_cap_map_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ MakeTimingModel::MakeTimingModel(const Corner *corner,
|
|||
corner_(corner),
|
||||
min_max_(MinMax::max()),
|
||||
lib_builder_(new LibertyBuilder),
|
||||
tbl_template_index_(1)
|
||||
tbl_template_index_(1),
|
||||
sdc_backup_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -66,16 +67,13 @@ MakeTimingModel::makeTimingModel(const char *lib_name,
|
|||
const char *cell_name,
|
||||
const char *filename)
|
||||
{
|
||||
saveSdc();
|
||||
|
||||
tbl_template_index_ = 1;
|
||||
makeLibrary(lib_name, filename);
|
||||
makeCell(cell_name, filename);
|
||||
makePorts();
|
||||
|
||||
for (Clock *clk : *sdc_->clocks()) {
|
||||
sta_->setPropagatedClock(clk);
|
||||
checkClock(clk);
|
||||
}
|
||||
|
||||
sta_->searchPreamble();
|
||||
graph_ = sta_->graph();
|
||||
|
||||
|
|
@ -83,9 +81,30 @@ MakeTimingModel::makeTimingModel(const char *lib_name,
|
|||
findClkedOutputPaths();
|
||||
|
||||
cell_->finish(false, report_, debug_);
|
||||
saveSdc();
|
||||
|
||||
return library_;
|
||||
}
|
||||
|
||||
// Move set_input_delay/set_output_delay/set_load's to the side.
|
||||
void
|
||||
MakeTimingModel::saveSdc()
|
||||
{
|
||||
sdc_backup_ = new Sdc(this);
|
||||
Sdc::movePortDelays(sdc_, sdc_backup_);
|
||||
Sdc::movePortExtCaps(sdc_, sdc_backup_);
|
||||
sta_->delaysInvalid();
|
||||
}
|
||||
|
||||
void
|
||||
MakeTimingModel::restoreSdc()
|
||||
{
|
||||
Sdc::movePortDelays(sdc_backup_, sdc_);
|
||||
Sdc::movePortExtCaps(sdc_backup_, sdc_);
|
||||
sta_->delaysInvalid();
|
||||
delete sdc_backup_;
|
||||
}
|
||||
|
||||
void
|
||||
MakeTimingModel::makeLibrary(const char *lib_name,
|
||||
const char *filename)
|
||||
|
|
@ -277,7 +296,7 @@ MakeTimingModel::findTimingFromInputs()
|
|||
sta_->setInputDelay(input_pin, input_rf1,
|
||||
sdc_->defaultArrivalClock(),
|
||||
sdc_->defaultArrivalClockEdge()->transition(),
|
||||
nullptr, false, false, MinMaxAll::all(), false, 0.0);
|
||||
nullptr, false, false, MinMaxAll::all(), true, 0.0);
|
||||
|
||||
PinSet *from_pins = new PinSet;
|
||||
from_pins->insert(input_pin);
|
||||
|
|
|
|||
|
|
@ -80,6 +80,9 @@ private:
|
|||
TableAxisPtr loadCapacitanceAxis(const TableModel *table);
|
||||
LibertyPort *modelPort(const Pin *pin);
|
||||
|
||||
void saveSdc();
|
||||
void restoreSdc();
|
||||
|
||||
Sta *sta_;
|
||||
LibertyLibrary *library_;
|
||||
LibertyCell *cell_;
|
||||
|
|
@ -87,6 +90,7 @@ private:
|
|||
MinMax *min_max_;
|
||||
LibertyBuilder *lib_builder_;
|
||||
int tbl_template_index_;
|
||||
Sdc *sdc_backup_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Reference in New Issue