mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Add leakage power unit support
This commit is contained in:
parent
a55a4d461e
commit
8b93aa10cb
1 changed files with 5 additions and 0 deletions
|
@ -552,8 +552,12 @@ struct LibertyFrontend : public Frontend {
|
|||
std::map<std::string, std::tuple<int, int, bool>> 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue