From 20e0125e0af7755882360471e9d5f5d6f8859018 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Fri, 29 Mar 2024 16:14:43 +0100 Subject: [PATCH] Workaround for Amaranth issue with Signal(range(1)) --- coreblocks/scheduler/wakeup_select.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreblocks/scheduler/wakeup_select.py b/coreblocks/scheduler/wakeup_select.py index a9eaaf302..dcac80e56 100644 --- a/coreblocks/scheduler/wakeup_select.py +++ b/coreblocks/scheduler/wakeup_select.py @@ -43,7 +43,7 @@ def elaborate(self, platform): with Transaction().body(m): ready = self.get_ready(m) ready_width = ready.shape().size - last = Signal(range(ready_width)) + last = Signal((ready_width - 1).bit_length()) for i in range(ready_width): with m.If(ready.ready_list[i]): m.d.comb += last.eq(i)