fhdl/specials/Tristate: handle i=None
This commit is contained in:
parent
e136352e8f
commit
09003a55e1
|
@ -44,7 +44,7 @@ class Tristate(Special):
|
||||||
self.target = wrap(target)
|
self.target = wrap(target)
|
||||||
self.o = wrap(o)
|
self.o = wrap(o)
|
||||||
self.oe = wrap(oe)
|
self.oe = wrap(oe)
|
||||||
self.i = wrap(i)
|
self.i = wrap(i) if i is not None else None
|
||||||
|
|
||||||
def iter_expressions(self):
|
def iter_expressions(self):
|
||||||
for attr, target_context in [
|
for attr, target_context in [
|
||||||
|
@ -52,6 +52,7 @@ class Tristate(Special):
|
||||||
("o", SPECIAL_INPUT),
|
("o", SPECIAL_INPUT),
|
||||||
("oe", SPECIAL_INPUT),
|
("oe", SPECIAL_INPUT),
|
||||||
("i", SPECIAL_OUTPUT)]:
|
("i", SPECIAL_OUTPUT)]:
|
||||||
|
if getattr(self, attr) is not None:
|
||||||
yield self, attr, target_context
|
yield self, attr, target_context
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue