Fixed RTLIL::SigSpec::append_bit() for appending constants
authorClifford Wolf <clifford@clifford.at>
Thu, 17 Jul 2014 10:10:57 +0000 (12:10 +0200)
committerClifford Wolf <clifford@clifford.at>
Thu, 17 Jul 2014 10:10:57 +0000 (12:10 +0200)
kernel/rtlil.cc

index c4c08d5b83cba8316f7e352c951f24ac1f3f11ae..c232dadd27684415f366693e7f331a31a0fdf80f 100644 (file)
@@ -1716,9 +1716,10 @@ void RTLIL::SigSpec::append_bit(const RTLIL::SigBit &bit)
                chunks.push_back(bit);
        else
                if (bit.wire == NULL)
-                       if (chunks.back().wire == NULL)
+                       if (chunks.back().wire == NULL) {
                                chunks.back().data.bits.push_back(bit.data);
-                       else
+                               chunks.back().width++;
+                       } else
                                chunks.push_back(bit);
                else
                        if (chunks.back().wire == bit.wire && chunks.back().offset + chunks.back().width == bit.offset)