From: Sebastien Bourdeauducq Date: Thu, 6 Dec 2012 19:56:46 +0000 (+0100) Subject: fhdl/structure: do not create Signal in Instance when parameter is int X-Git-Tag: 24jan2021_ls180~2099^2~721 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=483b821342c656c1d086a3a2b910c2b15c0f11ac;p=litex.git fhdl/structure: do not create Signal in Instance when parameter is int --- diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 250c57ae..1b2d38c5 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -242,12 +242,11 @@ class Instance(HUID): self.items = items class _IO: - def __init__(self, name, expr=1): + def __init__(self, name, expr=None): self.name = name - if isinstance(expr, (int, tuple)): - self.expr = Signal(expr, name) - else: - self.expr = expr + if expr is None: + expr = Signal() + self.expr = expr class Input(_IO): pass class Output(_IO):