The Flow Diagram depicts HDL code flow information. From this diagram the user can determine overall logic flow, signal dependencies, and code structure. Flow Diagrams make a nice addition to code documentation.
An example flow diagram is shown below.
]
Flow Diagrams can be generated for an entire component, but typically this proves to be too large to be of any real benefit. A better way to use Flow Diagrams is to produce a diagram for either a block of code or an individual signal. The former is useful for code structure and flow analysis while the latter is handy for signal dependency exploration.
The flow command provides options to control how Flow diagrams are generated. However, the flow command defaults are usually sufficient, so X-Amin provides a Quick Flow Diagram function.
To perform a Quick Flow on an entire component, select the component in the Components Window, press the right mouse button. On the Components popup menu, select Flow.
To perform a Quick Flow on a particular signal, select the component in the Components Window, then select the signal in the Signals window and press the right mouse button. On the Signals popup menu, select Flow.
To set the flow command options when generating a Flow Diagram, select the component in the Components Window (and, optionally, the signal in the Signals Window) and use the Diagram menu (Diagram->Flow...) or the Flow icon
in the Diagram toolbar. The Flow Diagram Options dialog will appear:

Block: Create a Flow Diagram for the concurrent block number specified. The concurrent block number can be found in the HDL Editor window by placing the cursor on the desired concurrent block. The block number will be display in the lower-right corner of the window.
Direction: This control is only applicable when producing a Flow diagram for a signal. This control specifies the flow directions associated with the signal that should be displayed. 'In' indicates that only flows driving the signal should be displayed. 'Out' specifies that only flows that are driven by the signal should be displayed.
Title: Specifies the Flow Diagram title. Windows are identified by their titles which must be unique. The default title is the component name (for a component Flow Diagram) or the signal name (for a signal Flow Diagram).
flow Command
Flow Diagrams can also be generated using the flow command entered in the GUI Command Entry box or on the command line in command-line mode. The flow command format is:
SYNTAX (void) flow [-block <#>] [-text] [-title <title>] [<namespace>...]
(void) flow [-full] [-in | -out | -both] [-text] [-title <title] <sig> [<sig>...]
ARGUMENTS -block <#> Create a flow diagram for the concurrent block num ber specified. The concurrent block number can be found in the HDL Editor window by placing the cur sor on the desired concurrent block. The block num ber will be displayed in the lower-right corner of the window.
-full Trace the full path. By default, signal flow trac ing stops when an identifier is encountered. The -full option will cause flow tracing to include paths tracing to continue through the identifier node.
-in | -out | -both This control is only applicable when producing a Flow diagram for a signal. This control specifies the flow directions associated with the signal that should be displayed. -in indicates that only flows driving the signal should be displayed. -out speci fies that only flows that are driven by the signal should be displayed. The default is -both.
-text In GUI mode, output results as text, not in a Flow Window. Ignored in command-line mode.
-title <title> Specifies the Flow Diagram title. Windows are iden tified by their titles which must be unique. The default title is the component name (for a compo nent Flow Diagram) or the signal name (for a signal Flow Diagram).
<namespace> Produce a flow diagram for the specified names pace(s). If no namespaces are specified, produce a flow diagram for the current scope.
<sig> Produce a flow diagram for the specified signal(s).
Interpreting a Flow Diagram
Flow diagrams consist of nodes representing identifiers, constants, operations, control structures and language blocks. Edges entering or leaving a node represent the flow of information or processing. In the cases where a node has multiple edges leaving it, such as an IF node, the edges are drawn in different colors to identify them.
Referring to the flow diagram, above, the processing starts on the left side at the 'always' node toward the 'ns' node on the right side. Identifier nodes are red, operator nodes are blue, and control structure/block nodes are green. The 'if' nodes have both red and blue out flow edges. The red represents the 'then' processing path, the blue represents the 'else' processing path. Range node and operand nodes can also be configured to have their multiple input flows colored uniquely.
When the Context Help icon
is enabled, the HDL source line of each diagram node is displayed when the mouse is hovered over the node.
Flow Diagram Customizations
The Flow Preferences page (Edit->Preferences or the Preferences icon
in the Edit toolbar) provides numerous controls for configuring the appearance of Flow Diagrams. The Flow Preferences page is partitioned into 3 categories: General, Symbols and Paths.
The Flow General preferences page, shown below, controls the diagram layout and symbol style.

Orientation: Flow diagrams can be oriented Left-to-Right or Top-to-Bottom
Filled Symbols: Select this control to produce solid color flow symbols.
Shadowed Symbols: Select this control to produce a shadowing or 3-D effect on the flow symbols.
Horizontal Spacing: The number entered in this control specifies the horizontal distance between flow symbols.
Vertical Spacing: The number entered in this control specifies the vertical distance between flow symbols.
The Flow Symbols preferences page, shown below, controls the colors of the flow symbols.

To change a symbol color, simply select the color button which will invoke the color dialog. From the color dialog select the desired color.
The Flow Paths preferences page, shown below, controls the colors of the flow paths.

To change a path color, simply select the color button which will invoke the color dialog. From the color dialog select the desired color.