From 8c37ba1f24328f69afcdb91c8800af1117111cb4 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Tue, 4 Aug 2020 15:47:08 +0200 Subject: [PATCH] Raise ValueError if RefreshTimer period is unsupported (fixing #48) --- gram/core/refresher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gram/core/refresher.py b/gram/core/refresher.py index 45d88f7..02211d3 100644 --- a/gram/core/refresher.py +++ b/gram/core/refresher.py @@ -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() -- 2.30.2