mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
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).
This commit is contained in:
parent
8109806609
commit
0984308318
1 changed files with 1 additions and 0 deletions
|
@ -45,6 +45,7 @@ class GPIOInOut(Module):
|
||||||
|
|
||||||
class GPIOTristate(Module, AutoCSR):
|
class GPIOTristate(Module, AutoCSR):
|
||||||
def __init__(self, pads):
|
def __init__(self, pads):
|
||||||
|
assert isinstance(pads, Signal)
|
||||||
nbits = len(pads)
|
nbits = len(pads)
|
||||||
self._oe = CSRStorage(nbits, description="GPIO Tristate(s) Control.")
|
self._oe = CSRStorage(nbits, description="GPIO Tristate(s) Control.")
|
||||||
self._in = CSRStatus(nbits, description="GPIO Input(s) Status.")
|
self._in = CSRStatus(nbits, description="GPIO Input(s) Status.")
|
||||||
|
|
Loading…
Reference in a new issue