Skip to content

Commit

Permalink
Deploying to main from @ amaranth-lang/amaranth@f2fdc41 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed Sep 18, 2024
1 parent 28b4525 commit ec2dd90
Show file tree
Hide file tree
Showing 40 changed files with 211 additions and 189 deletions.
12 changes: 11 additions & 1 deletion docs/amaranth/latest/_sources/changes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,20 @@ Platform integration changes
* Changed: the Gowin platform now uses ``nextpnr-himbaechel`` rather than ``nextpnr-gowin``.


Version 0.5.2 (unreleased)
Version 0.5.3 (unreleased)
==========================


Language changes
----------------

* Added: individual bits of the same signal can now be assigned from different modules or domains.


Version 0.5.2
=============


Standard library changes
------------------------

Expand Down
18 changes: 7 additions & 11 deletions docs/amaranth/latest/_sources/guide.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ If the name of a domain is not known upfront, the ``m.d["<domain>"] += ...`` syn

.. _lang-signalgranularity:

Every signal included in the target of an assignment becomes a part of the domain, or equivalently, *driven* by that domain. A signal can be either undriven or driven by exactly one domain; it is an error to add two assignments to the same signal to two different domains:
Every signal bit included in the target of an assignment becomes a part of the domain, or equivalently, *driven* by that domain. A signal bit can be either undriven or driven by exactly one domain; it is an error to add two assignments to the same signal bit to two different domains:

.. doctest::

Expand All @@ -949,19 +949,15 @@ Every signal included in the target of an assignment becomes a part of the domai
>>> m.d.sync += d.eq(0)
Traceback (most recent call last):
...
amaranth.hdl.dsl.SyntaxError: Driver-driver conflict: trying to drive (sig d) from d.sync, but it is already driven from d.comb
amaranth.hdl.dsl.SyntaxError: Driver-driver conflict: trying to drive (sig d) bit 0 from d.sync, but it is already driven from d.comb

.. note::

Clearly, Amaranth code that drives a single bit of a signal from two different domains does not describe a meaningful circuit. However, driving two different bits of a signal from two different domains does not inherently cause such a conflict. Would Amaranth accept the following code?
However, two different bits of a signal can be driven from two different domains without an issue:

.. code-block::
e = Signal(2)
m.d.comb += e[0].eq(0)
m.d.sync += e[1].eq(1)
.. testcode::

The answer is no. While this kind of code is occasionally useful, rejecting it greatly simplifies backends, simulators, and analyzers.
e = Signal(2)
m.d.comb += e[0].eq(1)
m.d.sync += e[1].eq(0)

In addition to assignments, :ref:`assertions <lang-assert>` and :ref:`debug prints <lang-print>` can be added using the same syntax.

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.6.0.dev56',
VERSION: '0.6.0.dev57',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
125 changes: 69 additions & 56 deletions docs/amaranth/latest/changes.html

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion docs/amaranth/latest/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,20 @@ Platform integration changes
* Changed: the Gowin platform now uses ``nextpnr-himbaechel`` rather than ``nextpnr-gowin``.


Version 0.5.2 (unreleased)
Version 0.5.3 (unreleased)
==========================


Language changes
----------------

* Added: individual bits of the same signal can now be assigned from different modules or domains.


Version 0.5.2
=============


