Skip to content

Commit

Permalink
Docs: Less leading backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed May 27, 2024
1 parent 8aba51d commit d86bdaf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/source/using_yosys/synthesis/fsm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@ FSM detection
~~~~~~~~~~~~~

The `fsm_detect` pass identifies FSM state registers. It sets the
``\fsm_encoding = "auto"`` attribute on any (multi-bit) wire that matches the
``fsm_encoding = "auto"`` attribute on any (multi-bit) wire that matches the
following description:

- Does not already have the ``\fsm_encoding`` attribute.
- Does not already have the ``fsm_encoding`` attribute.
- Is not an output of the containing module.
- Is driven by single `$dff` or `$adff` cell.
- The ``\D``-Input of this `$dff` or `$adff` cell is driven by a multiplexer
- The ``D``-Input of this `$dff` or `$adff` cell is driven by a multiplexer
tree that only has constants or the old state value on its leaves.
- The state value is only used in the said multiplexer tree or by simple
relational cells that compare the state value to a constant (usually `$eq`
cells).

This heuristic has proven to work very well. It is possible to overwrite it by
setting ``\fsm_encoding = "auto"`` on registers that should be considered FSM
state registers and setting ``\fsm_encoding = "none"`` on registers that match
setting ``fsm_encoding = "auto"`` on registers that should be considered FSM
state registers and setting ``fsm_encoding = "none"`` on registers that match
the above criteria but should not be considered FSM state registers.

Note however that marking state registers with ``\fsm_encoding`` that are not
Note however that marking state registers with ``fsm_encoding`` that are not
suitable for FSM recoding can cause synthesis to fail or produce invalid
results.

FSM extraction
~~~~~~~~~~~~~~

The `fsm_extract` pass operates on all state signals marked with the
(``\fsm_encoding != "none"``) attribute. For each state signal the following
(``fsm_encoding != "none"``) attribute. For each state signal the following
information is determined:

- The state registers
Expand Down Expand Up @@ -109,7 +109,7 @@ The `fsm_opt` pass performs basic optimizations on `$fsm` cells (not including
state recoding). The following optimizations are performed (in this order):

- Unused control outputs are removed from the `$fsm` cell. The attribute
``\unused_bits`` (that is usually set by the `opt_clean` pass) is used to
``unused_bits`` (that is usually set by the `opt_clean` pass) is used to
determine which control outputs are unused.

- Control inputs that are connected to the same driver are merged.
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 @@ -196,7 +196,7 @@ Removing unused cells and wires - `opt_clean` pass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This pass identifies unused signals and cells and removes them from the design.
It also creates an ``\unused_bits`` attribute on wires with unused bits. This
It also creates an ``unused_bits`` attribute on wires with unused bits. This
attribute can be used for debugging or by other optimization passes.

When to use `opt` or `clean`
Expand Down

0 comments on commit d86bdaf

Please sign in to comment.