Standard library
The amaranth.lib
module, also known as the standard library, provides modules that falls into one of the three categories:
Modules that will used by essentially all idiomatic Amaranth code, and are necessary for interoperability. This includes
amaranth.lib.enum
(enumerations),amaranth.lib.data
(data structures), andamaranth.lib.wiring
(interfaces and components).Modules that abstract common functionality whose implementation differs between hardware platforms. This includes
amaranth.lib.cdc
.Modules that have essentially one correct implementation and are of broad utility in digital designs. This includes
amaranth.lib.coding
,amaranth.lib.fifo
, andamaranth.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.