diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-16 16:51:22 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-16 16:51:22 -0700 |
commit | 24c934f1af3859fe64ff4fb87a2a3de97695cde4 (patch) | |
tree | 131c64cee5a0cf09adc68b32f25e06a9da668ad0 /passes/techmap/attrmap.cc | |
parent | 1c9f3fadb9f60653fc9d1d7d72ba22033e077468 (diff) | |
parent | 5abe133323b2a6a46959f796c4730b2d70cdea26 (diff) | |
download | yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.tar.gz yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.tar.bz2 yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.zip |
Merge branch 'eddie/abc9_refactor' into xaig_dff
Diffstat (limited to 'passes/techmap/attrmap.cc')
-rw-r--r-- | passes/techmap/attrmap.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/passes/techmap/attrmap.cc b/passes/techmap/attrmap.cc index aa48e1125..a38638e0b 100644 --- a/passes/techmap/attrmap.cc +++ b/passes/techmap/attrmap.cc @@ -263,6 +263,25 @@ struct AttrmapPass : public Pass { for (auto cell : module->selected_cells()) attrmap_apply(stringf("%s.%s", log_id(module), log_id(cell)), actions, cell->attributes); + + for (auto proc : module->processes) + { + if (!design->selected(module, proc.second)) + continue; + attrmap_apply(stringf("%s.%s", log_id(module), log_id(proc.first)), actions, proc.second->attributes); + + std::vector<RTLIL::CaseRule*> all_cases = {&proc.second->root_case}; + while (!all_cases.empty()) { + RTLIL::CaseRule *cs = all_cases.back(); + all_cases.pop_back(); + attrmap_apply(stringf("%s.%s (case)", log_id(module), log_id(proc.first)), actions, cs->attributes); + + for (auto &sw : cs->switches) { + attrmap_apply(stringf("%s.%s (switch)", log_id(module), log_id(proc.first)), actions, sw->attributes); + all_cases.insert(all_cases.end(), sw->cases.begin(), sw->cases.end()); + } + } + } } } } |