docs: begin building the documentation style guide.

This commit is contained in:
Catherine 2024-04-10 04:08:44 +00:00
parent 877a1062a6
commit 8c1c9f2d26
5 changed files with 48 additions and 13 deletions

View file

@ -875,7 +875,7 @@ class Value(metaclass=ABCMeta):
The shape of the result is the same as the shape of :py:`self`, even for unsigned values.
.. important::
.. warning::
In Python, :py:`~0` equals :py:`-1`. In Amaranth, :py:`~C(0)` equals :py:`C(1)`.
This is the only case where an Amaranth operator deviates from the Python operator

View file

@ -14,7 +14,7 @@ __all__ = ["FrozenMemory", "MemoryData", "Memory", "ReadPort", "WritePort", "Dum
@final
class FrozenMemory(Exception):
"""This exception is raised when a memory array is being modified after elaboration."""
"""Exception raised when a memory array is being modified after elaboration."""
@final
@ -194,7 +194,7 @@ class MemoryData:
value that can be used to read and write the selected memory row in a simulation testbench,
without having to create a memory port.
.. important::
.. tip::
Even in a simulation, the value returned by this function cannot be used in a module;
it can only be used with :py:`sim.get()` and :py:`sim.set()`.

View file

@ -689,7 +689,7 @@ class Signature(metaclass=SignatureMeta):
:class:`Signature` can be used as a base class to define :ref:`customized <wiring-customizing>`
signatures and interface objects.
.. important::
.. warning::
:class:`Signature` objects are immutable. Classes inheriting from :class:`Signature` must
ensure this remains the case when additional functionality is added.
@ -1143,7 +1143,7 @@ class PureInterface:
:meth:`Signature.create`, but it can also be used in any other context where an interface
object needs to be created without the overhead of defining a class for it.
.. important::
.. tip::
Any object can be an interface object; it only needs a :py:`signature` property containing
a compliant signature. It is **not** necessary to use :class:`PureInterface` in order to
@ -1678,7 +1678,7 @@ class Component(Elaboratable):
def signature(self):
"""The signature of the component.
.. important::
.. warning::
Do not override this property. Once a component is constructed, its :attr:`signature`
property must always return the same :class:`Signature` instance. The constructor