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
This commit includes additional non-documentation changes, related to
issues found while documenting it:
- `Simulator.run_until()` no longer accepts a `run_passive=` argument.
Passive no longer exist and in any case defaulting to `False` does not
make a lot of sense from an API perspective.
- `add_clock()`'s `phase=` argument, when specified, no longer has
`period/2` added to it. This wasn't the documented behavior in first
place and it makes no sense to do that.
- `add_clock()` raises a `NameError` if a clock domain does not exist,
instead of `ValueError`.
- `add_clock()` raises a `DriverConflict` if a clock domain is already
being driven by a clock, instead of `ValueError`.
- GTKWave is no longer a part of the installation instructions, and both
Surfer and GTKWave are recommended (in this order).
Copy file name to clipboardExpand all lines: docs/changes.rst
+34-25
Original file line number
Diff line number
Diff line change
@@ -29,20 +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
-
* Replace uses of ``m.Case()`` with no patterns with ``m.Default()``
33
-
* Replace uses of ``Value.matches()`` with no patterns with ``Const(1)``
34
-
* Update uses of ``amaranth.utils.log2_int(need_pow2=False)`` to :func:`amaranth.utils.ceil_log2`
35
-
* Update uses of ``amaranth.utils.log2_int(need_pow2=True)`` to :func:`amaranth.utils.exact_log2`
36
-
* Update uses of ``reset=`` keyword argument to ``init=``
37
-
* Convert uses of ``Simulator.add_sync_process`` used as testbenches to ``Simulator.add_testbench``
38
-
* Convert other uses of ``Simulator.add_sync_process`` to ``Simulator.add_process``
39
-
* Replace uses of ``amaranth.hdl.Memory`` with ``amaranth.lib.memory.Memory``
40
-
* Replace imports of ``amaranth.asserts.{Assert, Assume, Cover}`` with imports from ``amaranth.hdl``
41
-
* Remove any usage of ``name=`` with assertions, possibly replacing them with custom messages
42
-
* Ensure all elaboratables are subclasses of :class:`Elaboratable`
32
+
* Replace uses of :py:`m.Case()` with no patterns with :py:`m.Default()`.
33
+
* 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`.
41
+
* Replace imports of :py:`amaranth.asserts.Assert`, :py:`Assume`, and :py:`Cover` with imports from :py:`amaranth.hdl`.
42
+
* 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`.
43
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
44
-
* Remove uses of ``amaranth.lib.coding.*`` by inlining or copying the implementation of the modules
45
-
* Update uses of ``platform.request`` to pass ``dir="-"`` and use :mod:`amaranth.lib.io` buffers
45
+
* Remove uses of :py:`amaranth.lib.coding.*` by inlining or copying the implementation of the modules.
46
+
* Update uses of :py:`platform.request` to pass :py:`dir="-"` and use :mod:`amaranth.lib.io` buffers.
47
+
* 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
+
* 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.
* Changed: ``m.Case()`` with no patterns is never active instead of always active. (`RFC 39`_)
98
-
* Changed: ``Value.matches()`` with no patterns is ``Const(0)`` instead of ``Const(1)``. (`RFC 39`_)
99
-
* Changed: ``Signal(range(stop), init=stop)`` warning has been changed into a hard error and made to trigger on any out-of range value.
100
-
* Changed: ``Signal(range(0))`` is now valid without a warning.
101
-
* Changed: ``Shape.cast(range(1))`` is now ``unsigned(0)``. (`RFC 46`_)
102
-
* Changed: the ``reset=`` argument of :class:`Signal`, :meth:`Signal.like`, :class:`amaranth.lib.wiring.Member`, :class:`amaranth.lib.cdc.FFSynchronizer`, and ``m.FSM()`` has been renamed to ``init=``. (`RFC 43`_)
102
+
* Changed: :py:`m.Case()` with no patterns is never active instead of always active. (`RFC 39`_)
103
+
* Changed: :py:`Value.matches()` with no patterns is :py:`Const(0)` instead of :py:`Const(1)`. (`RFC 39`_)
104
+
* 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
+
* Changed: :py:`Signal(range(0))` is now valid without a warning.
106
+
* Changed: :py:`Shape.cast(range(1))` is now :py:`unsigned(0)`. (`RFC 46`_)
107
+
* 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`_)
103
108
* Changed: :class:`Shape` has been made immutable and hashable.
104
109
* Changed: :class:`Assert`, :class:`Assume`, :class:`Cover` have been moved to :mod:`amaranth.hdl` from :mod:`amaranth.asserts`. (`RFC 50`_)
105
110
* Changed: :class:`Instance` IO ports now accept only IO values, not plain values. (`RFC 53`_)
* Added: async function support in :meth:`Simulator.add_testbench <amaranth.sim.Simulator.add_testbench>` and :meth:`Simulator.add_process <amaranth.sim.Simulator.add_process>`. (`RFC 36`_)
138
144
* Added: support for :class:`amaranth.hdl.Assert` in simulation. (`RFC 50`_)
* Changed: :meth:`Simulator.add_clock <amaranth.sim.Simulator.add_clock>` no longer implicitly adds :py:`period / 2` when :py:`phase` is specified, actually matching the documentation.
146
+
* Changed: :meth:`Simulator.run_until <amaranth.sim.Simulator.run_until>` always runs the simulation until the given deadline, even when no critical processes or testbenches are present.
* Deprecated: the :py:`run_passive` argument to :meth:`Simulator.run_until <amaranth.sim.Simulator.run_until>` has been deprecated, and does nothing.
141
150
* Removed: (deprecated in 0.4) use of mixed-case toolchain environment variable names, such as ``NMIGEN_ENV_Diamond`` or ``AMARANTH_ENV_Diamond``; use upper-case environment variable names, such as ``AMARANTH_ENV_DIAMOND``.
142
151
143
152
@@ -150,7 +159,7 @@ Platform integration changes
150
159
* Added: :meth:`BuildPlan.extract`.
151
160
* Added: ``build.sh`` begins with ``#!/bin/sh``.
152
161
* Changed: ``IntelPlatform`` renamed to ``AlteraPlatform``.
153
-
* Deprecated: argument ``run_script=`` in :meth:`BuildPlan.execute_local`.
162
+
* Deprecated: argument :py:`run_script=` in :meth:`BuildPlan.execute_local`.
Copy file name to clipboardExpand all lines: docs/install.rst
+9-12
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Amaranth HDL requires Python 3.8; it works on CPython_ 3.8 (or newer), and works
27
27
28
28
For most workflows, Amaranth requires Yosys_ |yosys-version|. A `compatible version of Yosys <amaranth-yosys_>`_ is distributed via PyPI_ for most popular platforms, so it is usually not necessary to install Yosys separately.
29
29
30
-
Simulating Amaranth code requires no additional software. However, a waveform viewer like GTKWave_ is invaluable for debugging. As an alternative to GTKWave, the `Amaranth Playground`_ can be used to display waveforms for simple designs.
30
+
Simulating Amaranth code requires no additional software. However, a waveform viewer like Surfer_ or GTKWave_ is invaluable for debugging. As an alternative, the `Amaranth Playground`_ can be used to display waveforms for simple designs.
31
31
32
32
Synthesizing, placing and routing an Amaranth design for an FPGA requires the FPGA family specific toolchain. The open source iCE40, ECP5, MachXO2/3, Nexus, and Gowin toolchains are distributed via PyPI_ for most popular platforms by the YoWASP_ project.
33
33
@@ -39,6 +39,7 @@ Synthesizing, placing and routing an Amaranth design for an FPGA requires the FP
:ref:`Install Python <python:using-on-windows>`, either from Windows Store or using the full installer. If using the full installer, make sure to install a 64-bit version of Python.
60
61
61
-
`Download GTKWave`_, either win32 or win64 binaries. GTKWave does not need to be installed; it can be unpacked to any convenient location and run from there.
0 commit comments