From 0984308318a2bdb99a9662fd37a82c995376b2f9 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 6 Jan 2021 09:50:53 +0100 Subject: [PATCH] cores/gpio: add assertion on pads (has to be a Signal). Due to the bi-directional nature of tristate, Cat is not supported (so also not platform.request_all). --- litex/soc/cores/gpio.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litex/soc/cores/gpio.py b/litex/soc/cores/gpio.py index 288fc9a17..952834b67 100644 --- a/litex/soc/cores/gpio.py +++ b/litex/soc/cores/gpio.py @@ -45,6 +45,7 @@ class GPIOInOut(Module): class GPIOTristate(Module, AutoCSR): def __init__(self, pads): + assert isinstance(pads, Signal) nbits = len(pads) self._oe = CSRStorage(nbits, description="GPIO Tristate(s) Control.") self._in = CSRStatus(nbits, description="GPIO Input(s) Status.")