Fixed test_autotb for modules with many cell ports
authorClifford Wolf <clifford@clifford.at>
Mon, 25 Apr 2016 14:37:11 +0000 (16:37 +0200)
committerClifford Wolf <clifford@clifford.at>
Mon, 25 Apr 2016 14:37:11 +0000 (16:37 +0200)
passes/tests/test_autotb.cc

index f42a58af53edb8d588f399f8ad7d1343403f5a30..7e6804fc2d68e4525c6ac8689346974d8fccffa1 100644 (file)
@@ -218,7 +218,8 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter)
                                if (len > 0)
                                        header2 += shorthand, len--;
                                header1.push_back("    " + it->first);
-                               header1.back()[0] = shorthand++;
+                               header1.back()[0] = shorthand;
+                               shorthand = shorthand == 'Z' ? 'A' : shorthand+1;
                        }
                else {
                        f << stringf(" 1'bx");
@@ -237,7 +238,8 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter)
                                if (len > 0)
                                        header2 += shorthand, len--;
                                header1.push_back("    " + it->first);
-                               header1.back()[0] = shorthand++;
+                               header1.back()[0] = shorthand;
+                               shorthand = shorthand == 'Z' ? 'A' : shorthand+1;
                        }
                } else {
                        f << stringf(" 1'bx");
@@ -256,7 +258,8 @@ static void autotest(std::ostream &f, RTLIL::Design *design, int num_iter)
                                if (len > 0)
                                        header2 += shorthand, len--;
                                header1.push_back("    " + it->first);
-                               header1.back()[0] = shorthand++;
+                               header1.back()[0] = shorthand;
+                               shorthand = shorthand == 'Z' ? 'A' : shorthand+1;
                        }
                } else {
                        f << stringf(" 1'bx");