Signal.like: pass kwargs

This commit is contained in:
Robert Jordens 2014-08-17 14:56:30 -06:00 committed by Sebastien Bourdeauducq
parent 7e77254c57
commit b3d69913cd
1 changed files with 2 additions and 2 deletions

View File

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