Standard library changes
------------------------

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="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contributing &mdash; Amaranth language &amp; toolchain 0.6.0.dev56 documentation</title>
<title>Contributing &mdash; Amaranth language &amp; toolchain 0.6.0.dev57 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
Expand All @@ -17,7 +17,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=6de5cc12"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=c99d480b"></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 @@ -40,7 +40,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.6.0.dev56
0.6.0.dev57
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions docs/amaranth/latest/cover.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Amaranth project documentation &mdash; Amaranth language &amp; toolchain 0.6.0.dev56 documentation</title>
<title>Amaranth project documentation &mdash; Amaranth language &amp; toolchain 0.6.0.dev57 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
Expand All @@ -17,7 +17,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=6de5cc12"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=c99d480b"></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 @@ -40,7 +40,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.6.0.dev56
0.6.0.dev57
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions docs/amaranth/latest/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; Amaranth language &amp; toolchain 0.6.0.dev56 documentation</title>
<title>Index &mdash; Amaranth language &amp; toolchain 0.6.0.dev57 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
Expand All @@ -16,7 +16,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=6de5cc12"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=c99d480b"></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 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.6.0.dev56
0.6.0.dev57
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
22 changes: 9 additions & 13 deletions docs/amaranth/latest/guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Language guide &mdash; Amaranth language &amp; toolchain 0.6.0.dev56 documentation</title>
<title>Language guide &mdash; Amaranth language &amp; toolchain 0.6.0.dev57 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
Expand All @@ -17,7 +17,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=6de5cc12"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=c99d480b"></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 @@ -41,7 +41,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.6.0.dev56
0.6.0.dev57
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -985,25 +985,21 @@ <h3>Signal shapes<a class="headerlink" href="#signal-shapes" title="Permalink to
<span class="n">add_toggle</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
</pre></div>
</div>
<p id="lang-signalgranularity">Every signal included in the target of an assignment becomes a part of the domain, or equivalently, <em>driven</em> by that domain. A signal can be either undriven or driven by exactly one domain; it is an error to add two assignments to the same signal to two different domains:</p>
<p id="lang-signalgranularity">Every signal bit included in the target of an assignment becomes a part of the domain, or equivalently, <em>driven</em> by that domain. A signal bit can be either undriven or driven by exactly one domain; it is an error to add two assignments to the same signal bit to two different domains:</p>
<div class="highlight-pycon notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">Signal</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">comb</span> <span class="o">+=</span> <span class="n">d</span><span class="o">.</span><span class="n">eq</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">sync</span> <span class="o">+=</span> <span class="n">d</span><span class="o">.</span><span class="n">eq</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gt">Traceback (most recent call last):</span>
<span class="w"> </span><span class="c">...</span>
<span class="gr">amaranth.hdl.dsl.SyntaxError</span>: <span class="n">Driver-driver conflict: trying to drive (sig d) from d.sync, but it is already driven from d.comb</span>
<span class="gr">amaranth.hdl.dsl.SyntaxError</span>: <span class="n">Driver-driver conflict: trying to drive (sig d) bit 0 from d.sync, but it is already driven from d.comb</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Clearly, Amaranth code that drives a single bit of a signal from two different domains does not describe a meaningful circuit. However, driving two different bits of a signal from two different domains does not inherently cause such a conflict. Would Amaranth accept the following code?</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">e</span> <span class="o">=</span> <span class="n">Signal</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="n">m</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">comb</span> <span class="o">+=</span> <span class="n">e</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">eq</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="n">m</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">sync</span> <span class="o">+=</span> <span class="n">e</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">eq</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<p>However, two different bits of a signal can be driven from two different domains without an issue:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">e</span> <span class="o">=</span> <span class="n">Signal</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="n">m</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">comb</span> <span class="o">+=</span> <span class="n">e</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">eq</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="n">m</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">sync</span> <span class="o">+=</span> <span class="n">e</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">eq</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
<p>The answer is no. While this kind of code is occasionally useful, rejecting it greatly simplifies backends, simulators, and analyzers.</p>
</div>
<p>In addition to assignments, <a class="reference internal" href="#lang-assert"><span class="std std-ref">assertions</span></a> and <a class="reference internal" href="#lang-print"><span class="std std-ref">debug prints</span></a> can be added using the same syntax.</p>
</section>
<section id="assignment-order">
Expand Down
18 changes: 7 additions & 11 deletions docs/amaranth/latest/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ If the name of a domain is not known upfront, the ``m.d["<domain>"] += ...`` syn

.. _lang-signalgranularity:

Every signal included in the target of an assignment becomes a part of the domain, or equivalently, *driven* by that domain. A signal can be either undriven or driven by exactly one domain; it is an error to add two assignments to the same signal to two different domains:
Every signal bit included in the target of an assignment becomes a part of the domain, or equivalently, *driven* by that domain. A signal bit can be either undriven or driven by exactly one domain; it is an error to add two assignments to the same signal bit to two different domains:

.. doctest::

Expand All @@ -949,19 +949,15 @@ Every signal included in the target of an assignment becomes a part of the domai
>>> m.d.sync += d.eq(0)
Traceback (most recent call last):
...
amaranth.hdl.dsl.SyntaxError: Driver-driver conflict: trying to drive (sig d) from d.sync, but it is already driven from d.comb
amaranth.hdl.dsl.SyntaxError: Driver-driver conflict: trying to drive (sig d) bit 0 from d.sync, but it is already driven from d.comb

.. note::

Clearly, Amaranth code that drives a single bit of a signal from two different domains does not describe a meaningful circuit. However, driving two different bits of a signal from two different domains does not inherently cause such a conflict. Would Amaranth accept the following code?
However, two different bits of a signal can be driven from two different domains without an issue:

.. code-block::
e = Signal(2)
m.d.comb += e[0].eq(0)
m.d.sync += e[1].eq(1)
.. testcode::

The answer is no. While this kind of code is occasionally useful, rejecting it greatly simplifies backends, simulators, and analyzers.
e = Signal(2)
m.d.comb += e[0].eq(1)
m.d.sync += e[1].eq(0)

In addition to assignments, :ref:`assertions <lang-assert>` and :ref:`debug prints <lang-print>` can be added using the same syntax.

Expand Down
9 changes: 5 additions & 4 deletions docs/amaranth/latest/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Language &amp; toolchain &mdash; Amaranth language &amp; toolchain 0.6.0.dev56 documentation</title>
<title>Language &amp; toolchain &mdash; Amaranth language &amp; toolchain 0.6.0.dev57 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
Expand All @@ -17,7 +17,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=6de5cc12"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=c99d480b"></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 @@ -41,7 +41,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.6.0.dev56
0.6.0.dev57
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -189,7 +189,8 @@ <h1>Language &amp; toolchain<a class="headerlink" href="#language-toolchain" tit
<li class="toctree-l1"><a class="reference internal" href="changes.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="changes.html#documentation-for-past-releases">Documentation for past releases</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-6-0-unreleased">Version 0.6.0 (unreleased)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-5-2-unreleased">Version 0.5.2 (unreleased)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-5-3-unreleased">Version 0.5.3 (unreleased)</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-5-2">Version 0.5.2</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-5-1">Version 0.5.1</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-5-0">Version 0.5.0</a></li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#version-0-4-0">Version 0.4.0</a></li>
Expand Down
Loading

0 comments on commit ec2dd90

Please sign in to comment.