Skip to content

Commit 51306af

Browse files
Deploying to main from @ amaranth-lang/amaranth@556faea 🚀
1 parent 1cf0046 commit 51306af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+172
-132
lines changed

docs/amaranth/latest/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: b0c116fbad02b7676203320ac0373e2e
3+
config: fd796875298760e672b38162de83eb59
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
1.54 KB
Binary file not shown.
-20 Bytes
Binary file not shown.

docs/amaranth/latest/_sources/guide.rst.txt

+31-9
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ Specifying a shape with a range is convenient for counters, indexes, and all oth
170170

171171
Python ranges are *exclusive* or *half-open*, meaning they do not contain their ``.stop`` element. Because of this, values with shapes cast from a ``range(stop)`` where ``stop`` is a power of 2 are not wide enough to represent ``stop`` itself:
172172

173+
.. doctest::
174+
:hide:
175+
176+
>>> import warnings
177+
>>> _warning_filters_backup = warnings.catch_warnings()
178+
>>> _warning_filters_backup.__enter__() # have to do this horrific hack to make it work with `PYTHONWARNINGS=error` :(
179+
>>> warnings.simplefilter("default", amaranth.hdl._ast.SyntaxWarning)
180+
173181
.. doctest::
174182

175183
>>> fencepost = C(256, range(256))
@@ -180,6 +188,11 @@ Specifying a shape with a range is convenient for counters, indexes, and all oth
180188
>>> fencepost.value
181189
0
182190

191+
.. doctest::
192+
:hide:
193+
194+
>>> _warning_filters_backup.__exit__()
195+
183196
Amaranth detects uses of :class:`Const` and :class:`Signal` that invoke such an off-by-one error, and emits a diagnostic message.
184197

185198
.. note::
@@ -670,6 +683,14 @@ Python expression Amaranth expression (boolean operands)
670683

671684
When applied to Amaranth boolean values, the ``~`` operator computes negation, and when applied to Python boolean values, the ``not`` operator also computes negation. However, the ``~`` operator applied to Python boolean values produces an unexpected result:
672685

686+
.. doctest::
687+
:hide:
688+
689+
>>> import warnings
690+
>>> _warning_filters_backup = warnings.catch_warnings()
691+
>>> _warning_filters_backup.__enter__() # have to do this horrific hack to make it work with `PYTHONWARNINGS=error` :(
692+
>>> warnings.simplefilter("ignore", DeprecationWarning)
693+
673694
.. doctest::
674695

