Symedit is a GUI tool to create, modify or maintain symlib files. A symlib file is a collection of schematic symbol shapes stored in ASCII text format.

Symedit reads the symlib files and displays the symbol shapes. The symedit program also creates or updates the file index header if necessary.

Overview

The symbol editor / viewer is an executable file called symedit that is part of the GateVision PRO package.

Invoke the Symlib Editor/Viewer

Just call the executable file: symedit.exe on Windows, or symedit on Linux. If you want, you can specify the symlib file as additional argument, in this case the specified file is read at startup time:

symedit file.sym

If the symlib file does not exist, then an empty file with the specified name is created.

The optional argument -view starts symedit with the View tab opened.

Creating a New Symlib File

If you already have an empty (untitled) window displayed, just begin creating your symbols as described below. To create a new untitled symlib file, select File  New Symlib File. An opened symlib file is closed and the lists of symbols and symbol elements are cleared. To permanently commit your changes, choose File  Save or File  Save As.

Open Symlib File

When opening a symlib file (File  Open Symlib File) or when symedit is invoked with a filename argument, then the file is parsed and checked. If the checker finds an invalid index header (invalid symref entries) then the user is asked to create a new (or overwrite the existing) symlib file - in order to update the index header. After your existing symlib file has been opened successfully, the "Symbols" listbox is populated with the names and view names of the symbols just parsed. In the View tab the symbols shapes are displayed - possibly split over a couple of pages.

Save Symlib File

Whenever a symlib file is saved (File  Save or File  Save As) a valid index header is created automatically.

The symlib file’s symref entries store character positions that usually get invalid if the file is hand-modified (by a text editor). This means, after hand-editing a symlib file, you must use "symedit" to read the symlib file in order to update the index header.

Revert Symlib File

To discard all changes and to revert back to the last saved state, you may use File  Revert. This function is only available if you saved your symlib file before.

Import

The File  Import sub-menu offers the possibility to:

  • import symbols from a Synopsys Slib library

  • import symbols from a EDIF 2.0.0 schematic file

Export

The File  Export sub-menu offers the possibility to:

  • write out a (schematic) EDIF 2.0.0 compliant file

  • write out a Postscript picture of all symbols

  • write out a Verilog module with the symbols' footprints

Exporting EDIF and Postscript will pop up a small dialog first with some user options for tweaking the output.

Symlib Properties

The menu entry File  Properties pops up a small dialog window to enter some global settings and comments for your symlib file.

Controlling the View

Use the View menu or the built-in mouse strokes (left mouse button press-drag-release) to zoom in/out and the scroll-bars or middle mouse button press-drag-release to change the scroll position. This works in both the Edit and the View window. If the View window is active you can use the Pages menu to switch to different pages.

The Sheetsize menu defines the sheet size that is used when reading a new symlib file. The sheet size is one of the US formats A through D or one of the European A4, A3 or A2.

Running Tcl Scripts

The menu entry Utilities  Run Tcl Script pops up a file selection dialog asking the user to specify a Tcl script. This enables the user to modify the symbol shapes by self-made Tcl scripts.

The specified Tcl file is evaluated by a slave interpreter that only knows about one Tcl variable called symbolList. That variable is a Tcl-list that stores all the symbols, one in each list element. If the symbolList is modified by executing the script, then the changed symbols are displayed in the Edit window. After that you must save (File  Save As) the modified symbol data into a file, if you don’t want to lose it. Here is a small example that deletes all symbols that have name prefixes other than "and":

set resultList {}

foreach sym $symbolList {
    set sym_name [lindex $sym 1]
    if [string match "and*" $sym_name] {
        lappend resultList $sym
    }
}
set symbolList $resultList

Example Tcl Scripts

nullmap.tcl

The example script symutils/scripts/nullmap.tcl defines a set of 1:1 mapping rules and calls apply_rules to apply that rules for all loaded symbols (as stored in $symbolList).

The Tcl procedure apply_rules is implemented in the file symutils/scripts/mapping.tcl, that is "sourced" from nullmap.tcl.

This example can easily be modified to implement a real symbol-name and port-name mapping, based on symlib/generic.sym

move.tcl

There is a more complex example script in symutils/scripts/move.tcl that changes all x coordinate values to move the left edge of all symbol shapes to 0.

Log Console

All Events are logged, you can see these events using the Log Console (Utilities  Show Log Console). A new window appears where you can save the logs to a file or clear all logged events.

Manipulating Symbols

Deleting a Symbol

If a symbol is selected from the list of symbols, then it can be deleted by the Symbol  Delete menu button. A confirmation dialog will pop up first.

Renaming a Symbol

If a symbol is selected from the list of symbols, then it can be renamed by the Symbol  Rename menu button. Now the symbol name and the view name can be changed in a new dialog window.

Copying a Symbol

If a symbol is selected from the list of symbols, then it can be copied by the Symbol  Copy menu button. "copy_of_SYMBOLNAME" is appended to the list of symbols.

Editing the Symbol Shape

If a symbol is selected from the list of symbols, the symbol shape can be modified interactively using the mouse. Open the Edit window to view the shape.

The radio buttons above the editing canvas define one of the following operations:

  • Select:
    An element can be marked by clicking on it with the mouse. The color changes to red and the definition is shown in the text field above the canvas.
    Another way to select one or more elements is to mark them in the listbox on the lower left side which contains all elements of a symbol. In this case, the definition of the last selected item in the listbox will be displayed.
    In this mode you can use the left mouse button to drag a rectangular (zoom) area. Start dragging from top-left corner and stop dragging in the lower right corner of the area to be zoomed in.
    To zoom out: use the left mouse button to drag a line in top right direction.
    Use the left mouse button to drag a line in bottom left direction. The zoom factor is adjusted in such that the shape will fit best into the editing canvas.

  • Move:
    Click on an element and hold down the mouse button. Now the element can be dragged to the new position. After the mouse is released, the new position is stored. Hint: You can always use the right mouse button to perform a temporary move action.

  • Copy:
    Click on an item and hold down the mouse button. Now a copy of the element can be dragged to a new position. The new element is appended to the list of elements.

  • Rotate cw/ccw:
    Click on an element to rotate the element either clockwise (cw) or counterclockwise (ccw) by 90 degrees. The rotation center point is the text justification point or the graphic element’s bounding box center.

  • Delete:
    Click on an element to delete the element. Alternatively, you may select "Delete" from a popup dialog which opens on right click in the Symbol elements listbox on the lower left.

  • Create:
    There is a drop down menu next to the Create button with some graphical symbol elements. After selecting an element from this list the new item can be drawn on the canvas using the mouse. A create operation can be canceled by pressing the ESC key or by switching to another action.
    Possible elements are:

    • port/portBus:
      A port or portBus shape is usually defined by two points, the start point and the end point (polygon shaped ports are supported while parsing and manipulating, but cannot be created by symedit). The port direction is determined by the location of the start and end point. The port name is assigned automatically (starting with A, B, …​, Z, AA, AB, …​ etc.) and can be modified later. The default width of a portBus is 4 and can be modified later.

    • pinattrdsp:
      A pinattrdsp applies to the most recently preceding port or portBus definition; therefore a pinattrdsp needs to be created after a port or portBus.

    • path:
      While clicking path points in the canvas these points will form a polygon. Path creation ends by double clicking the path end point.

    • arc:
      An arc is defined by three points. First the arc start and the arc end points are defined. Now the mouse can be moved to define the arc middle point.
      In order to create a circle, double click at the circle start point and move the mouse to the circle end point.

    • attrdsp:
      After selecting the position of the lower left justification point, a text window appears to enter the attribute name.

    • text:
      After selecting the position of the lower left justification point, a text window appears to enter the text.

After creating an element you can switch to the View window to see a preview of the symbol (you might want to perform a "Zoom Fit" mouse stroke first). With the Edit  Undo menu button you can undo the last symbol manipulations.

Hint: You can use the Shift and/or Ctrl keyboard modifiers in combination with move or create actions to grid snap your mouse position; this will give you more precise control over coordinates.

Create a New Symbol

The Symbol  New menu button creates an empty symbol. Now, new symbol elements can be added as described above.

The menu entry Symbol  Search pops up a small dialog window to search for symbols by name. If "wildcard" is active (default), then the characters *, ? and […​] have the special meanings: "any string", "any character" or "any of the enclosed characters" respectively.

The result of the search is displayed in a list of symbol names including each symbol’s view-name. Commonly, the view-names are * to indicate that the view-name matches any view-name requested by e.g. the GateVision PRO tool. If you choose one of the symbols in the listbox, it will be selected and centered in the View or Edit window.