try random inputs
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 15 May 2019 17:13:01 +0000 (18:13 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 15 May 2019 17:13:01 +0000 (18:13 +0100)
src/experiment/cscore.py

index 5d6edf63c18b1974edc6f8f925c95351c793331c..32548e25ccb0eb433cedf2763c08fda4a8616f93 100644 (file)
@@ -313,20 +313,22 @@ def scoreboard_sim(dut, alusim):
             break
             if dest not in [src1, src2]:
                 break
-        if i == 0:
-            src1 = 6
-            src2 = 6
-            dest = 1
-        else:
-            src1 = 3
-            src2 = 7
-            dest = 2
-        #src1 = 2
-        #src2 = 3
-        #dest = 2 
-
         op = randint(0, 1)
-        op = 0
+        if False:
+            if i == 0:
+                src1 = 6
+                src2 = 6
+                dest = 1
+            else:
+                src1 = 1
+                src2 = 7
+                dest = 2
+            #src1 = 2
+            #src2 = 3
+            #dest = 2
+
+            op = i
+
         print ("random %d: %d %d %d %d\n" % (i, op, src1, src2, dest))
         yield from int_instr(dut, alusim, op, src1, src2, dest)
         yield from print_reg(dut, [3,4,5])