Skip to content

Commit c4370ef

Browse files
X-Illuminatiwhitequark
authored andcommitted
docs: change combinatorial to combinational
- Replace occurrences of combinatorial with combinational in docstrings - Replace occurrences of combinatorial with combinational in .rst files - Add note to contrib.rst to document the editorial decision from #1301
1 parent 08aaac9 commit c4370ef

File tree

9 files changed

+32
-31
lines changed

9 files changed

+32
-31
lines changed

amaranth/hdl/_ast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,14 +1986,14 @@ class Signal(Value, DUID, metaclass=_SignalMeta):
19861986
name this ``Signal`` is assigned to. If the empty string, then this ``Signal`` is treated
19871987
as private and is generally hidden from view.
19881988
init : int or integral Enum
1989-
Reset (synchronous) or default (combinatorial) value.
1989+
Reset (synchronous) or default (combinational) value.
19901990
When this ``Signal`` is assigned to in synchronous context and the corresponding clock
19911991
domain is reset, the ``Signal`` assumes the given value. When this ``Signal`` is unassigned
1992-
in combinatorial context (due to conditional assignments not being taken), the ``Signal``
1992+
in combinational context (due to conditional assignments not being taken), the ``Signal``
19931993
assumes its ``init`` value. Defaults to 0.
19941994
reset_less : bool
19951995
If ``True``, do not generate reset logic for this ``Signal`` in synchronous statements.
1996-
The ``init`` value is only used as a combinatorial default or as the initial value.
1996+
The ``init`` value is only used as a combinational default or as the initial value.
19971997
Defaults to ``False``.
19981998
attrs : dict
19991999
Dictionary of synthesis attributes.

amaranth/hdl/_cd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ClockDomain:
3535
----------
3636
clk : Signal, inout
3737
The clock for this domain. Can be driven or used to drive other signals (preferably
38-
in combinatorial context).
38+
in combinational context).
3939
rst : Signal or None, inout
4040
Reset signal for this domain. Can be driven or used to drive.
4141
"""

amaranth/hdl/_nir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ def comb_edges_to(self, bit):
768768

769769

770770
class Matches(Cell):
771-
"""A combinatorial cell performing a comparison like ``Value.matches``
771+
"""A combinational cell performing a comparison like ``Value.matches``
772772
(or, equivalently, a case condition).
773773
774774
Attributes

amaranth/lib/io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def __repr__(self):
296296

297297

298298
class Buffer(wiring.Component):
299-
"""A combinatorial I/O buffer.
299+
"""A combinational I/O buffer.
300300
301301
Parameters
302302
----------
@@ -309,7 +309,7 @@ class Buffer(wiring.Component):
309309
Created based on constructor arguments.
310310
"""
311311
class Signature(wiring.Signature):
312-
"""A signature of a combinatorial I/O buffer.
312+
"""A signature of a combinational I/O buffer.
313313
314314
Parameters
315315
----------
@@ -665,7 +665,7 @@ class Pin(wiring.PureInterface):
665665
If ``"io"`` is specified, both the ``i``/``iN`` and ``o``/``oN`` signals are present, and
666666
an ``oe`` signal is present.
667667
xdr : int
668-
Gearbox ratio. If equal to 0, the I/O buffer is combinatorial, and only ``i``/``o``
668+
Gearbox ratio. If equal to 0, the I/O buffer is combinational, and only ``i``/``o``
669669
signals are present. If equal to 1, the I/O buffer is SDR, and only ``i``/``o`` signals are
670670
present. If greater than 1, the I/O buffer includes a gearbox, and ``iN``/``oN`` signals
671671
are present instead, where ``N in range(0, N)``. For example, if ``xdr=2``, the I/O buffer

amaranth/sim/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def advance(self):
183183
"""Advance the simulation.
184184
185185
Run every process and commit changes until a fixed point is reached, then advance time
186-
to the closest deadline (if any). If there is an unstable combinatorial loop,
186+
to the closest deadline (if any). If there is an unstable combinational loop,
187187
this function will never return.
188188
189189
Returns ``True`` if there are any active processes, ``False`` otherwise.

docs/contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Some of the formatting guidelines are:
136136
* For properties, phrase the short description (first line of docstring) like ``Value of thing.``, i.e. as a declarative sentence.
137137
* When documenting signatures of interfaces, as well as components, use the (non-standard) `Members` section to document their interface members, and only that section; do not document them in an `Attributes` section.
138138
* If an anchor for a section is needed, namespace it, e.g. the ``.. _lang-assignable:`` anchor is a part of the ``lang`` namespace. Anchor names are global.
139+
* To refer to non-sequential logic, use the term "combinational" over "combinatorial".
139140

140141

141142
Contributing your changes

docs/guide.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Signals
342342
.. |emph:assigned| replace:: *assigned*
343343
.. _emph:assigned: #lang-assigns
344344

345-
A *signal* is a value representing a (potentially) varying number. Signals can be |emph:assigned|_ in a :ref:`combinatorial <lang-comb>` or :ref:`synchronous <lang-sync>` domain, in which case they are generated as wires or registers, respectively. Signals always have a well-defined value; they cannot be uninitialized or undefined.
345+
A *signal* is a value representing a (potentially) varying number. Signals can be |emph:assigned|_ in a :ref:`combinational <lang-comb>` or :ref:`synchronous <lang-sync>` domain, in which case they are generated as wires or registers, respectively. Signals always have a well-defined value; they cannot be uninitialized or undefined.
346346

347347

348348
Signal shapes
@@ -403,7 +403,7 @@ Initial signal values
403403

404404
Each signal has an *initial value*, specified with the ``init=`` parameter. If the initial value is not specified explicitly, zero is used by default. An initial value can be specified with an integer or an enumeration member.
405405

406-
Signals :ref:`assigned <lang-assigns>` in a :ref:`combinatorial <lang-comb>` domain assume their initial value when none of the assignments are :ref:`active <lang-active>`. Signals assigned in a :ref:`synchronous <lang-sync>` domain assume their initial value after *power-on reset* and, unless the signal is :ref:`reset-less <lang-resetless>`, *explicit reset*. Signals that are used but never assigned are equivalent to constants of their initial value.
406+
Signals :ref:`assigned <lang-assigns>` in a :ref:`combinational <lang-comb>` domain assume their initial value when none of the assignments are :ref:`active <lang-active>`. Signals assigned in a :ref:`synchronous <lang-sync>` domain assume their initial value after *power-on reset* and, unless the signal is :ref:`reset-less <lang-resetless>`, *explicit reset*. Signals that are used but never assigned are equivalent to constants of their initial value.
407407

408408
.. doctest::
409409

@@ -422,7 +422,7 @@ Reset-less signals
422422

423423
Signals assigned in a :ref:`synchronous <lang-sync>` domain can be *resettable* or *reset-less*, specified with the ``reset_less=`` parameter. If the parameter is not specified, signals are resettable by default. Resettable signals assume their :ref:`initial value <lang-initial>` on explicit reset, which can be asserted via the :ref:`clock domain <lang-clockdomains>` or by :ref:`modifying control flow <lang-controlinserter>` with :class:`ResetInserter`. Reset-less signals are not affected by explicit reset.
424424

425-
Signals assigned in a :ref:`combinatorial <lang-comb>` domain are not affected by the ``reset_less`` parameter.
425+
Signals assigned in a :ref:`combinational <lang-comb>` domain are not affected by the ``reset_less`` parameter.
426426

427427
.. doctest::
428428

@@ -845,11 +845,11 @@ Control domains
845845

846846
A *control domain* is a named group of :ref:`signals <lang-signals>` that change their value in identical conditions.
847847

848-
All designs have a single predefined *combinatorial domain*, containing all signals that change immediately when any value used to compute them changes. The name ``comb`` is reserved for the combinatorial domain, and refers to the same domain in all modules.
848+
All designs have a single predefined *combinational domain*, containing all signals that change immediately when any value used to compute them changes. The name ``comb`` is reserved for the combinational domain, and refers to the same domain in all modules.
849849

850850
A design can also have any amount of user-defined *synchronous domains*, also called :ref:`clock domains <lang-clockdomains>`, containing signals that change when a specific edge occurs on the domain's clock signal or, for domains with asynchronous reset, on the domain's reset signal. Most modules only use a single synchronous domain, conventionally called ``sync``, but the name ``sync`` does not have to be used, and lacks any special meaning beyond being the default.
851851

852-
The behavior of assignments differs for signals in :ref:`combinatorial <lang-comb>` and :ref:`synchronous <lang-sync>` domains. Collectively, signals in synchronous domains contain the state of a design, whereas signals in the combinatorial domain cannot form feedback loops or hold state.
852+
The behavior of assignments differs for signals in :ref:`combinational <lang-comb>` and :ref:`synchronous <lang-sync>` domains. Collectively, signals in synchronous domains contain the state of a design, whereas signals in the combinational domain cannot form feedback loops or hold state.
853853

854854

855855
.. _lang-assigns:
@@ -980,7 +980,7 @@ If multiple assignments change the value of the same signal bits, the assignment
980980
b = Signal(9)
981981
m.d.comb += b.eq(Cat(C(4, 3), C(6, 3), C(3, 3)))
982982

983-
Multiple assignments to the same signal bits are more useful when combined with control structures, which can make some of the assignments :ref:`active or inactive <lang-active>`. If all assignments to some signal bits are :ref:`inactive <lang-active>`, their final values are determined by the signal's domain, :ref:`combinatorial <lang-comb>` or :ref:`synchronous <lang-sync>`.
983+
Multiple assignments to the same signal bits are more useful when combined with control structures, which can make some of the assignments :ref:`active or inactive <lang-active>`. If all assignments to some signal bits are :ref:`inactive <lang-active>`, their final values are determined by the signal's domain, :ref:`combinational <lang-comb>` or :ref:`synchronous <lang-sync>`.
984984

985985

986986
.. _lang-control:
@@ -1227,10 +1227,10 @@ Note that in Python, assignments made using :py:`with x() as y:` syntax persist
12271227

12281228
.. _lang-comb:
12291229

1230-
Combinatorial evaluation
1230+
Combinational evaluation
12311231
========================
12321232

1233-
Signals in the combinatorial :ref:`control domain <lang-domains>` change whenever any value used to compute them changes. The final value of a combinatorial signal is equal to its :ref:`initial value <lang-initial>` updated by the :ref:`active assignments <lang-active>` in the :ref:`assignment order <lang-assignorder>`. Combinatorial signals cannot hold any state.
1233+
Signals in the combinational :ref:`control domain <lang-domains>` change whenever any value used to compute them changes. The final value of a combinational signal is equal to its :ref:`initial value <lang-initial>` updated by the :ref:`active assignments <lang-active>` in the :ref:`assignment order <lang-assignorder>`. Combinational signals cannot hold any state.
12341234

12351235
Consider the following code:
12361236

@@ -1248,11 +1248,11 @@ Consider the following code:
12481248

12491249
Whenever the signals ``en`` or ``b`` change, the signal ``a`` changes as well. If ``en`` is false, the final value of ``a`` is its initial value, ``1``. If ``en`` is true, the final value of ``a`` is equal to ``b + 1``.
12501250

1251-
A combinatorial signal that is computed directly or indirectly based on its own value is a part of a *combinatorial feedback loop*, sometimes shortened to just *feedback loop*. Combinatorial feedback loops can be stable (e.g. implement a constant driver or a transparent latch), or unstable (e.g. implement a ring oscillator). Amaranth prohibits using assignments to describe any kind of a combinatorial feedback loop, including transparent latches.
1251+
A combinational signal that is computed directly or indirectly based on its own value is a part of a *combinational feedback loop*, sometimes shortened to just *feedback loop*. Combinational feedback loops can be stable (e.g. implement a constant driver or a transparent latch), or unstable (e.g. implement a ring oscillator). Amaranth prohibits using assignments to describe any kind of a combinational feedback loop, including transparent latches.
12521252

12531253
.. note::
12541254

1255-
In the exceedingly rare case when a combinatorial feedback loop is desirable, it is possible to implement it by directly instantiating technology primitives (e.g. device-specific LUTs or latches). This is also the only way to introduce a combinatorial feedback loop with well-defined behavior in simulation and synthesis, regardless of the HDL being used.
1255+
In the exceedingly rare case when a combinational feedback loop is desirable, it is possible to implement it by directly instantiating technology primitives (e.g. device-specific LUTs or latches). This is also the only way to introduce a combinational feedback loop with well-defined behavior in simulation and synthesis, regardless of the HDL being used.
12561256

12571257

12581258
.. _lang-sync:
@@ -1308,9 +1308,9 @@ Assertions may be nested within a :ref:`control block <lang-control>`:
13081308

13091309
.. warning::
13101310

1311-
While is is also possible to add assertions to the :ref:`combinatorial domain <lang-comb>`, simulations of combinatorial circuits may have *glitches*: instantaneous, transient changes in the values of expressions that are being computed which do not affect the result of the computation (and are not visible in most waveform viewers for that reason). Depending on the tools used for simulation, a glitch in the condition of an assertion or of a :ref:`control block <lang-control>` that contains it may cause the simulation to be terminated, even if the glitch would have been instantaneously resolved afterwards.
1311+
While is is also possible to add assertions to the :ref:`combinational domain <lang-comb>`, simulations of combinational circuits may have *glitches*: instantaneous, transient changes in the values of expressions that are being computed which do not affect the result of the computation (and are not visible in most waveform viewers for that reason). Depending on the tools used for simulation, a glitch in the condition of an assertion or of a :ref:`control block <lang-control>` that contains it may cause the simulation to be terminated, even if the glitch would have been instantaneously resolved afterwards.
13121312

1313-
If the condition of an assertion is assigned in a synchronous domain, then it is safe to add that assertion in the combinatorial domain. For example, neither of the assertions in the example below will be violated due to glitches, regardless of which domain the :py:`ip` and :py:`booting` signals are driven by:
1313+
If the condition of an assertion is assigned in a synchronous domain, then it is safe to add that assertion in the combinational domain. For example, neither of the assertions in the example below will be violated due to glitches, regardless of which domain the :py:`ip` and :py:`booting` signals are driven by:
13141314

13151315
.. testcode::
13161316

@@ -1321,15 +1321,15 @@ Assertions may be nested within a :ref:`control block <lang-control>`:
13211321
with m.If(booting):
13221322
m.d.comb += Assert(ip_sync < 128)
13231323

1324-
Assertions should be added in a :ref:`synchronous domain <lang-sync>` when possible. In cases where it is not, such as if the condition is a signal that is assigned in a synchronous domain elsewhere, care should be taken while adding the assertion to the combinatorial domain.
1324+
Assertions should be added in a :ref:`synchronous domain <lang-sync>` when possible. In cases where it is not, such as if the condition is a signal that is assigned in a synchronous domain elsewhere, care should be taken while adding the assertion to the combinational domain.
13251325

13261326

13271327
.. _lang-print:
13281328

13291329
Debug printing
13301330
==============
13311331

1332-
The value of any expression, or of several of them, can be printed to the terminal during simulation using the :class:`Print` statement. When added to the :ref:`combinatorial domain <lang-comb>`, the value of an expression is printed whenever it changes:
1332+
The value of any expression, or of several of them, can be printed to the terminal during simulation using the :class:`Print` statement. When added to the :ref:`combinational domain <lang-comb>`, the value of an expression is printed whenever it changes:
13331333

13341334
.. testcode::
13351335

@@ -1537,7 +1537,7 @@ A non-Amaranth design unit can be added as a submodule using an :ref:`instance <
15371537
Modifying control flow
15381538
----------------------
15391539

1540-
Control flow within an elaboratable can be altered without introducing a new clock domain by using *control flow modifiers* that affect :ref:`synchronous evaluation <lang-sync>` of signals in a specified domain (or domains). They never affect :ref:`combinatorial evaluation <lang-comb>`. There are two control flow modifiers:
1540+
Control flow within an elaboratable can be altered without introducing a new clock domain by using *control flow modifiers* that affect :ref:`synchronous evaluation <lang-sync>` of signals in a specified domain (or domains). They never affect :ref:`combinational evaluation <lang-comb>`. There are two control flow modifiers:
15411541

15421542
* :class:`ResetInserter` introduces a synchronous reset input (or inputs), updating all of the signals in the specified domains to their :ref:`initial value <lang-initial>` whenever the active edge occurs on the clock of the domain *if* the synchronous reset input is asserted.
15431543
* :class:`EnableInserter` introduces a synchronous enable input (or inputs), preventing any of the signals in the specified domains from changing value whenever the active edge occurs on the clock of the domain *unless* the synchronous enable input is asserted.
@@ -1659,7 +1659,7 @@ The renaming of the ``sync`` clock domain in it causes the behavior of the final
16591659

16601660
.. warning::
16611661

1662-
A combinatorial signal can change synchronously to a clock domain, as in the example above, in which case it may only be sampled from the same clock domain unless explicitly synchronized. Renaming a clock domain must be assumed to potentially affect any output of an elaboratable.
1662+
A combinational signal can change synchronously to a clock domain, as in the example above, in which case it may only be sampled from the same clock domain unless explicitly synchronized. Renaming a clock domain must be assumed to potentially affect any output of an elaboratable.
16631663

16641664

16651665
.. _lang-memory:
@@ -1843,23 +1843,23 @@ An *I/O buffer instance* is a submodule that allows connecting :ref:`I/O values
18431843

18441844
m = Module()
18451845

1846-
In the input configuration, the buffer combinatorially drives a signal :py:`i` by the port:
1846+
In the input configuration, the buffer combinationally drives a signal :py:`i` by the port:
18471847

18481848
.. testcode::
18491849

18501850
port = IOPort(4)
18511851
port_i = Signal(4)
18521852
m.submodules += IOBufferInstance(port, i=port_i)
18531853

1854-
In the output configuration, the buffer combinatorially drives the port by a value :py:`o`:
1854+
In the output configuration, the buffer combinationally drives the port by a value :py:`o`:
18551855

18561856
.. testcode::
18571857

18581858
port = IOPort(4)
18591859
port_o = Signal(4)
18601860
m.submodules += IOBufferInstance(port, o=port_o)
18611861

1862-
In the tristatable output configuration, the buffer combinatorially drives the port by a value :py:`o` if :py:`oe` is asserted, and does not drive (leaves in a high-impedance state, or tristates) the port otherwise:
1862+
In the tristatable output configuration, the buffer combinationally drives the port by a value :py:`o` if :py:`oe` is asserted, and does not drive (leaves in a high-impedance state, or tristates) the port otherwise:
18631863

18641864
.. testcode::
18651865

@@ -1868,7 +1868,7 @@ In the tristatable output configuration, the buffer combinatorially drives the p
18681868
port_oe = Signal()
18691869
m.submodules += IOBufferInstance(port, o=port_o, oe=port_oe)
18701870

1871-
In the bidirectional (input/output) configuration, the buffer combiatorially drives a signal :py:`i` by the port, combinatorially drives the port by a value :py:`o` if :py:`oe` is asserted, and does not drive (leaves in a high-impedance state, or tristates) the port otherwise:
1871+
In the bidirectional (input/output) configuration, the buffer combinationally drives a signal :py:`i` by the port, combinationally drives the port by a value :py:`o` if :py:`oe` is asserted, and does not drive (leaves in a high-impedance state, or tristates) the port otherwise:
18721872

18731873
.. testcode::
18741874

0 commit comments

Comments
 (0)