Signal.like: pass kwargs
authorRobert Jordens <jordens@gmail.com>
Sun, 17 Aug 2014 20:56:30 +0000 (14:56 -0600)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Mon, 18 Aug 2014 03:01:56 +0000 (11:01 +0800)
migen/fhdl/structure.py

index aa33888e2ece7fb24694b549351619d03876635e..3edc2860867e8950e9cd042687bba38acd01e30e 100644 (file)
@@ -275,7 +275,7 @@ class Signal(Value):
                return "<Signal " + (self.backtrace[-1][0] or "anonymous") + " at " + hex(id(self)) + ">"
 
        @classmethod
-       def like(cls, other):
+       def like(cls, other, **kwargs):
                """Create Signal based on another.
 
                Parameters
@@ -286,7 +286,7 @@ class Signal(Value):
                See `migen.fhdl.bitcontainer.value_bits_sign`() for details.
                """
                from migen.fhdl.bitcontainer import value_bits_sign
-               return cls(value_bits_sign(other))
+               return cls(bits_sign=value_bits_sign(other), **kwargs)
 
 class ClockSignal(Value):
        """Clock signal for a given clock domain