X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fspec%2Fiomux.py;h=0351fbe064d0687bb9cc2adeb9dd6a4cc7ea65ec;hb=ee6c6c5020f11e7debfd8262ffdb8abd6e1782c5;hp=90a7158c58cb7bcdcda1152827489558a9899aee;hpb=78073b1511796a8d993db0ef6fd6a1093acd5720;p=pinmux.git 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):