Add test case for AntiStarvation
authorJean THOMAS <git0@pub.jeanthomas.me>
Wed, 8 Jul 2020 13:35:18 +0000 (15:35 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Wed, 8 Jul 2020 13:35:18 +0000 (15:35 +0200)
gram/test/test_core_multiplexer.py [new file with mode: 0644]

diff --git a/gram/test/test_core_multiplexer.py b/gram/test/test_core_multiplexer.py
new file mode 100644 (file)
index 0000000..b7d2a69
--- /dev/null
@@ -0,0 +1,15 @@
+from nmigen import *
+
+from gram.core.multiplexer import _AntiStarvation
+from utils import *
+
+class AntiStarvationTestCase(FHDLTestCase):
+    def test_formal(self):
+        def generic_test(timeout):
+            dut = _AntiStarvation(timeout)
+            self.assertFormal(dut, mode="bmc", depth=4)
+
+        generic_test(0)
+        generic_test(1)
+        generic_test(5)
+        generic_test(10)