mirror of https://github.com/YosysHQ/yosys.git
fix assignment of non-wires
This commit is contained in:
parent
c2caf85f7c
commit
85de9d26c1
|
@ -1500,8 +1500,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
for (int i = 0; i < GetSize(left); i++)
|
||||
if (left[i].wire) {
|
||||
std::map<RTLIL::SigSpec, RTLIL::Cell*>::iterator iter = wire_logic_map.find(left[i].wire);
|
||||
if (iter == wire_logic_map.end())
|
||||
{
|
||||
if (iter == wire_logic_map.end()) {
|
||||
new_left.append(left[i]);
|
||||
} else {
|
||||
RTLIL::Cell *reduce_cell = iter->second;
|
||||
|
@ -1578,6 +1577,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
if (child->children.size() > 0) {
|
||||
sig = child->children[0]->genRTLIL();
|
||||
for (int i = 0; i < GetSize(sig); i++) {
|
||||
if (sig[i].wire) {
|
||||
std::map<RTLIL::SigSpec, RTLIL::Cell*>::iterator iter = wire_logic_map.find(sig[i].wire);
|
||||
if (iter == wire_logic_map.end()) {
|
||||
new_sig.append(sig[i]);
|
||||
|
@ -1594,6 +1594,9 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
reduce_cell->fixup_parameters();
|
||||
new_sig.append(new_reduce_input);
|
||||
}
|
||||
} else {
|
||||
new_sig.append(sig[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (child->str.size() == 0) {
|
||||
|
|
Loading…
Reference in New Issue