Skip to content

Commit 52b9d3f

Browse files
committed
Implement RFC 15: Lifting shape-castable objects.
See amaranth-lang/rfcs#15 and #784. Note that this RFC breaks the existing syntax for initializing a view with a new signal. Instances of `View(layout)` *must* be changed to `Signal(layout)`.
1 parent 8af9062 commit 52b9d3f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

amaranth/lib/data.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,10 +587,7 @@ class View(ValueCastable):
587587
Creating a view
588588
###############
589589
590-
When creating a view, either only the ``target`` argument, or any of the ``name``, ``reset``,
591-
``reset_less``, ``attrs``, or ``decoder`` arguments may be provided. If a target is provided,
592-
it is used as the underlying value. Otherwise, a new :class:`Signal` is created, and the rest
593-
of the arguments are passed to its constructor.
590+
A view must be created using an explicitly provided layout and target. To create a new :class:`Signal` that is wrapped in a :class:`View` with a given ``layout``, use ``Signal(layout, ...)``, which for a :class:`Layout` is equivalent to ``View(layout, Signal(...))``.
594591
595592
Accessing a view
596593
################

0 commit comments

Comments
 (0)