675696
>>> ~False
@@ -688,6 +709,11 @@ Python expression Amaranth expression (boolean operands)
688709
>>> ~use_stb | stb # WRONG! MSB of 2-bit wide OR expression is always 1
689710
(| (const 2'sd-2) (sig stb))
690711

712+
.. doctest::
713+
:hide:
714+
715+
>>> _warning_filters_backup.__exit__()
716+
691717
Amaranth automatically detects some cases of misuse of ``~`` and emits a detailed diagnostic message.
692718

693719
.. TODO: this isn't quite reliable, #380
@@ -1372,14 +1398,14 @@ A new synchronous :ref:`control domain <lang-domains>`, which is more often call
13721398

13731399
.. testcode::
13741400

1375-
m.domains.video = cd_video = ClockDomain(local=True)
1401+
m.domains.video = cd_video = ClockDomain()
13761402

13771403
If the name of the domain is not known upfront, another, less concise, syntax can be used instead:
13781404

13791405
.. testcode::
13801406

13811407
def add_video_domain(n):
1382-
cd = ClockDomain(f"video_{n}", local=True)
1408+
cd = ClockDomain(f"video_{n}")
13831409
m.domains += cd
13841410
return cd
13851411

@@ -1393,22 +1419,18 @@ A clock domain always has a clock signal, which can be accessed through the :att
13931419

13941420
.. testcode::
13951421

1396-
m.domains.jtag = ClockDomain(clk_edge="neg", local=True)
1422+
m.domains.jtag = ClockDomain(clk_edge="neg")
13971423

13981424
A clock domain also has a reset signal, which can be accessed through the :attr:`cd.rst <ClockDomain.rst>` attribute. The reset signal is always active-high: the signals in the clock domain are reset if the value of the reset signal is 1. The :ref:`initial value <lang-initial>` of this signal is 0, so if the reset signal is never assigned, the signals in the clock domain are never explicitly reset (they are still :ref:`reset at power-on <lang-initial>`). Nevertheless, if its existence is undesirable, the clock domain can be configured to omit it:
13991425

14001426
.. testcode::
14011427

1402-
m.domains.startup = ClockDomain(reset_less=True, local=True)
1428+
m.domains.startup = ClockDomain(reset_less=True)
14031429

14041430
Signals in a reset-less clock domain can still be explicitly reset using the :class:`ResetInserter` :ref:`control flow modifier <lang-controlinserter>`.
14051431

14061432
If a clock domain is defined in a module, all of its :ref:`submodules <lang-submodules>` can refer to that domain under the same name.
14071433

1408-
.. warning::
1409-
1410-
Always provide the :py:`local=True` keyword argument when defining a clock domain. The behavior of clock domains defined without this keyword argument is subject to change in near future, and is intentionally left undocumented.
1411-
14121434
.. warning::
14131435

14141436
Clock domains use synchronous reset unless otherwise specified. Clock domains with asynchronous reset are implemented, but their behavior is subject to change in near future, and is intentionally left undocumented.
@@ -1447,7 +1469,7 @@ In this example, once the design is processed, the clock signal of the clock dom
14471469
14481470
.. testcode::
14491471

1450-
m.domains.sync = cd_sync = ClockDomain(local=True)
1472+
m.domains.sync = cd_sync = ClockDomain()
14511473
m.d.comb += [
14521474
cd_sync.clk.eq(bus_clk),
14531475
cd_sync.rst.eq(~bus_rstn),

docs/amaranth/latest/_sources/stdlib/io.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ In this example, a clock domain is created and driven from an external clock sou
106106
def elaborate(self, platform):
107107
m = Module()
108108

109-
m.domains.sync = cd_sync = ClockDomain(local=True)
109+
m.domains.sync = cd_sync = ClockDomain()
110110

111111
m.submodules.clk24 = clk24 = io.Buffer("i", platform.request("clk24", dir="-"))
112112
m.d.comb += cd_sync.clk.eq(clk24.i)

docs/amaranth/latest/_static/documentation_options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var DOCUMENTATION_OPTIONS = {
22
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3-
VERSION: '0.6.0.dev40',
3+
VERSION: '0.6.0.dev44',
44
LANGUAGE: 'en',
55
COLLAPSE_INDEX: false,
66
BUILDER: 'html',

docs/amaranth/latest/changes.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Changelog &mdash; Amaranth language &amp; toolchain 0.6.0.dev40 documentation</title>
7+
<title>Changelog &mdash; Amaranth language &amp; toolchain 0.6.0.dev44 documentation</title>
88
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
99
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
1010
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
@@ -17,7 +17,7 @@
1717

1818
<script src="_static/jquery.js?v=5d32c60e"></script>
1919
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
20-
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=66db0882"></script>
20+
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=9aaa1225"></script>
2121
<script src="_static/doctools.js?v=888ff710"></script>
2222
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
2323
<script src="_static/platformpicker.js"></script>
@@ -41,7 +41,7 @@
4141
<img src="_static/logo.png" class="logo" alt="Logo"/>
4242
</a>
4343
<div class="version">
44-
0.6.0.dev40
44+
0.6.0.dev44
4545
</div>
4646
<div role="search">
4747
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">

docs/amaranth/latest/contrib.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Contributing &mdash; Amaranth language &amp; toolchain 0.6.0.dev40 documentation</title>
7+
<title>Contributing &mdash; Amaranth language &amp; toolchain 0.6.0.dev44 documentation</title>
88
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
99
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
1010
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
@@ -17,7 +17,7 @@
1717

1818
<script src="_static/jquery.js?v=5d32c60e"></script>
1919
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
20-
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=66db0882"></script>
20+
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=9aaa1225"></script>
2121
<script src="_static/doctools.js?v=888ff710"></script>
2222
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
2323
<script src="_static/platformpicker.js"></script>
@@ -40,7 +40,7 @@
4040
<img src="_static/logo.png" class="logo" alt="Logo"/>
4141
</a>
4242
<div class="version">
43-
0.6.0.dev40
43+
0.6.0.dev44
4444
</div>
4545
<div role="search">
4646
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">

docs/amaranth/latest/cover.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Amaranth project documentation &mdash; Amaranth language &amp; toolchain 0.6.0.dev40 documentation</title>
7+
<title>Amaranth project documentation &mdash; Amaranth language &amp; toolchain 0.6.0.dev44 documentation</title>
88
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
99
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
1010
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
@@ -17,7 +17,7 @@
1717

1818
<script src="_static/jquery.js?v=5d32c60e"></script>
1919
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
20-
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=66db0882"></script>
20+
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=9aaa1225"></script>
2121
<script src="_static/doctools.js?v=888ff710"></script>
2222
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
2323
<script src="_static/platformpicker.js"></script>
@@ -40,7 +40,7 @@
4040
<img src="_static/logo.png" class="logo" alt="Logo"/>
4141
</a>
4242
<div class="version">
43-
0.6.0.dev40
43+
0.6.0.dev44
4444
</div>
4545
<div role="search">
4646
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">

docs/amaranth/latest/genindex.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Index &mdash; Amaranth language &amp; toolchain 0.6.0.dev40 documentation</title>
6+
<title>Index &mdash; Amaranth language &amp; toolchain 0.6.0.dev44 documentation</title>
77
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
88
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
99
<link rel="stylesheet" type="text/css" href="_static/platformpicker.css" />
@@ -16,7 +16,7 @@
1616

1717
<script src="_static/jquery.js?v=5d32c60e"></script>
1818
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
19-
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=66db0882"></script>
19+
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=9aaa1225"></script>
2020
<script src="_static/doctools.js?v=888ff710"></script>
2121
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
2222
<script src="_static/platformpicker.js"></script>
@@ -38,7 +38,7 @@
3838
<img src="_static/logo.png" class="logo" alt="Logo"/>
3939
</a>
4040
<div class="version">
41-
0.6.0.dev40
41+
0.6.0.dev44
4242
</div>
4343
<div role="search">
4444
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">

0 commit comments

Comments
 (0)