updates for resizer
This commit is contained in:
parent
3179c5a343
commit
6934b4ebcd
|
|
@ -1029,17 +1029,21 @@ LibertyCell::setClockGateType(ClockGateType type)
|
|||
bool
|
||||
LibertyCell::isBuffer() const
|
||||
{
|
||||
if (ports_.size() == 2) {
|
||||
LibertyPort *port1 = static_cast<LibertyPort*>(ports_[0]);
|
||||
LibertyPort *port2 = static_cast<LibertyPort*>(ports_[1]);
|
||||
return (port1->direction()->isInput()
|
||||
&& port2->direction()->isOutput()
|
||||
&& hasBufferFunc(port1, port2))
|
||||
|| (port2->direction()->isInput()
|
||||
&& port1->direction()->isOutput()
|
||||
&& hasBufferFunc(port2, port1));
|
||||
int input_count = 0;
|
||||
int output_count = 0;
|
||||
for (ConcretePort *cport : ports_) {
|
||||
LibertyPort *port = static_cast<LibertyPort*>(cport);
|
||||
PortDirection *dir = port->direction();
|
||||
if (dir->isInput())
|
||||
input_count++;
|
||||
else if (dir->isOutput())
|
||||
output_count++;
|
||||
else if (!dir->isPowerGround())
|
||||
return false;
|
||||
if (input_count > 1 || output_count > 1)
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
return input_count == 1 && output_count == 1;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -1057,17 +1061,18 @@ LibertyCell::bufferPorts(// Return values.
|
|||
LibertyPort *&input,
|
||||
LibertyPort *&output)
|
||||
{
|
||||
LibertyPort *port1 = static_cast<LibertyPort*>(ports_[0]);
|
||||
LibertyPort *port2 = static_cast<LibertyPort*>(ports_[1]);
|
||||
if (port1->direction()->isInput()
|
||||
&& port2->direction()->isOutput()) {
|
||||
input = port1;
|
||||
output = port2;
|
||||
}
|
||||
else {
|
||||
input = port2;
|
||||
output = port1;
|
||||
}
|
||||
input = nullptr;
|
||||
output = nullptr;
|
||||
for (ConcretePort *cport : ports_) {
|
||||
LibertyPort *port = static_cast<LibertyPort*>(cport);
|
||||
PortDirection *dir = port->direction();
|
||||
if (dir->isInput())
|
||||
input = port;
|
||||
else if (dir->isOutput())
|
||||
output = port;
|
||||
if (input && output)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
|
|
|||
|
|
@ -1077,7 +1077,7 @@ LeafInstanceIterator1::LeafInstanceIterator1(const Instance *inst,
|
|||
child_iter_(network->childIterator(inst)),
|
||||
next_(nullptr)
|
||||
{
|
||||
pending_child_iters_.reserve(512);
|
||||
pending_child_iters_.reserve(8);
|
||||
nextInst();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -579,9 +579,9 @@ Sim::propagateToInvalidLoads()
|
|||
while (load_iter.hasNext()) {
|
||||
Pin *load_pin = load_iter.next();
|
||||
Net *net = network_->net(load_pin);
|
||||
if (network_->isGround(net))
|
||||
if (net && network_->isGround(net))
|
||||
setPinValue(load_pin, LogicValue::zero, true);
|
||||
else if (network_->isPower(net))
|
||||
else if (net && network_->isPower(net))
|
||||
setPinValue(load_pin, LogicValue::one, true);
|
||||
else {
|
||||
Pin *drvr_pin = findDrvrPin(load_pin, network_);
|
||||
|
|
@ -701,9 +701,14 @@ Sim::connectPinAfter(Pin *pin)
|
|||
void
|
||||
Sim::disconnectPinBefore(Pin *pin)
|
||||
{
|
||||
if (incremental_
|
||||
&& network_->isLoad(pin))
|
||||
removePropagatedValue(pin);
|
||||
if (incremental_) {
|
||||
if (network_->isLoad(pin)) {
|
||||
invalid_load_pins_.insert(pin);
|
||||
removePropagatedValue(pin);
|
||||
}
|
||||
if (network_->isDriver(pin))
|
||||
invalid_drvr_pins_.insert(pin);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in New Issue