mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-20 04:43:40 +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;
|
std::map<std::string, std::tuple<int, int, bool>> global_type_map;
|
||||||
parse_type_map(global_type_map, parser.ast);
|
parse_type_map(global_type_map, parser.ast);
|
||||||
|
|
||||||
|
string leakage_power_unit;
|
||||||
for (auto cell : parser.ast->children)
|
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)
|
if (cell->id != "cell" || cell->args.size() != 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -579,6 +583,7 @@ struct LibertyFrontend : public Frontend {
|
||||||
|
|
||||||
RTLIL::Module *module = new RTLIL::Module;
|
RTLIL::Module *module = new RTLIL::Module;
|
||||||
module->name = cell_name;
|
module->name = cell_name;
|
||||||
|
module->attributes["\\leakage_power_unit"] = leakage_power_unit;
|
||||||
|
|
||||||
if (flag_lib)
|
if (flag_lib)
|
||||||
module->set_bool_attribute(ID::blackbox);
|
module->set_bool_attribute(ID::blackbox);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue