Flowchart Diagram

The Flowchart Diagram depicts HDL code logic information. From this diagram the user can determine the overall logic flow and code structure. Flowchart Diagrams are a must for HDL code documentation.

An example flowchart diagram is shown below.

Flowchart Diagrams can be generated for an entire component or a concurrent block of code.

The flowchart command provides options to control how Flowchart diagrams are generated. However, the flowchart command defaults are usually sufficient, so X-Amin provides a Quick Flowchart Diagram function.

To perform a Quick Flowchart on an entire component, select the component in the Components Window, press the right mouse button. On the Components popup menu, select Flowchart.

To set the flowchart command options when generating a Flowchart Diagram, select the component in the Components Window and use the Diagram menu (Diagram->Flowchart...) or the Flowchart icon in the Diagram toolbar. The Flowchart Diagram Options dialog will appear:

Block: Create a Flowchart 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.

Title: Specifies the Flowchart Diagram title. Windows are identified by their titles which must be unique. The default title is the component name.

 

flowchart Command

Flowchart diagrams can also be generated using the flowchart command entered in the GUI Command Entry box or on the command line in command-line mode. The flowchart command format is:

SYNTAX
 (void) flowchart
   [-block <#>]
   [-text]
   [-title <title>]
   [<namespace>...]
 (void) flowchart
   [-text]
   [-title <title>]
   <sig> [<sig>...]
   
ARGUMENTS
 -block <#>
   Create a flowchart 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 displayed in the lower-right corner
   of the window.
 -text In GUI mode, output results as text, not in a
   Flowchart Window. Ignored in command-line mode.
 -title <title>
   Specifies the Flowchart Diagram title. Windows are
   identified by their titles which must be unique.
   The default title is the component name (for a com­
   ponent Flowchart Diagram) or the signal name (for a
   signal Flowchart Diagram).
 <namespace>
   Produce a flowchart diagram for the specified
   namespace(s). If no namespaces are specified, pro­
   duce a flowchart diagram for the current scope.
 <sig> Produce a flowchart diagram for the specified sig­
   nal(s).

 

Interpreting a Flowchart Diagram

X-Amin's Flowchart diagram symbology is fairly standard. Decision blocks (If-statements) are represented as diamond shapes. Other statements are placed in process blocks which are drawn as rectangles. Each concurrent block (always/process or concurrent assign) for the HDL is depicted in its own flowchart branch. The "start" nodes for each flowchart branch contain a number which indicates which concurrent block in the HDL code the branch depicts.

 

Flowchart Diagram Customizations

The Flowchart Preferences page (Edit->Preferences or the Preferences icon in the Edit toolbar) provides numerous controls for configuring the appearance of Flowchart Diagrams. The Flowchart Preferences page is partitioned into 2 categories: General and Symbols.

The Flowchart General preferences page, shown below, controls the diagram layout, diagram content, and symbol style.

Include Process Triggers: Select this control to include in the diagram the events which cause a process 'Start' block to be triggered (such as a clock edge or reset assertion).

Terminate Branches to 'End' Symbol: Select this control to terminate all flowchart paths to an 'End' symbol. If not selected, all flowchart paths will terminate at the last process statement block.

Filled Symbols: Select this control to produce solid color flowchart symbols.

Shadowed Symbols: Select this control to produce a shadowing or 3-D effect on the flowchart symbols.

Horizontal Spacing: The number entered in this control specifies the horizontal distance between flowchart symbols.

Vertical Spacing: The number entered in this control specifies the vertical distance between flowchart symbols.

Max Text Length: The number entered in this control specifies how long a line of text should be within any decision or process symbol.

 

The Flowchart Symbols preferences page, shown below, controls the colors of the flowchart 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.