diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index 7086a33f1c1..996f6715d05 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -1722,8 +1722,7 @@ RTLIL::IdString AstModule::derive(RTLIL::Design *design, const dict ¶meters, bool /*mayfail*/) { - bool quiet = false; - log("quiet %d\n", quiet); + bool quiet = lib || attributes.count(ID::blackbox) || attributes.count(ID::whitebox); AstNode *new_ast = NULL; std::string modname = derive_common(design, parameters, &new_ast, quiet); diff --git a/kernel/cost.cc b/kernel/cost.cc index 7fe21b97b3b..2e383eeb02b 100644 --- a/kernel/cost.cc +++ b/kernel/cost.cc @@ -135,9 +135,8 @@ unsigned int port_width_sum(RTLIL::Cell *cell) unsigned int CellCosts::get(RTLIL::Cell *cell) { - // simple 1-bit cells if (gate_type_cost().count(cell->type)) - return 1; + return gate_type_cost().at(cell->type); if (design_ && design_->module(cell->type) && cell->parameters.empty()) { log_debug("%s is a module, recurse\n", cell->name.c_str());