mirror of https://github.com/YosysHQ/yosys.git
read_liberty: Set `area` `capacitance` attributes
This commit is contained in:
parent
3afb7725f1
commit
c7e8d41600
|
@ -571,6 +571,10 @@ struct LibertyFrontend : public Frontend {
|
||||||
if (flag_wb)
|
if (flag_wb)
|
||||||
module->set_bool_attribute(ID::whitebox);
|
module->set_bool_attribute(ID::whitebox);
|
||||||
|
|
||||||
|
const LibertyAst *area = cell->find("area");
|
||||||
|
if (area)
|
||||||
|
module->attributes[ID::area] = area->value;
|
||||||
|
|
||||||
for (auto &attr : attributes)
|
for (auto &attr : attributes)
|
||||||
module->attributes[attr] = 1;
|
module->attributes[attr] = 1;
|
||||||
|
|
||||||
|
@ -662,6 +666,10 @@ struct LibertyFrontend : public Frontend {
|
||||||
RTLIL::Wire *wire = module->wires_.at(RTLIL::escape_id(node->args.at(0)));
|
RTLIL::Wire *wire = module->wires_.at(RTLIL::escape_id(node->args.at(0)));
|
||||||
log_assert(wire);
|
log_assert(wire);
|
||||||
|
|
||||||
|
const LibertyAst *capacitance = node->find("capacitance");
|
||||||
|
if (capacitance)
|
||||||
|
wire->attributes[ID::capacitance] = capacitance->value;
|
||||||
|
|
||||||
if (dir && dir->value == "inout") {
|
if (dir && dir->value == "inout") {
|
||||||
wire->port_input = true;
|
wire->port_input = true;
|
||||||
wire->port_output = true;
|
wire->port_output = true;
|
||||||
|
|
|
@ -274,3 +274,5 @@ X(X)
|
||||||
X(xprop_decoder)
|
X(xprop_decoder)
|
||||||
X(Y)
|
X(Y)
|
||||||
X(Y_WIDTH)
|
X(Y_WIDTH)
|
||||||
|
X(area)
|
||||||
|
X(capacitance)
|
||||||
|
|
Loading…
Reference in New Issue