docs: cover amaranth.lib.coding.
This commit is contained in:
parent
25163364d8
commit
3a8cd63b23
5 changed files with 50 additions and 7 deletions
|
|
@ -12,6 +12,8 @@ extensions = [
|
|||
"sphinx.ext.intersphinx",
|
||||
"sphinx.ext.doctest",
|
||||
"sphinx.ext.todo",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx_rtd_theme",
|
||||
"sphinxcontrib.platformpicker",
|
||||
]
|
||||
|
|
@ -25,6 +27,10 @@ intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
|
|||
|
||||
todo_include_todos = True
|
||||
|
||||
napoleon_google_docstring = False
|
||||
napoleon_numpy_docstring = True
|
||||
napoleon_use_ivar = True
|
||||
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_static_path = ["_static"]
|
||||
html_css_files = ["custom.css"]
|
||||
|
|
|
|||
|
|
@ -13,3 +13,4 @@ Language & toolchain
|
|||
start
|
||||
tutorial
|
||||
lang
|
||||
stdlib
|
||||
|
|
|
|||
11
docs/stdlib.rst
Normal file
11
docs/stdlib.rst
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Standard library
|
||||
################
|
||||
|
||||
.. todo::
|
||||
|
||||
Write this section.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
stdlib/coding
|
||||
27
docs/stdlib/coding.rst
Normal file
27
docs/stdlib/coding.rst
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
Code conversion
|
||||
###############
|
||||
|
||||
.. py:module:: amaranth.lib.coding
|
||||
|
||||
The ``amaranth.lib.coding`` package provides modules for conversion between different encodings of binary numbers.
|
||||
|
||||
|
||||
One-hot coding
|
||||
==============
|
||||
|
||||
.. autoclass:: Encoder()
|
||||
.. autoclass:: Decoder()
|
||||
|
||||
|
||||
Priority coding
|
||||
===============
|
||||
|
||||
.. autoclass:: PriorityEncoder()
|
||||
.. autoclass:: PriorityDecoder()
|
||||
|
||||
|
||||
Gray coding
|
||||
===========
|
||||
|
||||
.. autoclass:: GrayEncoder()
|
||||
.. autoclass:: GrayDecoder()
|
||||
Loading…
Add table
Add a link
Reference in a new issue