Skip to content

Commit

Permalink
Deploying to main from @ amaranth-lang/amaranth@89d1c9b 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed Nov 25, 2023
1 parent 9db5fd6 commit 235bd18
Show file tree
Hide file tree
Showing 36 changed files with 101 additions and 87 deletions.
2 changes: 1 addition & 1 deletion docs/amaranth/latest/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 995720c0ca0581a32c59fb85fe52b52c
config: c6bb32ecdb0a444c78909e22b0f8e1bd
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/amaranth/latest/.doctrees/changes.doctree
Binary file not shown.
Binary file modified docs/amaranth/latest/.doctrees/environment.pickle
Binary file not shown.
5 changes: 5 additions & 0 deletions docs/amaranth/latest/_sources/changes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Support for Python 3.6 and 3.7 has been removed, and support for Python 3.11 and

Features deprecated in version 0.3 have been removed. In particular, the ``nmigen.*`` namespace is not provided, ``# nmigen:`` annotations are not recognized, and ``NMIGEN_*`` envronment variables are not used.

The Migen compatibility layer remains deprecated (as it had been since Amaranth 0.1), and is now scheduled to be removed in version 0.5.


Migrating from version 0.3
--------------------------
Expand All @@ -31,6 +33,8 @@ Apply the following changes to code written against Amaranth 0.3 to migrate it t
* Replace uses of ``Const.normalize(value, shape)`` with ``Const(value, shape).value``.
* Replace uses of ``Repl(value, count)`` with ``value.replicate(count)``.
* Replace uses of ``Record`` with :mod:`amaranth.lib.data` and :mod:`amaranth.lib.wiring`. The appropriate replacement depends on the use case. If ``Record`` was being used for data storage and accessing the bit-level representation, use :mod:`amaranth.lib.data`. If ``Record`` was being used for connecting design components together, use :mod:`amaranth.lib.wiring`.
* Replace uses of ``Sample``, ``Past``, ``Stable``, ``Rose``, ``Fell`` with a manually instantiated register, e.g. ``past_x = Signal.like(x); m.d.sync += past_x.eq(x)``.
* Remove uses of ``amaranth.compat`` by migrating to native Amaranth syntax.
* Ensure the ``Pin`` instance returned by ``platform.request`` is not cast to value directly, but used for its fields. Replace code like ``leds = Cat(platform.request(led, n) for n in range(4))`` with ``leds = Cat(platform.request(led, n).o for n in range(4))`` (note the ``.o``).
* Remove uses of ``amaranth.lib.scheduler.RoundRobin`` by inlining or copying the implementation of that class.
* Remove uses of ``amaranth.lib.fifo.SyncFIFO(fwft=False)`` and ``amaranth.lib.fifo.FIFOInterface(fwft=False)`` by converting code to use ``fwft=True`` FIFOs or copying the implementation of those classes.
Expand Down Expand Up @@ -91,6 +95,7 @@ Language changes
* Changed: :meth:`Value.cast` treats instances of classes derived from both :class:`enum.Enum` and :class:`int` (including :class:`enum.IntEnum`) as enumerations rather than integers.
* Changed: :meth:`Value.matches` with an empty list of patterns returns ``Const(1)`` rather than ``Const(0)``, to match the behavior of ``with m.Case():``.
* Changed: :class:`Cat` warns if an enumeration without an explicitly specified shape is used. (`RFC 3`_)
* Deprecated: :class:`ast.Sample`, :class:`ast.Past`, :class:`ast.Stable`, :class:`ast.Rose`, :class:`ast.Fell`. (Predating the RFC process.)
* Deprecated: :meth:`Const.normalize`; use ``Const(value, shape).value`` instead of ``Const.normalize(value, shape)``. (`RFC 5`_)
* Deprecated: :class:`Repl`; use :meth:`Value.replicate` instead. (`RFC 10`_)
* Deprecated: :class:`Record`; use :mod:`amaranth.lib.data` and :mod:`amaranth.lib.wiring` instead. (`RFC 1`_, `RFC 2`_)
Expand Down
2 changes: 1 addition & 1 deletion docs/amaranth/latest/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.4.dev236',
VERSION: '0.4.dev237',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
10 changes: 7 additions & 3 deletions docs/amaranth/latest/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Changelog &mdash; Amaranth HDL toolchain 0.4.dev236 documentation</title>
<title>Changelog &mdash; Amaranth HDL toolchain 0.4.dev237 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/platformpicker.css" type="text/css" />
Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=4dd90f0f"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=e9a18b16"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/platformpicker.js"></script>
Expand All @@ -38,7 +38,7 @@
Amaranth HDL toolchain
</a>
<div class="version">
0.4.dev236+g28e1d28.editable
0.4.dev237+g89d1c9b.editable
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -120,6 +120,7 @@ <h2>Version 0.4 (unreleased)<a class="headerlink" href="#version-0-4-unreleased"
<p>Several issues with shape inference have been resolved. Notably, <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">-</span> <span class="pre">b</span></code> where both <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">b</span></code> are unsigned now returns a signed value.</p>
<p>Support for Python 3.6 and 3.7 has been removed, and support for Python 3.11 and 3.12 has been added.</p>
<p>Features deprecated in version 0.3 have been removed. In particular, the <code class="docutils literal notranslate"><span class="pre">nmigen.*</span></code> namespace is not provided, <code class="docutils literal notranslate"><span class="pre">#</span> <span class="pre">nmigen:</span></code> annotations are not recognized, and <code class="docutils literal notranslate"><span class="pre">NMIGEN_*</span></code> envronment variables are not used.</p>
<p>The Migen compatibility layer remains deprecated (as it had been since Amaranth 0.1), and is now scheduled to be removed in version 0.5.</p>
<section id="migrating-from-version-0-3">
<h3>Migrating from version 0.3<a class="headerlink" href="#migrating-from-version-0-3" title="Permalink to this heading"></a></h3>
<p>Apply the following changes to code written against Amaranth 0.3 to migrate it to version 0.4:</p>
Expand All @@ -130,6 +131,8 @@ <h3>Migrating from version 0.3<a class="headerlink" href="#migrating-from-versio
<li><p>Replace uses of <code class="docutils literal notranslate"><span class="pre">Const.normalize(value,</span> <span class="pre">shape)</span></code> with <code class="docutils literal notranslate"><span class="pre">Const(value,</span> <span class="pre">shape).value</span></code>.</p></li>
<li><p>Replace uses of <code class="docutils literal notranslate"><span class="pre">Repl(value,</span> <span class="pre">count)</span></code> with <code class="docutils literal notranslate"><span class="pre">value.replicate(count)</span></code>.</p></li>
<li><p>Replace uses of <code class="docutils literal notranslate"><span class="pre">Record</span></code> with <a class="reference internal" href="stdlib/data.html#module-amaranth.lib.data" title="amaranth.lib.data"><code class="xref py py-mod docutils literal notranslate"><span class="pre">amaranth.lib.data</span></code></a> and <code class="xref py py-mod docutils literal notranslate"><span class="pre">amaranth.lib.wiring</span></code>. The appropriate replacement depends on the use case. If <code class="docutils literal notranslate"><span class="pre">Record</span></code> was being used for data storage and accessing the bit-level representation, use <a class="reference internal" href="stdlib/data.html#module-amaranth.lib.data" title="amaranth.lib.data"><code class="xref py py-mod docutils literal notranslate"><span class="pre">amaranth.lib.data</span></code></a>. If <code class="docutils literal notranslate"><span class="pre">Record</span></code> was being used for connecting design components together, use <code class="xref py py-mod docutils literal notranslate"><span class="pre">amaranth.lib.wiring</span></code>.</p></li>
<li><p>Replace uses of <code class="docutils literal notranslate"><span class="pre">Sample</span></code>, <code class="docutils literal notranslate"><span class="pre">Past</span></code>, <code class="docutils literal notranslate"><span class="pre">Stable</span></code>, <code class="docutils literal notranslate"><span class="pre">Rose</span></code>, <code class="docutils literal notranslate"><span class="pre">Fell</span></code> with a manually instantiated register, e.g. <code class="docutils literal notranslate"><span class="pre">past_x</span> <span class="pre">=</span> <span class="pre">Signal.like(x);</span> <span class="pre">m.d.sync</span> <span class="pre">+=</span> <span class="pre">past_x.eq(x)</span></code>.</p></li>
<li><p>Remove uses of <code class="docutils literal notranslate"><span class="pre">amaranth.compat</span></code> by migrating to native Amaranth syntax.</p></li>
<li><p>Ensure the <code class="docutils literal notranslate"><span class="pre">Pin</span></code> instance returned by <code class="docutils literal notranslate"><span class="pre">platform.request</span></code> is not cast to value directly, but used for its fields. Replace code like <code class="docutils literal notranslate"><span class="pre">leds</span> <span class="pre">=</span> <span class="pre">Cat(platform.request(led,</span> <span class="pre">n)</span> <span class="pre">for</span> <span class="pre">n</span> <span class="pre">in</span> <span class="pre">range(4))</span></code> with <code class="docutils literal notranslate"><span class="pre">leds</span> <span class="pre">=</span> <span class="pre">Cat(platform.request(led,</span> <span class="pre">n).o</span> <span class="pre">for</span> <span class="pre">n</span> <span class="pre">in</span> <span class="pre">range(4))</span></code> (note the <code class="docutils literal notranslate"><span class="pre">.o</span></code>).</p></li>
<li><p>Remove uses of <code class="docutils literal notranslate"><span class="pre">amaranth.lib.scheduler.RoundRobin</span></code> by inlining or copying the implementation of that class.</p></li>
<li><p>Remove uses of <code class="docutils literal notranslate"><span class="pre">amaranth.lib.fifo.SyncFIFO(fwft=False)</span></code> and <code class="docutils literal notranslate"><span class="pre">amaranth.lib.fifo.FIFOInterface(fwft=False)</span></code> by converting code to use <code class="docutils literal notranslate"><span class="pre">fwft=True</span></code> FIFOs or copying the implementation of those classes.</p></li>
Expand Down Expand Up @@ -170,6 +173,7 @@ <h3>Language changes<a class="headerlink" href="#language-changes" title="Permal
<li><p>Changed: <code class="xref py py-meth docutils literal notranslate"><span class="pre">Value.cast()</span></code> treats instances of classes derived from both <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></a> and <a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a> (including <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntEnum" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.IntEnum</span></code></a>) as enumerations rather than integers.</p></li>
<li><p>Changed: <code class="xref py py-meth docutils literal notranslate"><span class="pre">Value.matches()</span></code> with an empty list of patterns returns <code class="docutils literal notranslate"><span class="pre">Const(1)</span></code> rather than <code class="docutils literal notranslate"><span class="pre">Const(0)</span></code>, to match the behavior of <code class="docutils literal notranslate"><span class="pre">with</span> <span class="pre">m.Case():</span></code>.</p></li>
<li><p>Changed: <code class="xref py py-class docutils literal notranslate"><span class="pre">Cat</span></code> warns if an enumeration without an explicitly specified shape is used. (<a class="reference external" href="https://amaranth-lang.org/rfcs/0003-enumeration-shapes.html">RFC 3</a>)</p></li>
<li><p>Deprecated: <code class="xref py py-class docutils literal notranslate"><span class="pre">ast.Sample</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ast.Past</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ast.Stable</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ast.Rose</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ast.Fell</span></code>. (Predating the RFC process.)</p></li>
<li><p>Deprecated: <code class="xref py py-meth docutils literal notranslate"><span class="pre">Const.normalize()</span></code>; use <code class="docutils literal notranslate"><span class="pre">Const(value,</span> <span class="pre">shape).value</span></code> instead of <code class="docutils literal notranslate"><span class="pre">Const.normalize(value,</span> <span class="pre">shape)</span></code>. (<a class="reference external" href="https://amaranth-lang.org/rfcs/0005-remove-const-normalize.html">RFC 5</a>)</p></li>
<li><p>Deprecated: <code class="xref py py-class docutils literal notranslate"><span class="pre">Repl</span></code>; use <code class="xref py py-meth docutils literal notranslate"><span class="pre">Value.replicate()</span></code> instead. (<a class="reference external" href="https://amaranth-lang.org/rfcs/0010-move-repl-to-value.html">RFC 10</a>)</p></li>
<li><p>Deprecated: <code class="xref py py-class docutils literal notranslate"><span class="pre">Record</span></code>; use <a class="reference internal" href="stdlib/data.html#module-amaranth.lib.data" title="amaranth.lib.data"><code class="xref py py-mod docutils literal notranslate"><span class="pre">amaranth.lib.data</span></code></a> and <code class="xref py py-mod docutils literal notranslate"><span class="pre">amaranth.lib.wiring</span></code> instead. (<a class="reference external" href="https://amaranth-lang.org/rfcs/0001-aggregate-data-structures.html">RFC 1</a>, <a class="reference external" href="https://amaranth-lang.org/rfcs/0002-interfaces.html">RFC 2</a>)</p></li>
Expand Down
5 changes: 5 additions & 0 deletions docs/amaranth/latest/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Support for Python 3.6 and 3.7 has been removed, and support for Python 3.11 and

Features deprecated in version 0.3 have been removed. In particular, the ``nmigen.*`` namespace is not provided, ``# nmigen:`` annotations are not recognized, and ``NMIGEN_*`` envronment variables are not used.

The Migen compatibility layer remains deprecated (as it had been since Amaranth 0.1), and is now scheduled to be removed in version 0.5.


Migrating from version 0.3
--------------------------
Expand All @@ -31,6 +33,8 @@ Apply the following changes to code written against Amaranth 0.3 to migrate it t
* Replace uses of ``Const.normalize(value, shape)`` with ``Const(value, shape).value``.
* Replace uses of ``Repl(value, count)`` with ``value.replicate(count)``.
* Replace uses of ``Record`` with :mod:`amaranth.lib.data` and :mod:`amaranth.lib.wiring`. The appropriate replacement depends on the use case. If ``Record`` was being used for data storage and accessing the bit-level representation, use :mod:`amaranth.lib.data`. If ``Record`` was being used for connecting design components together, use :mod:`amaranth.lib.wiring`.
* Replace uses of ``Sample``, ``Past``, ``Stable``, ``Rose``, ``Fell`` with a manually instantiated register, e.g. ``past_x = Signal.like(x); m.d.sync += past_x.eq(x)``.
* Remove uses of ``amaranth.compat`` by migrating to native Amaranth syntax.
* Ensure the ``Pin`` instance returned by ``platform.request`` is not cast to value directly, but used for its fields. Replace code like ``leds = Cat(platform.request(led, n) for n in range(4))`` with ``leds = Cat(platform.request(led, n).o for n in range(4))`` (note the ``.o``).
* Remove uses of ``amaranth.lib.scheduler.RoundRobin`` by inlining or copying the implementation of that class.
* Remove uses of ``amaranth.lib.fifo.SyncFIFO(fwft=False)`` and ``amaranth.lib.fifo.FIFOInterface(fwft=False)`` by converting code to use ``fwft=True`` FIFOs or copying the implementation of those classes.
Expand Down Expand Up @@ -91,6 +95,7 @@ Language changes
* Changed: :meth:`Value.cast` treats instances of classes derived from both :class:`enum.Enum` and :class:`int` (including :class:`enum.IntEnum`) as enumerations rather than integers.
* Changed: :meth:`Value.matches` with an empty list of patterns returns ``Const(1)`` rather than ``Const(0)``, to match the behavior of ``with m.Case():``.
* Changed: :class:`Cat` warns if an enumeration without an explicitly specified shape is used. (`RFC 3`_)
* Deprecated: :class:`ast.Sample`, :class:`ast.Past`, :class:`ast.Stable`, :class:`ast.Rose`, :class:`ast.Fell`. (Predating the RFC process.)
* Deprecated: :meth:`Const.normalize`; use ``Const(value, shape).value`` instead of ``Const.normalize(value, shape)``. (`RFC 5`_)
* Deprecated: :class:`Repl`; use :meth:`Value.replicate` instead. (`RFC 10`_)
* Deprecated: :class:`Record`; use :mod:`amaranth.lib.data` and :mod:`amaranth.lib.wiring` instead. (`RFC 1`_, `RFC 2`_)
Expand Down
6 changes: 3 additions & 3 deletions docs/amaranth/latest/contrib.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contributing &mdash; Amaranth HDL toolchain 0.4.dev236 documentation</title>
<title>Contributing &mdash; Amaranth HDL toolchain 0.4.dev237 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/platformpicker.css" type="text/css" />
Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=4dd90f0f"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=e9a18b16"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/platformpicker.js"></script>
Expand All @@ -37,7 +37,7 @@
Amaranth HDL toolchain
</a>
<div class="version">
0.4.dev236+g28e1d28.editable
0.4.dev237+g89d1c9b.editable
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
Loading

0 comments on commit 235bd18

Please sign in to comment.