2-1 The flowHDL interface consists of a main window and multiple dialog boxes. The main window provides control of features via palette buttons and menu items. When executed, some of these features bring up dialog boxes to
File Edit Sheet Palette View Tables Tools Options Help
STATE0
flowHDL -- state_machine.flo -- Sheet_0
CP DP
CP
RDP e
TITLE BAR MENU BAR
PALETTE
SCROLL BARS
Left button - Toggle Select Object Left button press and drag - Define selection box Sheet_1
STATUS BAR MINI VIEW
# V W
Design-Level Comment
a <- b
# Thread-Level Comment
W
Figure 2-1. flowHDL Main Window
2-2
prompt for more design detail.
A flowdiagram consists of one or more sheets, analogous to sheets of paper. Sheets provide a visual aid in
partitioning the design into manageable pieces. A sheet may contain one or more design threads or just a portion of a design thread. The distribution of a design over sheets does not affect the translation of your flowdiagram.
The main window, shown in figure 2-1, contains a title bar, a menu bar, a set of palette buttons, a drawing area and a status line. The features and functions of the individual palette buttons and menu items are explained in chapters 3 and 4, respectively. The majority of this chapter is devoted to explaining the special features of the drawing area.
2.1.1 The Title Bar
The title bar is located at the top of the flowHDL window.
It contains the name of the tool and the names of the file and the sheet currently being edited. If the file has not been named, (untitled) appears in the title bar.
2.1.2 The Menu Bar
The menu bar contains eight menus displayed horizontally across the top of the main window. Each menu provides a pull-down menu and/or cascading menus. These menus provide access to the majority of features available in flowHDL. See chapter 4 for detailed information on using the menus.
2.1.3 Flowdiagram Object Palette
The flowdiagram object palette is a row of push buttons running down the left side of the main window, each with
2-3 an icon representing a flowdiagram object or construct.
You can click these buttons to quickly select flowdiagram objects. See chapter 3 for detailed information on using these buttons. The palette button selections are also available as menu choices under the Palette menu.
2.1.4 The Canvas
The main component of the flowHDL Window is the canvas. Flowdiagrams are edited and graphical objects are created in the canvas. Objects in the canvas can be manipulated by selecting and moving them with the mouse. The visible portion of the canvas in the main window is called the drawing area. The vertical and horizontal scroll bars at the bottom and right side of the drawing area are used to view other parts of the canvas.
Alternately, you may resize the canvas to fit the drawing area through the view menu.
Mini views display additional sheets of the design description that are not displayed in the main window.
Each mini view shows an entire sheet in miniature. This view does not support editing features, and does not show text and expressions in the flowdiagram. However, you may display any number of different sheets in their own mini view windows, and can swap the contents of any mini view with the main window by clicking inside it with the left mouse button.
2.1.5 Status Line
The status line, located at the bottom of the main window, provides mouse instructions for the current operation mode. This information updates interactively during the operation of the flowHDL.
2-4
2.2 Sheets
You can only view one sheet in the main window at any time. Input and output labels can be used to show the flow between sheets (see section 3.2.2 for a discussion of input and output labels). Using sheets improves readability, particularly when incorporating flowdiagram printouts in documentation.
Although the size of each sheet is limited, the number of sheets that can be created in a flowdiagram is not. By partitioning the flowdiagram into sheets, flowdiagram size is limited only by availability of memory and disk space.
2.2.1 Navigating Between Sheets
The primary way to navigate between sheets is through the Sheet List (described in section 4.3.5). flowHDL also provides several navigation shortcuts, described below:
1 3
2
1
2 3
1 3
2
1
2 3
Sheet 1 Sheet 2
Figure 2-2. Use of labels in flowdiagram sheets
NOTE:
Navigation shortcuts are not available in flowHDL-PC.
2-5 1. Double-click on an output label to view the sheet
containing the associated input label or state in the main window.
2. Double-click on a sub-flowdiagram reference to view the corresponding sub-flowdiagram sheet in the main Window.
3. Double-click on an input label, input connector, or output connector to view the previously displayed sheet in the main window.
4. Double-click on a space in the main window containing no objects to view the next sheet in the sheet list. (If the currently displayed sheet is the last sheet in the list, this action will display the first sheet in the list.)
5. Double-click on a space in the main window
containing no objects with the middle mouse button to view the previous sheet in the sheet list. (If the currently displayed sheet is the first sheet in the list, this action will display the last sheet in the list.)
2.2.2 Sub-flowdiagram Definition
The sub-flowdiagram definition is a special case of a sheet which can be used in multiple parts of your flowdiagram thread. Portions of a flowdiagram that define specific, repetitive functions can be defined as subflowdiagram definitions. Each sub-flowdiagram definition occupies one flowdiagram sheet. Once a particular portion of a
flowdiagram is created in a subflowdiagram definition, it can be referenced from any location in the flowdiagram thread in which it was created (but not from other flowdiagram threads).
2-6
in
a b
a b
E xa m ple
E xa m ple
Refer en ce
Defin it ion
Figure 2-3. Sub-flowdiagram reference and definition A sub-flowdiagram behaves just like a flowdiagram. The control flow from one level to another is indicated by using sub-flowdiagram references and input/output connectors as shown in figure 2-3. The transitions flowing in and out of a sub-flowdiagram reference correspond to each marked input and output connector in the sub- flowdiagram definition.
The control flow in and out of the sub-flowdiagram definition is done through input and output connectors.
Input and output labels cannot be used in a sub- flowdiagram definition.
2.3 Threads: Modeling Concurrency with Multiple Flowdiagrams
The flowdiagram methodology supports the design of systems having concurrent components that interact with one another. Each of these components, called " threads,"
conforms to an independent control element modeled in
2-7 flowHDL as a state machine or control thread. Each thread is surrounded by a bounding box (for more information, see section 3.1.5).
In order to allow designers to explicitly partition systems flowHDL allows users to classify threads as model threads or stub threads. Model threads are treated as the
constituents of the design model and are translated into the HDL description along with their behavioral description.
A design must contain at least one model thread to be valid. Stub threads are parts of the design model which may be replaced by reusable modules from a component library along the length of the design process. flowHDL also allows users to designate threads as test harnesses.
Test harness threads are part of the simulation stimulus only.
flowHDL has the ability to model varying degrees of concurrent interaction among independent components of a system. These include:
This scenario involves multiple control blocks which interact through assertion of control signals. These signals may or may not each have a specified data path operation, but the data path of each control block is independent.
One thread may assert a signal which causes a state transition and/or a conditional output, while in the other thread, the bus may be used as an enable event or clock trigger. This "tightly coupled" interaction could be in one direction ("master-slave") or bi-directional
("handshaking"). See figure 2-4 for an example of this scenario.
2.1.1.1.1 Intera cting control threads with independent data paths
2-8
State2 State1
State4 State3 abus
bbus
cbus
dbus
aSig bSig
Figure 2-4. Interacting control threads with independent data paths
This scenario involves multiple control blocks that interact both explicitly and indirectly by controlling various aspects of a common data path. The control blocks control the same elements in the data path, and some form of bus resolution capability is required. This form of "tightly coupled" interaction could be in either one direction ("master-slave") or bi-directional ("handshaking"). See figure 2-5 for an example of this scenario.
State2 State1
State4 State3 abus
bbus
cbus
bbus
aSig bSig
Figure 2-5. Interacting control threads with common, shared data paths
This scenario involves multiple control blocks that have little or no interaction, but share common data paths or storage elements. See figure 2-6 for an example of this scenario.
Non-interacting control threads with shared elements Interacting control threads with common, shared data path
2-9 State2
State1 abus State3
memory1
memory1
aSig bSig
Figure 2-6. Non-interacting control threads with shared elements
Concurrency is modeled in flowHDL at different levels of
"granularity." The lowest level of concurrent behavior is specified through defining multiple actions on a state in a flowdiagram. These actions are initiated concurrently, either synchronously or asynchronously, upon entry to the state. The highest level of concurrency is at the
flowdiagram level, where individual flowdiagrams represent concurrent threads in the system description.
The basic characteristics of modeling high level concurrency are:
• Arbitrary complexity of control blocks - Each thread is represented by its own self-contained flowdiagram, which may be of arbitrary complexity.
• Arbitrary number of control blocks - The design descriptions may have a large number of concurrent components, usable in a single design.
• Control thread-specific clocking -Each control thread is defined with a different, and possibly unrelated, control clock.
2.4 Highlighting Objects/Transitions
To edit objects on the canvas, you must highlight them.
To highlight an object, click on the targeted object. When NOTE: You cannot highlight the
Enable Event object alone.
Highlighting a State associated with an Event highlights both objects.
2-10
an object is highlighted, all associated expressions are highlighted as well. To highlight all objects in a thread, click on the bounding box of that thread. To highlight a row in a table, click on that row. Transitions are
highlighted in the same way as other flowdiagram objects.
To highlight a group of objects:
1. Move the mouse to the top left corner of the objects to be highlighted.
2. Click and drag the mouse to the bottom right corner.
A box forms an outline surrounding all the targeted objects (see figure 2-7).
3. Release the left mouse button to highlight the objects.
The highlighted objects will change color to indicate that they have been highlighted.
During group selection, the bounding box is selected along with inside objects if it is enclosed completely by the marquee. The bounding box and all associated objects may also be selected by clicking on one of the borders of the bounding box.
Input1
State3
Cond1 1 0
State4 State5
Hold left mouse button Drag cursor diagonally
Input1
State3 Cond1
State4 State5
1 0
Selection highlighted
State4 State5
1 0 State3 Input1
Cond1
Figure 2-7. Highlighting a group of flowdiagram objects
You can also highlight a group of objects by depressing the SHIFT key and clicking on each object that you want to highlight. After highlighting objects, you can click
2-11 anywhere in the drawing area where there are no objects to remove the highlights.
2.5 Moving Flowdiagram Objects
Flowdiagram objects may be moved within the constraints of the system. Different procedures must be followed for different movement situations.
No objects (including comments) may be dragged outside of the bounding box which contains them. Objects may not be placed on the border of a bounding box.
2.5.1 Moving Individual Objects
An object may be moved to any location on the canvas where it will not overlap another object. To move a single flowdiagram object from one place to another within the current sheet:
1. Click and drag the target object to the new location.
Any expressions linked to the object will move in relation to the target object. Objects may not be moved outside of their associated bounding box.
2. Release the mouse button.
All transition arcs to and from the object will be re-routed accordingly. If you want to modify this routing, follow the procedure presented in section 2.6.
2.5.2 Moving Multiple Objects in the Canvas
To move multiple objects within the canvas displaying the current sheet:
2-12
1. Highlight the targeted objects to be moved (for a description of how to highlight objects, see section 2.4).
2. Place the mouse cursor on one member of the group of objects to be moved.
3. Press the SHIFT key while clicking and dragging the objects to a new location. You will see a ghost image of the objects (but not the transitions or events attached to the objects) as you move them on the screen.
4. Release the mouse button and SHIFT key.
When moving a group of objects, the transition arcs between the grouped objects are retained without re- routing. The transition arcs that connect the moved objects with objects that are not moved will be re-routed. To modify the routing generated automatically by flowHDL, follow the procedure presented in the section 2.6.
2.5.3 Moving All Objects on the Current Sheet
To move all of the objects on the current sheet:
1. Place the mouse cursor over any place on the drawing area where the sheet is being displayed.
2. Depress the SHIFT key while clicking and dragging the object using the middle mouse button.
3. Release the middle mouse button and the SHIFT key when the objects are placed in the desired location.
The transition arcs between the objects will be retained.
2-13
2.6 Moving a Transition Arc
In a complex flowdiagram, transition arcs sometimes overlap objects when they are placed close together.
Transition arcs may also loop from one object to another instead of forming a straight line. Transition
configurations can sometimes become confusing when flowdiagram objects are moved. Because of these factors, you may wish to manually re-route a transition arc.
2.6.1 Adjusting a Transition
Drag the middle vertical section of a transition horizontally or the horizontal section of a transition vertically to make the flowdiagram layout neater and clearer. You cannot move the section of a transition that is immediately connected to an flowdiagram object.
To adjust a section of a transition:
1. Click the left mouse button at the middle of the transition arc section you wish to remove.
2. Drag the selected section to a new location and release the mouse button. See figure 2-8 for a visual representation of this process.
2-14
Highlight transition to move
Drag horizontal section vertically
Horizontal section moved
State2 State2
State1 State1
State2 State1
Figure 2-8. Steps to adjust a transition arc section
2.6.2 Straightening a Transition
When a transition connects two objects that are separated vertically by less than twice the height of an object, the transition appears as a loop (see first frame of figure 2-9).
To straighten a transition in this case,
1. Move one of the objects to increase the vertical distance between the objects. The distance must be at least twice the size of an object.
2. Delete the transition and place it again or adjust the transition as shown in figure 2-9.
HINT: Improve your ability to select a transition arc by increasing the magnification of the drawing area (see section 4.5.2).
2-15 Replace transition Pull down State2
State1 State1 State1
State2
State2 State2
Looped transition
Figure 2-9. Straightening a transition
2.7 Resizing bounding boxes
Manually resize the bounding box by clicking and dragging its borders. A bounding box will automatically resize in the following cases:
• When an input or output label associated with another input or output label is enclosed in a bounding box, the associated label is also enclosed in that bounding box.
• When a label enclosed in a bounding box is associated with a label outside of the bounding box, the bounding box is expanded to include the outside label. If both labels are associated with different bounding boxes, an error occurs.
• If a bounding box is drawn around part of a group of objects connected by transitions, the bounding box expands to include all connected objects. This is also true for sub-flowdiagrams.
• If an object connected to other objects within a thread by transitions is connected to an outside object (as source or transition), the bounding box expands to include the outside object.
2-16
2.8 Constraints on Object Movement
Five constraints apply to the movement of objects in flowHDL:
• Clock and reset objects attached to states and/or threads cannot be moved independently from their associated states and/or threads. To move a clock or reset object, you must move the associated state and/or thread.
• Transition arcs may not be moved independently of the objects to which they are attached. When a transition arc is moved, its ends remain connected to its associated objects. When adjusting a horizontal transition section, the vertical adjustment is limited by the distance between the two objects.
• Objects cannot be moved directly from one sheet or thread to another. To move an object from one sheet or thread to another, you must first cut or copy the object (see section 4.2.2 or 4.2.3, respectively), and then paste it into the appropriate sheet or thread (see section 4.2.4).
• Control path clocks, data path clocks, and data path resets attached to bounding boxes may only be moved within the upper, middle, and lower third of the left bounding box border, respectively. Control path resets may not be moved independently from their associated states.
• Text objects may not be moved outside of bounding box. To promote or demote, use cut/copy/paste features.