Contact us Start a Trial

State machines diagram

The State Machines Diagram displays an auto-generated, immutable, graphical diagram of all state machines in your current Verilog or VHDL editor.

This diagram automatically updates while you are editing your code and offers a convenient way to visually inspect and navigate your code, even when it’s unfinished or broken.

You can open the State Machines Diagram by clicking the Sigasi logo Sigasi logo in the editor toolbar (top right) and selecting Open State Machines Diagram. Alternatively, you can open the diagram through the Code Lens or via the command palette ( Ctrl+Shift+P ) by typing Sigasi: Open State Machines Diagram.

State Machines Diagram 1-4
State Machines Diagram 5
  1. Reset state (dashed arrow): The state that will be assigned when the state machine is reset
  2. Unresolved state (dashed arrow to a ?): Sigasi found a state transition but cannot determine the end state
  3. Dead state (red outline): States that do not have any outgoing transitions
  4. State names: When a constant name is consistently used to refer to a state, its name will also be used in the diagram
  5. Unused state (red): States that are fully isolated and have no transitions

If you have documented your state transitions (i.e., the assignments), the comments will be added as text to the transitions in the diagram.

You can double-click states and transitions to navigate to the corresponding HDL code. Selecting transitions through a single click will highlight the corresponding transition in the Transitions Table when it’s open. To reveal states and transitions from your code in the state machines diagram: right-click the state or transition in the editor, select Show in… in the context menu, and then select State Machines in the pop-up menu. Show in… can also be accessed directly from the hover of a state or transition.

Show in... context menu option for an instantiation

Note that the state machines diagram is generated automatically from code, but it’s not possible to modify the diagram or generate code from it.

Buttons in the state machines diagram

  • Show/hide transitions’ code comments
  • Show/hide transition conditions
  • Automatically resizes the block diagram to fit in the current viewport
  • Save the diagram as an SVG. Other file formats are not supported