Raise ValueError if RefreshTimer period is unsupported (fixing #48)
authorJean THOMAS <git0@pub.jeanthomas.me>
Tue, 4 Aug 2020 13:47:08 +0000 (15:47 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Tue, 4 Aug 2020 13:47:08 +0000 (15:47 +0200)
gram/core/refresher.py

index 45d88f7192493f6e3b874358e831e7b1fbb19b62..02211d3cfd79c114985ec04bf64abf53f5e41def 100644 (file)
@@ -160,8 +160,8 @@ class RefreshTimer(Elaboratable):
     """
 
     def __init__(self, trefi):
-        # TODO: we don't pass formal verification for trefi = 1
-        assert trefi != 1
+        if trefi < 2:
+            raise ValueError("trefi values under 2 are currently unsupported")
 
         self.wait = Signal()
         self.done = Signal()