mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #676 from rafaeltp/master
Splits SigSpec into bits before calling check_signal_in_fanout (solves #675)
This commit is contained in:
commit
47c89d600c
|
@ -297,15 +297,22 @@ struct EquivMakeWorker
|
||||||
SigSpec old_sig = assign_map(conn.second);
|
SigSpec old_sig = assign_map(conn.second);
|
||||||
SigSpec new_sig = rd_signal_map(old_sig);
|
SigSpec new_sig = rd_signal_map(old_sig);
|
||||||
|
|
||||||
visited_cells.clear();
|
|
||||||
if(old_sig != new_sig) {
|
if(old_sig != new_sig) {
|
||||||
if (check_signal_in_fanout(visited_cells, old_sig, new_sig))
|
SigSpec tmp_sig = old_sig;
|
||||||
|
for (int i = 0; i < GetSize(old_sig); i++) {
|
||||||
|
SigBit old_bit = old_sig[i], new_bit = new_sig[i];
|
||||||
|
|
||||||
|
visited_cells.clear();
|
||||||
|
if (check_signal_in_fanout(visited_cells, old_bit, new_bit))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
log("Changing input %s of cell %s (%s): %s -> %s\n",
|
log("Changing input %s of cell %s (%s): %s -> %s\n",
|
||||||
log_id(conn.first), log_id(c), log_id(c->type),
|
log_id(conn.first), log_id(c), log_id(c->type),
|
||||||
log_signal(old_sig), log_signal(new_sig));
|
log_signal(old_bit), log_signal(new_bit));
|
||||||
c->setPort(conn.first, new_sig);
|
|
||||||
|
tmp_sig[i] = new_bit;
|
||||||
|
}
|
||||||
|
c->setPort(conn.first, tmp_sig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue