diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-17 08:58:51 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-17 08:58:51 +0200 |
commit | 64a6906cc448b90777591006786e8bb3a85d2c49 (patch) | |
tree | 1492899bff5a8bb2899239f5440216b6bb7fa1a4 /passes/techmap/techmap.cc | |
parent | b171a4c1bce1146c890f8238a723a277c8dc2efb (diff) | |
download | yosys-64a6906cc448b90777591006786e8bb3a85d2c49.tar.gz yosys-64a6906cc448b90777591006786e8bb3a85d2c49.tar.bz2 yosys-64a6906cc448b90777591006786e8bb3a85d2c49.zip |
Added support for "blackbox" attribute to flatten/techmap
Diffstat (limited to 'passes/techmap/techmap.cc')
-rw-r--r-- | passes/techmap/techmap.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index 4c5a0febc..cb36c9e1f 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -243,6 +243,9 @@ struct TechmapWorker RTLIL::Module *tpl = map->modules[tpl_name]; std::map<RTLIL::IdString, RTLIL::Const> parameters = cell->parameters; + if (tpl->get_bool_attribute("\\blackbox")) + continue; + if (!flatten_mode) { if (tpl->get_bool_attribute("\\techmap_simplemap")) { @@ -686,7 +689,7 @@ struct FlattenPass : public Pass { if (top_mod != NULL) { std::map<RTLIL::IdString, RTLIL::Module*> new_modules; for (auto &mod_it : design->modules) - if (mod_it.second == top_mod) { + if (mod_it.second == top_mod || mod_it.second->get_bool_attribute("\\blackbox")) { new_modules[mod_it.first] = mod_it.second; } else { log("Deleting now unused module %s.\n", RTLIL::id2cstr(mod_it.first)); |