Commit e90aa1e6 authored by Robert Jordens's avatar Robert Jordens
Browse files

Signal.like(): inherit more properties from other

parent 5ccee6c6
......@@ -383,7 +383,11 @@ class Signal(_Value):
See `migen.fhdl.bitcontainer.value_bits_sign` for details.
"""
from migen.fhdl.bitcontainer import value_bits_sign
return cls(bits_sign=value_bits_sign(other), **kwargs)
kw = dict(bits_sign=value_bits_sign(other), variable=other.variable,
reset=other.reset, reset_less=other.reset_less,
related=other.related, attr=set(other.attr))
kw.update(kwargs)
return cls(**kwargs)
def __hash__(self):
return self.duid
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment