From fc4d70486ac1090732a3813640ecc258d4e0ef9d Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 26 Nov 2023 03:39:26 +0000 Subject: [PATCH] docs/stdlib: write an introductory section. Co-authored-by: Wanda Co-authored-by: mcclure --- docs/stdlib.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/stdlib.rst b/docs/stdlib.rst index 6d084f6..1f3ab73 100644 --- a/docs/stdlib.rst +++ b/docs/stdlib.rst @@ -1,9 +1,13 @@ Standard library ################ -.. todo:: +The :mod:`amaranth.lib` module, also known as the standard library, provides modules that falls into one of the three categories: - Write this section. +1. Modules that will used by essentially all idiomatic Amaranth code, and are necessary for interoperability. This includes :mod:`amaranth.lib.enum` (enumerations), :mod:`amaranth.lib.data` (data structures), and :mod:`amaranth.lib.wiring` (interfaces and components). +2. Modules that abstract common functionality whose implementation differs between hardware platforms. This includes :mod:`amaranth.lib.cdc`. +3. Modules that have essentially one correct implementation and are of broad utility in digital designs. This includes :mod:`amaranth.lib.coding`, :mod:`amaranth.lib.fifo`, and :mod:`amaranth.lib.crc`. + +The Amaranth standard library is separate from the Amaranth language: everything provided in it could have been implemented in a third-party library. .. toctree:: :maxdepth: 2 @@ -11,7 +15,7 @@ Standard library stdlib/enum stdlib/data stdlib/wiring - stdlib/coding stdlib/cdc - stdlib/crc + stdlib/coding stdlib/fifo + stdlib/crc