From ce72afb0bc3871d6cb126ef5fc005208f5e95d2f Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Fri, 24 Jul 2020 15:49:17 +0200 Subject: [PATCH] Fix tXXDController (was overflowing) --- gram/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gram/common.py b/gram/common.py index 0c0503b..e43bb74 100644 --- a/gram/common.py +++ b/gram/common.py @@ -238,7 +238,7 @@ class tXXDController(Elaboratable): count.eq(self._txxd-1), self.ready.eq((self._txxd - 1) == 0), ] - with m.Else(): + with m.Elif(~self.ready): m.d.sync += count.eq(count-1) with m.If(count == 1): m.d.sync += self.ready.eq(1) -- 2.30.2