Double-clicking on the file NET
in
metro
x.tmp
will bring up a display of the elaborated netlist described by
that file.
The initial appearance of the graphical display
depends on the layout preference settings.
Before describing the preferences, a note about auto-layout is in order:
Automatic layout is provided as a helpful starting point for laying out
a diagram.
It may not provide a suitable finished layout, but can help
provide an initial layout that is understandable and
easily modifiable by hand.
The preferences can be helpful in getting the most out of auto-layout.
Layout preferences
The layout preferences are accessed from the main Eclipse menus:
-
Window -> Preferences -> Metropolis -> Layout
Layout preferences.
Do automatic layout...
Never
- All objects will initially appear stacked on top of each other
in the upper-left corner, and must be positioned by hand to create
and understandable display.
When no layout has yet been done
- Automatic layout will be done, as long as no layout has yet been
saved for this netlist.
Auto layout style
spring tension (GraphViz neato)
- Use GraphiViz neato to do layout, which uses a
spring-force algorithm.
This is probably the most generally useful choice, although the others
may be worth experimenting with.
hierarchical, in rank and file (GraphViz dot)
- Use GraphViz dot to do layout.
dot is most applicable to hierarchical directed graphs.
radial (GraphViz twopi)
- twopi tries to arrange things in circular arcs.
circular (GraphViz circo)
- circo tries to arrange the graph in concentric circles.
More information about these layout schemes is available on the
GraphViz
website.
Stretch the distance between components...
This slider allows adjusting the distance between objects provided
by the auto-layout program.
Location of GraphViz programs
This file-specification tool must be filled in to tell the
plugin where to find the layout programs, if auto-layout is desired.
Fit MObjects around their names / Use default MObject size:
The initial size of netlist components is set here to either fit snugly around
their name labels, or else to be a set width and height in pixels.
- Color Editors
Color editors are provided to change the colors used to identify
the types of objects displayed.
The Display
The display shows the structure of a netlist.
The name of the netlist whose structure is being displayed appears
in the tab at the top of the Structure Viewer.
Components
The components of the netlist appear as colored rectangles.
A rectangle's color corresponds to the type of component it represents.
The color key is on the layout preferences page (see above),
where the colors are customizable.
The name of the component in the netlist is displayed in the middle
of its rectangle.
Hovering over a component displays its name,
the fully-qualified name of its class,
and its type in a tooltip.
Ports
Connections between the netlist components are displayed as lines
connecting them, attached at their ports.
A gray circle on a component rectangle represents an input port
(or interface).
The name of the interface is displayed in a tooltip when the mouse
hovers over it.
A white circle on a component rectangle represents an output port.
The name of the port is displayed in a tooltip when the mouse
hovers over it.
Shadow Ports
A gray or white circle that is not on a component rectangle
is a "shadow port".
Its connection ends at a port that is not in the currently displayed
netlist.
Shadow ports are so called because they can be thought of as the point
where a connection casts a shadow on the netlist boundary
on its way to an endpoint in some other netlist.
A shadow port can appear either as a free-floating symbol,
when it represents a connection endpoint outside of the current
netlist,
or as a port symbol on a netlist object,
when it represents a connection endpoint inside that netlist.
The following figure illustrates:
Layout
If the preferences have been set to do automatic layout,
and the GraphViz programs are correctly installed,
the netlist components will be automatically layed out
in some manner the first time a netlist is displayed.
Automatic layout will also happen on subsequent displays
of the same netlist, as long as the layout has not been saved.
The rectangular component symbols and the free-floating
shadow port symbols can be dragged into any position.
They can also be resized by selecting them and dragging their
handles.
Multiple symbols can be selected at once by dragging a selection
box around them, or by doing Shift-Click
to add them to the current selection.
Saving (and a caveat)
Currently, saving means saving the layout,
and it is done in any of three ways described below.
An important caveat:
If multiple views of the model are open when one is saved
-- i.e., views of multiple netlists in a hierarchical structure --
it is important to realize that the layout for all
views will be saved.
That is, the layout for the entire model is saved in one place
and saving any view saves the layout for all views.
Actions
- Open a sub-netlist
-
Double-clicking on a netlist symbol will open another viewer displaying
the structure of that netlist.
-
Edit source code
-
Double-clicking on a non-netlist component figure will open a
text editor on the source code for that component,
if that source code file resides in the local Metropolis project
under Eclipse.
-
Reposition and resize objects
-
Objects can be repositioned by dragging them, and resized by
selecting them and dragging their handles.
-
Undo and redo
-
Layout changes can be undone and re-done in three ways:
- The
Edit
menu contains Undo
and Redo
items.
- The Eclipse workspace toolbar contains icons for
Undo
and Redo
.
- Right-clicking on the diagram background brings up
a pop-up menu containing
Undo
and Redo
items.
- Save
- The graph layout can be saved in three ways:
- The
File
menu contains a Save
item.
- The workspace toolbar contains a
Save
icon.

- If layout changes have been made when a graph page is closed,
the user is prompted whether to save the layout or to close without
saving.
-
Export Image
-
The view image can be saved to a file by right-clicking on the background
and selecting "Export Image..." from the popup menu.
This will bring up a dialog to use to specify the file type, file name,
and location of the exported image file.
JPEG and BMP formats have been tested to work on Windows and Redhat Linux
platforms. The underlying Java API theoretically also supports PNG and GIF,
but success with those is yet to be seen.