Check that busy_o doesn't rise on its own
authorCesar Strauss <cestrauss@gmail.com>
Mon, 25 May 2020 22:50:32 +0000 (19:50 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Mon, 25 May 2020 22:51:13 +0000 (19:51 -0300)
src/soc/experiment/compalu_multi.py

index 081472eeee129472af0b819bdd5976124eb4800d..beb2179ad6de7e2382dc215f77dae687c7769ee5 100644 (file)
@@ -388,18 +388,22 @@ class CompUnitParallelTest:
         # Operation cycle should not take longer than this:
         self.MAX_BUSY_WAIT = 50
 
+        # Minimum duration in which issue_i will be kept inactive,
+        # during which busy_o must remain low.
+        self.MIN_BUSY_LOW = 5
+
     def driver(self):
 
         print("Begin parallel test.")
 
         # issue_i starts inactive
         yield self.dut.issue_i.eq(0)
-        yield
 
-        # busy_o must start inactive
-        # TODO: Check a few times that busy_o doesn't rise on its own
-        busy_o = yield self.dut.busy_o
-        assert not busy_o
+        for n in range(self.MIN_BUSY_LOW):
+            yield
+            # busy_o must remain inactive. It cannot rise on its own.
+            busy_o = yield self.dut.busy_o
+            assert not busy_o
 
         # activate issue_i to begin the operation cycle
         yield self.dut.issue_i.eq(1)