write_sdc crash after delete instance resolves #248
commit 3b7eba13dcfc90dc8f8b0b6c3959c9253c302eae
Author: James Cherry <cherry@parallaxsw.com>
Date: Thu May 29 14:05:39 2025 -0700
write_sdc crash after delete instance resolves #248
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
79c90c3c70
commit
0b59461bdd
|
|
@ -119,6 +119,9 @@ public:
|
||||||
ExceptionThruSeq *thrus,
|
ExceptionThruSeq *thrus,
|
||||||
ExceptionTo *to,
|
ExceptionTo *to,
|
||||||
bool own_pts) = 0;
|
bool own_pts) = 0;
|
||||||
|
void deleteInstance(const Instance *inst,
|
||||||
|
const Network *network);
|
||||||
|
|
||||||
// Default handlers.
|
// Default handlers.
|
||||||
virtual bool useEndClk() const { return false; }
|
virtual bool useEndClk() const { return false; }
|
||||||
virtual int pathMultiplier() const { return 0; }
|
virtual int pathMultiplier() const { return 0; }
|
||||||
|
|
@ -414,14 +417,14 @@ public:
|
||||||
Network *) {}
|
Network *) {}
|
||||||
virtual void disconnectPinBefore(const Pin *,
|
virtual void disconnectPinBefore(const Pin *,
|
||||||
Network *) {}
|
Network *) {}
|
||||||
|
void deleteInstance(const Instance *inst,
|
||||||
|
const Network *network);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void findHash(const Network *network);
|
virtual void findHash(const Network *network);
|
||||||
|
|
||||||
void deletePin(const Pin *pin,
|
void deletePin(const Pin *pin,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
void deleteInstance(const Instance *inst,
|
|
||||||
const Network *network);
|
|
||||||
virtual const char *cmdKeyword() const = 0;
|
virtual const char *cmdKeyword() const = 0;
|
||||||
|
|
||||||
PinSet *pins_;
|
PinSet *pins_;
|
||||||
|
|
@ -536,6 +539,8 @@ public:
|
||||||
Network *network);
|
Network *network);
|
||||||
virtual void disconnectPinBefore(const Pin *pin,
|
virtual void disconnectPinBefore(const Pin *pin,
|
||||||
Network *network);
|
Network *network);
|
||||||
|
void deleteInstance(const Instance *inst,
|
||||||
|
const Network *network);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void findHash(const Network *network);
|
void findHash(const Network *network);
|
||||||
|
|
@ -553,8 +558,6 @@ protected:
|
||||||
void deleteEdge(const EdgePins &edge);
|
void deleteEdge(const EdgePins &edge);
|
||||||
void deleteNet(const Net *net,
|
void deleteNet(const Net *net,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
void deleteInstance(const Instance *inst,
|
|
||||||
const Network *network);
|
|
||||||
void makeAllEdges(const Network *network);
|
void makeAllEdges(const Network *network);
|
||||||
void makePinEdges(const Network *network);
|
void makePinEdges(const Network *network);
|
||||||
void makeNetEdges(const Network *network);
|
void makeNetEdges(const Network *network);
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,7 @@ public:
|
||||||
// Build data structures for search.
|
// Build data structures for search.
|
||||||
void searchPreamble();
|
void searchPreamble();
|
||||||
void deleteNetBefore(const Net *net);
|
void deleteNetBefore(const Net *net);
|
||||||
|
void deleteInstanceBefore(const Instance *inst);
|
||||||
|
|
||||||
// SWIG sdc interface.
|
// SWIG sdc interface.
|
||||||
PortSeq allInputs(bool no_clks);
|
PortSeq allInputs(bool no_clks);
|
||||||
|
|
|
||||||
|
|
@ -458,6 +458,20 @@ thrusIntersectPts(ExceptionThruSeq *thrus1,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExceptionPath::deleteInstance(const Instance *inst,
|
||||||
|
const Network *network)
|
||||||
|
{
|
||||||
|
if (from_)
|
||||||
|
from_->deleteInstance(inst, network);
|
||||||
|
if (thrus_) {
|
||||||
|
for (ExceptionThru *thru : *thrus_)
|
||||||
|
thru->deleteInstance(inst, network);
|
||||||
|
}
|
||||||
|
if (to_)
|
||||||
|
to_->deleteInstance(inst, network);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
PathDelay::PathDelay(ExceptionFrom *from,
|
PathDelay::PathDelay(ExceptionFrom *from,
|
||||||
|
|
|
||||||
19
sdc/Sdc.cc
19
sdc/Sdc.cc
|
|
@ -363,6 +363,25 @@ Sdc::deleteNetBefore(const Net *net)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// see Sdc::isConstrained
|
||||||
|
void
|
||||||
|
Sdc::deleteInstanceBefore(const Instance *inst)
|
||||||
|
{
|
||||||
|
instance_pvt_maps_[MinMax::minIndex()].erase(inst);
|
||||||
|
instance_pvt_maps_[MinMax::maxIndex()].erase(inst);
|
||||||
|
inst_derating_factors_.erase(inst);
|
||||||
|
inst_clk_gating_check_map_.erase(inst);
|
||||||
|
disabled_inst_ports_.erase(inst);
|
||||||
|
inst_latch_borrow_limit_map_.erase(inst);
|
||||||
|
inst_min_pulse_width_map_.erase(inst);
|
||||||
|
|
||||||
|
for (ExceptionPath *exception : exceptions_)
|
||||||
|
exception->deleteInstance(inst, network_);
|
||||||
|
first_from_inst_exceptions_.erase(inst);
|
||||||
|
first_thru_inst_exceptions_.erase(inst);
|
||||||
|
first_to_inst_exceptions_.erase(inst);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Sdc::makeCornersBefore()
|
Sdc::makeCornersBefore()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4579,6 +4579,7 @@ void
|
||||||
Sta::deleteLeafInstanceBefore(const Instance *inst)
|
Sta::deleteLeafInstanceBefore(const Instance *inst)
|
||||||
{
|
{
|
||||||
sim_->deleteInstanceBefore(inst);
|
sim_->deleteInstanceBefore(inst);
|
||||||
|
sdc_->deleteInstanceBefore(inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue