yosys-smtbmc: Fix reused loop variable.
authorMarcelina Kościelnicka <mwk@0x04.net>
Fri, 10 Sep 2021 02:55:48 +0000 (04:55 +0200)
committerMarcelina Kościelnicka <mwk@0x04.net>
Fri, 10 Sep 2021 11:34:58 +0000 (13:34 +0200)
Fixes #2999.

backends/smt2/smtbmc.py

index be27a3d097ce5166544cbb925ef016e4abe3b7e9..e5cfcdc08a4cbdeb4c6356622f53b8ed955530a2 100644 (file)
@@ -771,12 +771,12 @@ def write_vcd_trace(steps_start, steps_stop, index):
 
                         if gotread:
                             buf = data[:]
-                            for i in reversed(range(len(tdata))):
+                            for ii in reversed(range(len(tdata))):
                                 for k in range(width):
-                                    if tdata[i][k] == "x":
-                                        tdata[i][k] = buf[k]
+                                    if tdata[ii][k] == "x":
+                                        tdata[ii][k] = buf[k]
                                     else:
-                                        buf[k] = tdata[i][k]
+                                        buf[k] = tdata[ii][k]
 
                     if not asyncwr:
                         tdata.append(data[:])