Sun Aug 12 15:28:13 EDT 2018

Yosys 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 following description:

• 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
  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).

How to see what it detects?