mirror of
https://github.com/YosysHQ/yosys
synced 2026-08-14 09:55:37 +00:00
rtlil: register a cloned cell's ports with the signorm index
This commit is contained in:
parent
a8cec7da30
commit
ade8932468
1 changed files with 9 additions and 6 deletions
|
|
@ -3819,14 +3819,17 @@ RTLIL::Cell *RTLIL::Module::addCell(TwineRef name, const RTLIL::Cell *other)
|
|||
type = this->design->twines.copy_from(src_design->twines, other->type_impl);
|
||||
|
||||
RTLIL::Cell *cell = addCell(name, type);
|
||||
if (cross_pool) {
|
||||
for (auto &c : other->connections_)
|
||||
cell->connections_[this->design->twines.copy_from(src_design->twines, c.first)] = c.second;
|
||||
} else {
|
||||
cell->connections_ = other->connections_;
|
||||
}
|
||||
cell->parameters = other->parameters;
|
||||
cell->attributes = other->attributes;
|
||||
|
||||
bool indexed = signorm_indexed();
|
||||
for (auto &c : other->connections_) {
|
||||
TwineRef port = cross_pool ? this->design->twines.copy_from(src_design->twines, c.first) : c.first;
|
||||
if (indexed)
|
||||
cell->setPort(port, c.second);
|
||||
else
|
||||
cell->connections_[port] = c.second;
|
||||
}
|
||||
if (src_design && this->design)
|
||||
copy_src_into(other, src_design, cell, this->design);
|
||||
return cell;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue