From: Sebastien Bourdeauducq Date: Sat, 26 Sep 2015 13:49:12 +0000 (+0800) Subject: fhdl/specials/Tristate: handle i=None X-Git-Tag: 24jan2021_ls180~2099^2~3^2~37 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09003a55e15315ce24493b77a5f54c1f57e5b199;p=litex.git fhdl/specials/Tristate: handle i=None --- diff --git a/migen/fhdl/specials.py b/migen/fhdl/specials.py index ba2c911c..bd3e1bf5 100644 --- a/migen/fhdl/specials.py +++ b/migen/fhdl/specials.py @@ -44,7 +44,7 @@ class Tristate(Special): self.target = wrap(target) self.o = wrap(o) self.oe = wrap(oe) - self.i = wrap(i) + self.i = wrap(i) if i is not None else None def iter_expressions(self): for attr, target_context in [ @@ -52,7 +52,8 @@ class Tristate(Special): ("o", SPECIAL_INPUT), ("oe", SPECIAL_INPUT), ("i", SPECIAL_OUTPUT)]: - yield self, attr, target_context + if getattr(self, attr) is not None: + yield self, attr, target_context @staticmethod def emit_verilog(tristate, ns, add_data_file):