3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-03 13:07:58 +00:00

Make rtlil.cc use SigSpecConstIterator instead of SigSpec::operator[] const

This commit is contained in:
Robert O'Callahan 2025-10-09 02:06:16 +00:00
parent adf34bb08e
commit acd3cae526

View file

@ -2972,11 +2972,14 @@ void RTLIL::Module::connect(const RTLIL::SigSig &conn)
// ignore all attempts to assign constants to other constants
if (conn.first.has_const()) {
RTLIL::SigSig new_conn;
for (int i = 0; i < GetSize(conn.first); i++)
if (conn.first[i].wire) {
new_conn.first.append(conn.first[i]);
new_conn.second.append(conn.second[i]);
RTLIL::SigSpecConstIterator second_it = conn.second.begin();
for (auto &first_bit : conn.first) {
if (first_bit.wire) {
new_conn.first.append(first_bit);
new_conn.second.append(*second_it);
}
++second_it;
}
if (GetSize(new_conn.first))
connect(new_conn);
return;