summaryrefslogtreecommitdiff
path: root/passes/hierarchy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-10-24 11:37:54 +0200
committerClifford Wolf <clifford@clifford.at>2013-10-24 11:37:54 +0200
commite679a5d04633e0c0626057ed2760ddb9595eea5d (patch)
treecce75cbef78ff294cc26a992347fe16b713db996 /passes/hierarchy
parente9dede01ca8834ea3c211862a5d6c0119b2b578a (diff)
Fixed handling of boolean attributes (passes)
Diffstat (limited to 'passes/hierarchy')
-rw-r--r--passes/hierarchy/hierarchy.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc
index e10ea4cf..7d712d5e 100644
--- a/passes/hierarchy/hierarchy.cc
+++ b/passes/hierarchy/hierarchy.cc
@@ -113,7 +113,7 @@ static void generate(RTLIL::Design *design, const std::vector<std::string> &cell
RTLIL::Module *mod = new RTLIL::Module;
mod->name = celltype;
- mod->attributes["\\placeholder"] = RTLIL::Const(0, 0);
+ mod->attributes["\\placeholder"] = RTLIL::Const(1);
design->modules[mod->name] = mod;
for (auto &decl : ports) {
@@ -147,7 +147,7 @@ static bool expand_module(RTLIL::Design *design, RTLIL::Module *module, bool fla
}
if (cell->parameters.size() == 0)
continue;
- if (design->modules.at(cell->type)->attributes.count("\\placeholder") > 0)
+ if (design->modules.at(cell->type)->get_bool_attribute("\\placeholder"))
continue;
RTLIL::Module *mod = design->modules[cell->type];
cell->type = mod->derive(design, cell->parameters);