mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Fix incorrect "incompatible re-declaration of wire" error in tasks/functions
This commit is contained in:
parent
4e80ce97a8
commit
4fb8007171
|
@ -2183,9 +2183,16 @@ skip_dynamic_range_lvalue_expansion:;
|
||||||
if (wire->children.empty()) {
|
if (wire->children.empty()) {
|
||||||
for (auto c : child->children)
|
for (auto c : child->children)
|
||||||
wire->children.push_back(c->clone());
|
wire->children.push_back(c->clone());
|
||||||
} else {
|
} else if (!child->children.empty()) {
|
||||||
if (!child->children.empty())
|
while (child->simplify(true, false, false, stage, -1, false, false)) { }
|
||||||
|
if (GetSize(child->children) == GetSize(wire->children)) {
|
||||||
|
for (int i = 0; i < GetSize(child->children); i++)
|
||||||
|
if (*child->children.at(i) != *wire->children.at(i))
|
||||||
|
goto tcall_incompatible_wires;
|
||||||
|
} else {
|
||||||
|
tcall_incompatible_wires:
|
||||||
log_error("Incompatible re-declaration of wire %s at %s:%d.\n", child->str.c_str(), filename.c_str(), linenum);
|
log_error("Incompatible re-declaration of wire %s at %s:%d.\n", child->str.c_str(), filename.c_str(), linenum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue