From ee6c6c5020f11e7debfd8262ffdb8abd6e1782c5 Mon Sep 17 00:00:00 2001 From: Andrey Miroshnikov Date: Tue, 18 Oct 2022 12:38:53 +0000 Subject: [PATCH] fix(iomux): Fix port signal length (given mux size non-power of 2) --- src/spec/iomux.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spec/iomux.py b/src/spec/iomux.py index 90a7158..0351fbe 100644 --- a/src/spec/iomux.py +++ b/src/spec/iomux.py @@ -38,7 +38,8 @@ class IOMuxBlockSingle(Elaboratable): def __init__(self, n_ports=4): print("1-bit IO Mux Block") self.n_ports = n_ports - self.port = Signal(log2_int(self.n_ports)) + portsize = n_ports.bit_length() + self.port = Signal(portsize) temp = [] for i in range(self.n_ports): -- 2.30.2