From 8b93aa10cbd66c57acbe3ffa76abdbb0500b3c3a Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Wed, 29 May 2024 23:43:47 -0700 Subject: [PATCH] Add leakage power unit support --- frontends/liberty/liberty.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontends/liberty/liberty.cc b/frontends/liberty/liberty.cc index a8d437b75..226652e4f 100644 --- a/frontends/liberty/liberty.cc +++ b/frontends/liberty/liberty.cc @@ -552,8 +552,12 @@ struct LibertyFrontend : public Frontend { std::map> global_type_map; parse_type_map(global_type_map, parser.ast); + string leakage_power_unit; for (auto cell : parser.ast->children) { + if (cell->id == "leakage_power_unit") + leakage_power_unit = cell->value; + if (cell->id != "cell" || cell->args.size() != 1) continue; @@ -579,6 +583,7 @@ struct LibertyFrontend : public Frontend { RTLIL::Module *module = new RTLIL::Module; module->name = cell_name; + module->attributes["\\leakage_power_unit"] = leakage_power_unit; if (flag_lib) module->set_bool_attribute(ID::blackbox);