We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Signal.like
ShapeCastable
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The name_suffix functionality is broken. The init, reset_less, attrs, and decoder properties of the original signal are not preserved.
name_suffix
init
reset_less
attrs
decoder
>>> from amaranth.lib import data >>> from amaranth.hdl import * >>> l = data.StructLayout({"a": 8, "b": 4}) >>> s = Signal(l, init={"a": 1, "b": 2}, reset_less=True, attrs={"x": 123}) >>> s2 = Signal.like(s, name_suffix="a") [...] AttributeError: View with layout StructLayout({'a': 8, 'b': 4}) does not have a field 'name'; did you mean one of: 'a', 'b'? >>> s2 = Signal.like(s) >>> s.as_value().init 513 >>> s2.as_value().init 0 >>> s.as_value().reset_less True >>> s2.as_value().reset_less False >>> s.as_value().attrs OrderedDict([('x', 123)]) >>> s2.as_value().attrs OrderedDict()
The text was updated successfully, but these errors were encountered:
hdl._ast: make Signal.like work properly with ShapeCastables.
6e155a9
Fixes amaranth-lang#1285.
c59447c
Fixes #1285.
Successfully merging a pull request may close this issue.
The
name_suffix
functionality is broken. Theinit
,reset_less
,attrs
, anddecoder
properties of the original signal are not preserved.The text was updated successfully, but these errors were encountered: