You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/amaranth/latest/_sources/changes.rst.txt
+16-10Lines changed: 16 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -29,23 +29,23 @@ Migrating from version 0.4
29
29
30
30
Apply the following changes to code written against Amaranth 0.4 to migrate it to version 0.5:
31
31
32
+
* Update uses of :py:`reset=` keyword argument to :py:`init=`.
33
+
* Ensure all elaboratables are subclasses of :class:`Elaboratable`.
32
34
* Replace uses of :py:`m.Case()` with no patterns with :py:`m.Default()`.
33
35
* Replace uses of :py:`Value.matches()` with no patterns with :py:`Const(1)`.
34
-
* Update uses of :py:`amaranth.utils.log2_int(need_pow2=False)` to :func:`amaranth.utils.ceil_log2`.
35
-
* Update uses of :py:`amaranth.utils.log2_int(need_pow2=True)` to :func:`amaranth.utils.exact_log2`.
36
-
* Update uses of :py:`reset=` keyword argument to :py:`init=`.
37
-
* Convert uses of :py:`Simulator.add_sync_process` used as testbenches to :meth:`Simulator.add_testbench <amaranth.sim.Simulator.add_testbench>`.
38
-
* Convert other uses of :py:`Simulator.add_sync_process` to :meth:`Simulator.add_process <amaranth.sim.Simulator.add_process>`.
39
-
* Convert simulator processes and testbenches to use the new async API.
40
-
* Replace uses of :py:`amaranth.hdl.Memory` with :class:`amaranth.lib.memory.Memory`.
36
+
* Ensure clock domains aren't used outside the module that defines them, or its submodules; move clock domain definitions upwards in the hierarchy as necessary
41
37
* Replace imports of :py:`amaranth.asserts.Assert`, :py:`Assume`, and :py:`Cover` with imports from :py:`amaranth.hdl`.
42
38
* Remove uses of :py:`name=` keyword argument of :py:`Assert`, :py:`Assume`, and :py:`Cover`; a message can be used instead.
43
-
* Ensure all elaboratables are subclasses of :class:`Elaboratable`.
44
-
* Ensure clock domains aren't used outside the module that defines them, or its submodules; move clock domain definitions upwards in the hierarchy as necessary
45
-
* Remove uses of :py:`amaranth.lib.coding.*` by inlining or copying the implementation of the modules.
39
+
* Replace uses of :py:`amaranth.hdl.Memory` with :class:`amaranth.lib.memory.Memory`.
46
40
* Update uses of :py:`platform.request` to pass :py:`dir="-"` and use :mod:`amaranth.lib.io` buffers.
41
+
* Remove uses of :py:`amaranth.lib.coding.*` by inlining or copying the implementation of the modules.
42
+
* Convert uses of :py:`Simulator.add_sync_process` used as testbenches to :meth:`Simulator.add_testbench <amaranth.sim.Simulator.add_testbench>`.
43
+
* Convert other uses of :py:`Simulator.add_sync_process` to :meth:`Simulator.add_process <amaranth.sim.Simulator.add_process>`.
44
+
* Convert simulator processes and testbenches to use the new async API.
47
45
* Update uses of :meth:`Simulator.add_clock <amaranth.sim.Simulator.add_clock>` with explicit :py:`phase` to take into account simulator no longer adding implicit :py:`period / 2`. (Previously, :meth:`Simulator.add_clock <amaranth.sim.Simulator.add_clock>` was documented to first toggle the clock at the time :py:`phase`, but actually first toggled the clock at :py:`period / 2 + phase`.)
48
46
* Update uses of :meth:`Simulator.run_until <amaranth.sim.Simulator.run_until>` to remove the :py:`run_passive=True` argument. If the code uses :py:`run_passive=False`, ensure it still works with the new behavior.
47
+
* Update uses of :py:`amaranth.utils.log2_int(need_pow2=False)` to :func:`amaranth.utils.ceil_log2`.
48
+
* Update uses of :py:`amaranth.utils.log2_int(need_pow2=True)` to :func:`amaranth.utils.exact_log2`.
* `RFC 39`_: Change semantics of no-argument ``m.Case()``
79
+
* `RFC 42`_: ``Const`` from shape-castable
77
80
* `RFC 43`_: Rename ``reset=`` to ``init=``
78
81
* `RFC 45`_: Move ``hdl.Memory`` to ``lib.Memory``
79
82
* `RFC 46`_: Change ``Shape.cast(range(1))`` to ``unsigned(0)``
@@ -83,6 +86,7 @@ Implemented RFCs
83
86
* `RFC 55`_: New ``lib.io`` components
84
87
* `RFC 58`_: Core support for ``ValueCastable`` formatting
85
88
* `RFC 59`_: Get rid of upwards propagation of clock domains
89
+
* `RFC 61`_: Minimal streams
86
90
* `RFC 62`_: The ``MemoryData`` class
87
91
* `RFC 63`_: Remove ``amaranth.lib.coding``
88
92
* `RFC 65`_: Special formatting for structures and enums
@@ -103,6 +107,7 @@ Language changes
103
107
* Changed: :py:`Value.matches()` with no patterns is :py:`Const(0)` instead of :py:`Const(1)`. (`RFC 39`_)
104
108
* Changed: :py:`Signal(range(stop), init=stop)` warning has been changed into a hard error and made to trigger on any out-of range value.
105
109
* Changed: :py:`Signal(range(0))` is now valid without a warning.
110
+
* Changed: :py:`Const(value, shape)` now accepts shape-castable objects as :py:`shape`. (`RFC 42`_)
106
111
* Changed: :py:`Shape.cast(range(1))` is now :py:`unsigned(0)`. (`RFC 46`_)
107
112
* Changed: the :py:`reset=` argument of :class:`Signal`, :meth:`Signal.like`, :class:`amaranth.lib.wiring.Member`, :class:`amaranth.lib.cdc.FFSynchronizer`, and :py:`m.FSM()` has been renamed to :py:`init=`. (`RFC 43`_)
108
113
* Changed: :class:`Shape` has been made immutable and hashable.
Copy file name to clipboardExpand all lines: docs/amaranth/latest/_sources/stdlib.rst.txt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@ Standard library
3
3
4
4
The :mod:`amaranth.lib` module, also known as the standard library, provides modules that falls into one of the three categories:
5
5
6
-
1. Modules that will used by essentially all idiomatic Amaranth code, or which are necessary for interoperability. This includes :mod:`amaranth.lib.enum` (enumerations), :mod:`amaranth.lib.data` (data structures), :mod:`amaranth.lib.wiring` (interfaces and components), and :mod:`amaranth.lib.meta` (interface metadata).
7
-
2. Modules that abstract common functionality whose implementation differs between hardware platforms. This includes :mod:`amaranth.lib.cdc`, :mod:`amaranth.lib.memory`.
6
+
1. Modules that will used by essentially all idiomatic Amaranth code, or which are necessary for interoperability. This includes :mod:`amaranth.lib.enum` (enumerations), :mod:`amaranth.lib.data` (data structures), :mod:`amaranth.lib.wiring` (interfaces and components), :mod:`amaranth.lib.meta` (interface metadata), and :mod:`amaranth.lib.stream` (data streams).
7
+
2. Modules that abstract common functionality whose implementation differs between hardware platforms. This includes :mod:`amaranth.lib.memory` and :mod:`amaranth.lib.cdc`.
8
8
3. Modules that have essentially one correct implementation and are of broad utility in digital designs. This includes :mod:`amaranth.lib.coding`, :mod:`amaranth.lib.fifo`, and :mod:`amaranth.lib.crc`.
9
9
10
10
As part of the Amaranth backwards compatibility guarantee, any behaviors described in these documents will not change from a version to another without at least one version including a warning about the impending change. Any nontrivial change to these behaviors must also go through the public review as a part of the `Amaranth Request for Comments process <https://amaranth-lang.org/rfcs/>`_.
@@ -18,6 +18,7 @@ The Amaranth standard library is separate from the Amaranth language: everything
0 commit comments