mirror of
https://github.com/YosysHQ/yosys
synced 2026-02-16 22:01:46 +00:00
Merge pull request #4269 from povik/icells_not_derived
Avoid `module_not_derived` on internal cells in techmap result
This commit is contained in:
commit
09ceadfde7
3 changed files with 42 additions and 27 deletions
|
|
@ -2085,8 +2085,6 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
check_unique_id(current_module, id, this, "cell");
|
||||
RTLIL::Cell *cell = current_module->addCell(id, "");
|
||||
set_src_attr(cell, this);
|
||||
// Set attribute 'module_not_derived' which will be cleared again after the hierarchy pass
|
||||
cell->set_bool_attribute(ID::module_not_derived);
|
||||
|
||||
for (auto it = children.begin(); it != children.end(); it++) {
|
||||
auto* child = it->get();
|
||||
|
|
@ -2149,6 +2147,11 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
}
|
||||
log_abort();
|
||||
}
|
||||
|
||||
// Set attribute 'module_not_derived' which will be cleared again after the hierarchy pass
|
||||
if (cell->type.isPublic())
|
||||
cell->set_bool_attribute(ID::module_not_derived);
|
||||
|
||||
for (auto &attr : attributes) {
|
||||
if (attr.second->type != AST_CONSTANT)
|
||||
input_error("Attribute `%s' with non-constant value.\n", attr.first);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue