(VGUI - Graphical User Interface for Hardware Models)
Version 1.06a - December 3, 1999
When invoking VGUI from a command-line, the VGUI can accept a diagram file to be edited (or viewed) as a command-line argument. If no arguments are specified, it will assume you are going to open an existing file using the File menu or to create a new diagram which you would save to a file name of your choice by the save_as function.
Example:
vgui alu.dia
The VGUI source file must be a .dia file that was produced by the VGUI.
VHDL does not contain the geometric data needed for representing diagrams,
so the VGUI cannot read VHDL.
By default, the VGUI saves diagrams in a structural diagram language. This is necessary
to preserve the geometric information of diagrams.
The VGUI produces VHDL through the File/Export-VHDL menu.
If invoking VGUI by clicking on the VGUI icon under Microsoft Windows, an intermediate dialogue box will first pop up asking for a file name to edit, or whether to start a new drawing. Upon dismissing the opening dialogue, the VHDL will come up. In any case, you can always open a file by clicking File > Open > New File.
During editing, VGUI writes useful information to its status window. Under Microsoft Windows, the status window is a separate text-window that pops-up when VGUI is started. Under Unix/Linux, the shell-window from which VGUI was started serves as the status window. In either case, we recommend placing the status window underneath the main VGUI window, so as to be only partially obscured. This way, you will see any important information displayed in the text window. It is especially helpful for new users.
Nodes represent the building-block devices of your architecture, such as processor elements, IC-chips, and memories. A module is a super-node that represents a hierarchical grouping of sub-nodes. Links are the wires that connect nodes and modules to each other,
Notice that after adding an object, the VGUI is still in the add-object mode, so you can add several more nodes by simply placing the pointer and clicking. Try adding some more nodes.
After adding a new node, it has a default name. You can set the node-name by opening its properties. To select an object, VGUI must first be placed in the Select/Move mode by clicking on the Select/Move button of the Mode Palette. Then select a node with a click of the mouse. When you select an object, you will see the object highlighted by tick-marks. The node's properties are then opened by clicking on the Open Properties button on the left side under the Mode Palette. You will see a properties dialogue box appear. It contains fields for the relevant attributes of a node, such as the node name or instance-name, and the node type or type-name. Filling in the fields and clicking OK will set the node's attributes.
You can add links to connect the nodes by selecting the Add Link button on the left Mode Palette. To add a link, click and release at the spot where you want the link to attach from the source node. Then move the mouse to the destination node of the link and double-click. You will see the arc formed between the nodes. Again, notice that the VGUI remains in the Add Link mode, so you can continue adding new links quickly without returning to the menu, by simply clicking where you want the links to be.
A link does not need to be a straight line. To make a link turn corners, you can add vertices to the link either while you are entering a new link, or to an existing link. Vertices appear as tick-marks on a selected link. You can manipulate a link by dragging a vertex. To add a vertex while you are entering a link, click the mouse button once, where you want each vertex to be placed as you enter the link. You will see that segment of the link spider-web change from a dashed to a solid line segment. To add vertices to an existing link, select the Add-Vertices button on the left Mode Palette, then select the link you wish to add vertices to. You will see an additional vertex added to the selected link for each time you click on the link.
After adding a new link, you will want to set its parameters, such as the link's data-type, direction, and port names. You can set a link's attributes by selecting the link and opening it properties. To select a link, be sure to go into the Select/Move mode by clicking the Select/Move button on the Mode Palette at left. Then click on the link. You will see that it is selected by the tick-marks that appear on its vertices. Next click the Open Properties button under the Mode Palette. You will see a dialogue box appear for setting the link parameters.
The port names are significant for connecting the links to the respective ports of a device or module.
The direction may be one of: simplex, half-duplex, or full-duplex. Simplex means the link is uni-directional. Data may flow in only one direction ever. The first port is an output while the second is an input-only.
Half-duplex means the link is bi-directional, but data can only flow in one direction at a time. The ports on either end are of type: INOUT. This is typical for bus type connections. Common-bus signals should be set to half-duplex.
Full-duplex means that data can flow in both directions simultaneously. A full-duplex link is composed of two simplex links running in opposite directions. It is convenient to show such links as one line in diagrams. Full-duplex links are converted into pairs of simplex links in the generated VHDL or Verilog code.
In summary, the basic choices for link direction are: uni-directional and bi-directional. The bi-directional case is further sub-divided into half-duplex and full-duplex. The former consists of a single link capable of data flow in either direction at a time, and the latter consists of two links in opposite directions that can be used simultaneously. For consistency, the uni-directional case is called, simplex. Figure 3 illustrates the distinction between link directions visually.
The properties of one object can be quickly copied to another object by opening the properties of the first object, and then selecting the second object before closing the properties dialogue. The properties will be saved to whichever object is selected when the propery dialogue is accepted by the Ok button.
The properties of multiple objects can be set in a single operation by selecting a group of similar objects prior to opening the properties. (Either drag a stretch-line around the objects, or select them individually while holding-down the shift-key to add or remove objects from the selected group.) You can set some attribute fields while leaving others unchanged, by leaving the fields you do not wish to modify blank.
The saved VHDL or Verilog file will contain all the structural information contained in all the diagrams that are currently in the VGUI. That is, the full hierarchy of a hierarchical architecture will be saved in the VHDL or Verilog file. There is no need to traverse to a given diagram through the hierarchy prior to a save.
The Show Grid option toggles a background grid which is helpful while drawing.
The Toggle AspectRatio Lock option allows you to turn-off the aspect-ratio lock. The aspect-ratio lock forces the same scale in the horizontal and vertical dimensions after zooming. For example, this lock prevents you from setting a tall-narrow view of your architecture. Turning the lock off lets you zoom to such a view.
The default mode is to have the aspect-ratio lock on. Although it is often useful to turn the lock off for viewing very tall-and-narrow, or short-and-wide cross-sections of your drawings, we recommend that you keep the aspect-ratio lock on while drawing. The reason is because otherwise you may tend to create very tall-and-narrow or else very-squat drawings, without realizing it.
However, even if you should do this accidentally, remember that you can always re-establish or change the aspect-ratio of your drawing (or any section) by selecting all the objects, grabbing the tick mark on one of the four corners of the selected region, and then dragging. This will stretch all the selected objects together, while keeping all connections.
Note 1: When you rename a module-diagram that other modules pointed at (ie. Other diagrams contained module-boxes whose type-name matched the name of the diagram being changed.), there will no longer be a diagram definition for the old name, so those boxes will point to an empty diagram or be considered a leaf-device nodes. To make them point to the same diagram whose name has changed, change each instance to the new name. Alternately, this can be used as a convenient method for switching the definition of all of instances of a given module-type by a single operation.Note 2: The VGUI version for Microsoft-Windows/NT is currently somewhat feature-deficient. It does not have the ability to rename diagrams as the Unix/Linux versions do. An alternate method is to edit the diagram-file (.dia) directly with a text editor (outside of VGUI), by searching for the diagram-name you wish to change.
Note 3: If you rename the top_level diagram, then when you later re-open the file, VGUI will not know which module to show first, so it will open to an arbitrary module. However, you can move directly to any module at any time by selecting File / Open / Open a currently loaded diagram.
Locations on the drawing area, or canvas, are recorded as floating-point values. Because the VGUI is a graphical tool supported by a mouse, the user does not normally need to be concerned with the actual location values. However, some users may be interested in understanding more about the units that are used. You will occasionally see geometry information when zooming -in or -out, panning, changing the grid size, or perhaps perusing the data files. So the following discussion may help interpret the units.
The geometry information is in floating-point units. Because all views are scaled to fit the viewing area or sheet of printing paper, either by the VGUI or by the user, the units are strictly relative and arbitrary. As a convention and point of reference, the first drawing canvas (when starting a new diagram) is sized as 8.5 by 11.0 in landscape orientation. The drawing canvas will then expand indefinitely in any direction as needed, by zooming-out and placing objects that make the occupied area larger. When printing hardcopy, the viewable area of the screen is scaled, as needed, to fit on one sheet of paper just as it appears in the viewing window of the VGUI.
To define a generic for a module that you are editing, select Define Generic under the Edit menu. A dialogue window will pop-up that prompts you to fill in the fields of a generic definition.
A generic definition consists of a parameter-name that you wish to define, its data-type, and an optional default value.
For example: (Defining a generic and its default.)
Ram_Size : integer := 1024
ALU_width : integer := 8
To set the generic value of a node instance,
select a node-instance in a diagram and open its properties.
You can enter a new value for the generic by
naming the generic and assigning its value.
For example: (Setting a generic instance.)
Ram_size := 512
You can define the ports on a leaf-device-type by the following method:
DEFINE_DEVICE_TYPE: u74030
PORT_LIST( a1, b2 );
END_DEFINE_DEVICE_TYPE.
This example defined two ports for a device-type called, u74030.
You must place the definitions in a ".dia" diagram file. It can either
be your main diagram file, or one that you link to via import.
The journaling feature is automatic on all Unix versions of the VGUI. It is not available in the Microsoft environment (MS-Windows).
The default journaling-period is set to five (5) minutes.
You can change the journaling-period by making an entry
in your GUI_SETUP_FILE.
For example:
journal_period = 15This sets the period save interval to 15 minutes. See GUI_SETUP_FILE.
The text-window shows important messages about drawing activities as they
occur. It is often instructive to look at the text-window if anything
unexpected occurs. For example, attempting to close the top-level diagram
will do nothing, but you may not know why. The text window explains:
Attempt to close graph that has NO parent. Ignored.
We recommend keeping the lower portion of the text-window visible under the
VGUI while editing, especially for beginners.
You will find that the text window is a record of important events, such as what file-names diagram or exports were saved to, -even after you have exited VGUI.
Often it is convenient to create large numbers of external ports through copy/paste operations in VGUI. However, this results in many external ports having identical port-names. A convenient method for making the port-names unambiquous is to select the Options / Make Ext. Ports Unique feature. When you do, VGUI will examine all the external ports on the current diagram. If any are identical, it will add a number to the end of such port-names.
For example, if you have three external-ports called out. Then after selecting Make Ext. Ports Unique under the options menu, you will have three ports named: out_0, out_1, and out_2.
This feature is available on all Unix and Linux versions of VGUI.
The feature is not yet available on the Microsoft-Windows/NT version of VGUI.
VGUI allows you to select or customize-to your favorite box-style. Select Options / Box Display Styles, under the Options menu. It will drop-down to show you the five box-styles to choose from. When you select, the display of all boxes will change style. This affects only how boxes are displayed in your session of the VGUI. It does not affect how your diagrams will print, nor the saved files.
You can configure VGUI to always start-up with your favorite box-style by editing the VGUI-set-up file. See VGUI Set-Ups.
This feature is available on all Unix and Linux versions of VGUI.
The feature is not yet available on the Microsoft-Windows/NT version of VGUI.
To personalize VGUI to a style that you are most comfortable with, VGUI allows you to select from five background colors. Select Options / Background Color, under the Options menu. It will drop-down to show you the five colors to select from. When you select, the background will change. Try changing the background in combination with various box-styles. You will find that the look of your diagrams will change quite dramatically.
You can configure VGUI to always start-up with your favorite background by editing the VGUI-set-up file. See VGUI Set-Ups.
This feature is available on all Unix and Linux versions of VGUI.
The feature is not yet available on the Microsoft-Windows/NT version of VGUI.
An example setup file is shown below:
window_size_x = 1125
window_size_y = 900
print_command = lpr -h -Plw3
grid_size 0.2
snap_to_grid yes
show_grid yes
show_node_names on
show_node_types on
show_node_attr off
show_port_names on
show_link_attr off
background_color = black
journal_period = 15
box_display_style = solid-box
To make the VGUI reference your setup file, set the gui-setup environment variable as follows:
setenv GUI_SETUP_FILE your_setup_file_pwd
The syntax of the setup file is:
parameter = setting
There must be onle one parameter setting to a line. Blank lines are allowed. All parameters and
settings are case-insensitive. (Any combination of caps and smalls is allowed.) The equals sign
(=) is optional. The parameters can be any of the following:
The standard default values are as follows:
window_size_x = 1025
window_size_y = 800
print_command = lpr
grid_size = 0.1
snap_to_grid yes
show_grid no
show_node_names on
show_node_types on
show_node_attr off
show_port_names on
show_link_attr off
background_color = black
box_display_style = solid-box
journal_period = 5
sim_tool = /compiler

(Questions, Comments, & Suggestions: chein@atl.lmco.com)