Merge pull request #46 from akashlevy/master
Update Property.cc to support more property types in filter expressions
This commit is contained in:
commit
677c6dad2d
BIN
doc/OpenSTA.odt
BIN
doc/OpenSTA.odt
Binary file not shown.
BIN
doc/OpenSTA.pdf
BIN
doc/OpenSTA.pdf
Binary file not shown.
|
|
@ -889,6 +889,7 @@ getProperty(const Instance *inst,
|
|||
Sta *sta)
|
||||
{
|
||||
auto network = sta->cmdNetwork();
|
||||
LibertyCell *liberty_cell = network->libertyCell(inst);
|
||||
if (stringEqual(property, "name"))
|
||||
return PropertyValue(network->name(inst));
|
||||
else if (stringEqual(property, "full_name"))
|
||||
|
|
@ -899,6 +900,18 @@ getProperty(const Instance *inst,
|
|||
return PropertyValue(network->libertyCell(inst));
|
||||
else if (stringEqual(property, "cell"))
|
||||
return PropertyValue(network->cell(inst));
|
||||
else if (stringEqual(property, "is_hierarchical"))
|
||||
return PropertyValue(network->isHierarchical(inst));
|
||||
else if (stringEqual(property, "is_buffer"))
|
||||
return PropertyValue(liberty_cell && liberty_cell->isBuffer());
|
||||
else if (stringEqual(property, "is_clock_gate"))
|
||||
return PropertyValue(liberty_cell && liberty_cell->isClockGate());
|
||||
else if (stringEqual(property, "is_inverter"))
|
||||
return PropertyValue(liberty_cell && liberty_cell->isInverter());
|
||||
else if (stringEqual(property, "is_macro"))
|
||||
return PropertyValue(liberty_cell && liberty_cell->isMacro());
|
||||
else if (stringEqual(property, "is_memory_cell"))
|
||||
return PropertyValue(liberty_cell && liberty_cell->isMemory());
|
||||
else
|
||||
throw PropertyUnknown("instance", property);
|
||||
}
|
||||
|
|
@ -918,6 +931,10 @@ getProperty(const Pin *pin,
|
|||
return PropertyValue(network->pathName(pin));
|
||||
else if (stringEqual(property, "direction"))
|
||||
return PropertyValue(network->direction(pin)->name());
|
||||
else if (stringEqual(property, "is_hierarchical"))
|
||||
return PropertyValue(network->isHierarchical(pin));
|
||||
else if (stringEqual(property, "is_port"))
|
||||
return PropertyValue(network->isTopLevelPort(pin));
|
||||
else if (stringEqual(property, "is_register_clock")) {
|
||||
const LibertyPort *port = network->libertyPort(pin);
|
||||
return PropertyValue(port && port->isRegClk());
|
||||
|
|
@ -1163,10 +1180,12 @@ getProperty(Clock *clk,
|
|||
return PropertyValue(clk->period(), sta->units()->timeUnit());
|
||||
else if (stringEqual(property, "sources"))
|
||||
return PropertyValue(clk->pins());
|
||||
else if (stringEqual(property, "propagated"))
|
||||
return PropertyValue(clk->isPropagated());
|
||||
else if (stringEqual(property, "is_generated"))
|
||||
return PropertyValue(clk->isGenerated());
|
||||
else if (stringEqual(property, "is_virtual"))
|
||||
return PropertyValue(clk->isVirtual());
|
||||
else if (stringEqual(property, "is_propagated"))
|
||||
return PropertyValue(clk->isPropagated());
|
||||
else
|
||||
throw PropertyUnknown("clock", property);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue