diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index eda7c2f6c3b..64de3a1cac0 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -337,8 +337,10 @@ struct TechmapWorker if (c->type.begins_with("\\$")) c->type = c->type.substr(1); - if (c->type == ID::_TECHMAP_PLACEHOLDER_ && tpl_cell->has_attribute(ID::techmap_chtype)) + if (c->type == ID::_TECHMAP_PLACEHOLDER_ && tpl_cell->has_attribute(ID::techmap_chtype)) { c->type = RTLIL::escape_id(tpl_cell->get_string_attribute(ID::techmap_chtype)); + c->attributes.erase(ID::techmap_chtype); + } vector autopurge_ports;