read_liberty: Set `area` `capacitance` attributes

This commit is contained in:
Martin Povišer 2024-10-16 11:42:47 +02:00
parent 3afb7725f1
commit c7e8d41600
2 changed files with 10 additions and 0 deletions

View File

@ -571,6 +571,10 @@ struct LibertyFrontend : public Frontend {
if (flag_wb)
module->set_bool_attribute(ID::whitebox);
const LibertyAst *area = cell->find("area");
if (area)
module->attributes[ID::area] = area->value;
for (auto &attr : attributes)
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)));
log_assert(wire);
const LibertyAst *capacitance = node->find("capacitance");
if (capacitance)
wire->attributes[ID::capacitance] = capacitance->value;
if (dir && dir->value == "inout") {
wire->port_input = true;
wire->port_output = true;

View File

@ -274,3 +274,5 @@ X(X)
X(xprop_decoder)
X(Y)
X(Y_WIDTH)
X(area)
X(capacitance)