Skip to content

Commit

Permalink
Docs: Update for properties
Browse files Browse the repository at this point in the history
Add properties page, move cell_gate and cell_word under a singular cell_index along with properties.  Fix links accordingly.

Also drop x-aware and x-output todos since they are resolved.
  • Loading branch information
KrystalDelusion committed Sep 6, 2024
1 parent 831e108 commit 4803af0
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/source/appendix/rtlil_text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ Cells
Declares a cell, with zero or more attributes, with the given identifier and
type in the enclosing module.

Cells perform functions on input signals. See :doc:`/cell_gate` and
:doc:`/cell_word` for a detailed list of cell types.
Cells perform functions on input signals. See :doc:`/cell_index` for a detailed
list of cell types.

.. code:: BNF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ The combinatorial logic cells can be mapped to physical cells from a Liberty
file via ABC using the abc pass.

.. toctree::
:caption: Gate-level cells
:maxdepth: 2

/cell/gate_comb_simple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Simulation models for the RTL cells can be found in the file

.. toctree::
:maxdepth: 2
:glob:

/cell/word_unary
/cell/word_binary
Expand Down
18 changes: 18 additions & 0 deletions docs/source/cell/properties.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Cell properties
---------------

.. TODO:: Fill :cell:ref:`is_evaluable`

.. cell:defprop:: is_evaluable
.. cell:defprop:: x-aware
Some passes will treat these cells as the non 'x' aware cell. For example,
during synthesis `$eqx` will typically be treated as `$eq`.

.. cell:defprop:: x-output
These cells can produce 'x' output even if all inputs are defined. For
example, a `$div` cell with ``B=0`` has undefined output.

Refer to the :ref:`propindex` for the list of cells with a given property.
10 changes: 0 additions & 10 deletions docs/source/cell/word_binary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ Binary operators

.. TODO:: display cell titles

.. todo:: 'x' aware warning

some passes will treat cell as the non 'x' aware cell, i.e. synthesis; `$eqx`
`$nex` `$bweqx`

.. todo:: 'x' output

shiftx, div, mod, pmux (less-so) can produce 'x' output even if all inputs
are defined

All binary RTL cells have two input ports ``A`` and ``B`` and one output port
``Y``. They also have the following parameters:

Expand Down
11 changes: 11 additions & 0 deletions docs/source/cell_index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Internal cell library
=====================

.. todo:: brief overview of internal cell library

.. toctree::
:maxdepth: 2

/cell/index_word
/cell/index_gate
/cell/properties
3 changes: 1 addition & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ available, go to :ref:`commandindex`.

bib

cell_word
cell_gate
cell_index
cmd_ref
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ displayed as rectangles with inputs on the left and outputs on the right side.
The cell labels are two lines long: The first line contains a unique identifier
for the cell and the second line contains the cell type. Internal cell types are
prefixed with a dollar sign. For more details on the internal cell library, see
:doc:`/cell_gate` and :doc:`/cell_word`.
:doc:`/cell_index`.

Constants are shown as ellipses with the constant value as label. The syntax
``<bit_width>'<bits>`` is used for constants that are not 32-bit wide and/or
Expand Down
2 changes: 1 addition & 1 deletion docs/source/using_yosys/synthesis/opt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Constant folding and simple expression rewriting - `opt_expr`
.. todo:: unsure if this is too much detail and should be in :doc:`/yosys_internals/index`

This pass performs constant folding on the internal combinational cell types
described in :doc:`/cell_gate` and :doc:`/cell_word`. This means a cell with all
described in :doc:`/cell_index`. This means a cell with all
constant inputs is replaced with the constant value this cell drives. In some
cases this pass can also optimize cells with some constant inputs.

Expand Down

0 comments on commit 4803af0

Please sign in to comment.