From: Andrey Miroshnikov Date: Tue, 18 Oct 2022 12:38:53 +0000 (+0000) Subject: fix(iomux): Fix port signal length (given mux size non-power of 2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=pinmux.git fix(iomux): Fix port signal length (given mux size non-power of 2) --- 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):