This is a converter that converts symbol libraries from Synopsys slib format to the Symlib Format used by the GateVision PRO tools.

Invoke the Converter

The converter is invoked from the command line (from a Linux-shell or from the Window’s Command Window). You must specify the Synopsys slib file (input file) as a command argument:

slibconv file [-o output.sym]

The converter expects a configuration file called slibconv.conf to be found in the current directory or specified using the -slibConfig command line option. If no output file using the -o command line option is specified then the converted output file is called output.sym and is placed in the current directory.

Example: If the file to be converted is called generic.slib, conversion can be performed by issuing the following command at the prompt:

slibconv -o generic.sym generic.slib

The Configuration File

This is the configuration file for the converter. It should be present in the same directory as the converter (or specified using the -slibConfig command line option). If the converter is unable to find the configuration file, it will use the default option values.

The configuration file allows the configuration of two types of options:

  1. Symbol Attribute Option (such as: the font size, size of the symbols, etc…​).

  2. Advanced Program Options (such as: whether zero length lines should be deleted or not, etc…​)

The Configuration File Format

The file is in ASCII format and except for comments must be written in lower case characters. The file contains two types of entries:

Configuration Options

A configuration option instructs the program to perform a task. A configuration option takes the format:

option value

Where option is a name of a valid option and value is a valid setting for that option. Depending on the option, an integer, a real number, keyword yes, keyword no are the only valid settings for the value field.

Comment

A comment is ignored by the program. A comment takes the format:

# This is a comment

A comment must start at the beginning of a new line with the character #, and the text following the character are ignored to the end of line. There must be at least one empty space between the # character and the first character of the comment.

The Configuration File: Valid Options

Symbol Attribute Options Short Description Default Value Type

display_cell_name

If switched on displays the name of the symbol below the symbol.

yes

yes/no

display_instance_name

If switched on displays the symbol instance name at the top of the symbol.

yes

yes/no

font_size

This is the font size used to display pin names, symbol names and symbol instance names.

10

integer

display_pin_name

If switched on displays the names of symbol pins.

yes

yes/no

scale

All the symbols in the input file are multiplied by the scale value to arrive at the converted symbol.

10.0

real

ignore_templates

If switched on templates are ignored by the converter.

yes

yes/no

default_pin_length

If a pin is not affected by the Advanced Option convert_pins the displayed pin will have the length defined by this variable

5

integer

ignore_case

If on, then the resulting symlib file is case-insensitive (symbol and port names).

no

yes/no

Advanced Options Short Description Default Value Type

convert_pins

If there is a pin defined at a place where there is also a line that can function as the pin, switching on this option will convert this line into a pin.

yes

yes/no

continuous_pins

Works together with the convert_pins option. If switched on, the converter will try to provide the longest possible pins.

yes

yes/no

delete_zero_length_lines

If switched on deletes the lines that do not have a length.

yes

yes/no

delete_duplicate_lines

If switched on deletes lines that are redundant.

yes

yes/no

divide_lines

If switched on line division is performed (i.e.: if the endpoints of a line or an arc fall on another line, the latter line is divided at that point.)

yes

yes/no

delta

The value ignored by the converter when performing various internal calculation. This is necessary because the converter is converting from the Synopsys format that uses real numbers to the Symlib Format that uses integer numbers.

0.051

real

unknown_pin_direction

If switched on ANY_ROTATION if converted LEFT/UP/DOWN/RIGHT.

guess_sym_dir

If switched on in the sym file INPUT is added to all pins with LEFT/UP/DOWN direction and OUTPUT to all pins with RIGHT direction

The Configuration File Option: display_cell_name

This option enables symbol name displaying. The symbol names are displayed directly below the symbols.

attribute type:

yes/no

default value:

yes

display_cell_name no

display_cell_name yes

Do not display the cell name

Display the cell name

The Configuration File Option: display_instance_name

This option enables symbol instance name displaying. The symbol instance names are displayed directly above the symbols.

attribute type:

yes/no

default value:

yes

display_instance_name no

display_instance_name yes

Do not display the instance name

Display the instance name

The Configuration File Option: display_pin_name

This option enables symbol pin name displaying.

attribute type:

yes/no

default value:

yes

display_pin_name no

display_pin_name yes

Do not display the pin names

Display the pin names

The Configuration File Option: font_size

Defines the font size used by the following symbol attribute options.

attribute type:

integer

default value:

10

font_size 5

font_size 10

Use font size 5

Use font size 10

The Configuration File Option: scale

The Symlib Format symbols are defined in 1/100 of an inch integer units. If your Synopsys Format input file is using a different unit it may be necessary to scale the symbols to their correct size.

scale = input file scale (in inches) / Symlib scale (in inches)

For example: If the Synopsys symbols are defined in 1/10 of an inch units, the scale can be calculated as follows.

scale = 0.1 / 0.01 = 10.0

Every input file symbol definition is multiplied by the scale value.

attribute type:

real

default value:

10.0

The Configuration File Option: ignore_templates

The Symlib Format does not support sheet frame templates. So there is no need to convert the templates in the input file, and this option should always be switched on. If this option is switched off Templates are processed as normal symbols.

attribute type:

yes/no

default value:

yes

The Configuration File Option: ignore_case

If switched on, then the resulting Symlib file is marked case-insensitive and slibconv internally maintains the symbol names and variable names case insensitive.

attribute type:

yes/no

default value:

no

The Configuration File Option: default_pin_length

This option controls the length of symbol pins and is given in 1/100 of an inch units. All converted symbols will have pins with this length.

Note: In the following cases symbol pin length is not controlled by the default_pin_length option.

  1. If the convert_pins option is switched on and the symbols were affected by this option.

  2. Pins with the direction ANY_ROTATION will always be of zero length (except when affected by the convert_pins option).

attribute type:

integer

default value:

5 (i.e.: 5/100 of an inch)

default_pin_length 5

default_pin_length 10

Use default pin length 5

Use default pin length 10

The Configuration File Option: convert_pins

Sometimes a converted symbol may have pins as illustrated by the picture at below left. In the illustration the selected pin A has the length as defined by default_pin_length, but it is evident that the line between the pin and the triangle is what was actually meant to be the pin.

In situations like this switching convert_pins on would convert such lines into pins. This situation is demonstrated in the below right illustration.

See also continuous_pins.

Note: If the convert_pins option is switched on, it is highly recommended that the following options 1, 2 and 3 are also switched on with the 4th option configured to an appropriate value.

attribute type:

yes/no

default value:

yes

convert_pins no

convert_pins yes

Do not use the convert pins option

Use the convert pins option

The Configuration File Option: continuous_pins

Note: This option works together with convert_pins option and has no effect if convert_pins is switched off.

Sometimes switching convert_pins on alone would not ensure that the pins have the correct length. This is because sometimes a line from point X to point Y is not defined as a continuous line, but as two lines (i.e. one from point X to an intermediate point Z, and the other from the intermediate point Z to point Y). In situations like this only the line up to the intermediate point is converted into a pin. This situation is demonstrated in the below left illustration with the pin A selected.

Switching continuous_pins on would solve this problem by instructing the converter to provide longest possible pins (illustration below right).

attribute type:

yes/no

default value:

yes

continuous_pins no

continuous_pins yes

Do not use the continuous pins option

Use the continuous pins option

The Configuration File Option: delete_zero_length_lines

Some symbol definitions may include lines that do not have a length.

Example: line (0.0,0.0,0.0,0.0);

Having zero length lines could interfere with the appearance of symbols. Sometimes the user may not be able to select a pin due to the presence of the zero length lines. Zero length lines may also, in some cases, cause convert_pins and continuous_pins options to function incorrectly. It is highly recommended that this option is always switched on.

attribute type:

yes/no

default value:

yes

The Configuration File Option: delete_duplicate_lines

Some symbol definitions may include redundant lines. Example:

     line(0.0,0.0,10.0,0.0);

     line (0.0,0.0,10.0,0.0); (redundant line 1)
     line (0.0,0.0, 5.0,0.0); (redundant line 2)

Having redundant lines may interfere with the appearance of symbols. Sometimes the user may not be able to select a pin due to the presence of redundant lines. Redundant lines may also, in some cases, cause convert_pins and continuous_pins options to function incorrectly. It is highly recommended that this option is always switched on.

attribute type:

yes/no

default value:

yes

The Configuration File Option: divide_lines

If this option is switched on line division is performed (i.e.: if endpoints of a line or an arc fall on another line, the latter line is divided at that point.

Example:

before division:

     line(0.0,0.0,10.0,10.0);
     line(4.0,4.0,7.0,4.0);

after division:

     line(0.0,0.0,4.0,4.0);
     line(4.0,4.0,10.0,10.0);
     line(4.0,4.0,7.0,4.0);

This option provides a supporting function to convert_pins. Sometimes convert_pins may produce pins at unexpected places as demonstrated by pins A and C in the illustration below left (only pin A is selected). Switching divide_lines on would correct the error (illustration below right).
It is highly recommended that this option is always switched on.

attribute type:

yes/no

default value:

yes

divide_lines no

divide_lines yes

Do not use the divide lines option

Use the divide lines option

The Configuration File Option: unknown_pin_direction

If this option is switched off ANY_ROTATION is converted to direction LEFT/UP/DOWN/RIGHT.

attribute type:

yes/no

default value:

no

The Configuration File Option: guess_sym_dir

If this option is switched on INPUT is added to the ports in the sym file for the directions LEFT/UP/DOWN. OUTPUT is added to ports with direction RIGHT.

attribute type:

yes/no

default value:

yes

The Configuration File Option: delta

The Synopsys format is based on real numbers and this is the value ignored by the converter when dealing with real numbers.

For example: if the difference between two real numbers is less than delta they are taken to be equal.

For some Synopsys input files it is necessary to have a high delta value so that convert_pins option can function properly. The default value provided will suffice in most cases.

The illustration below left demonstrates the effect of having a too low delta value when convert_pins is switched on. Even though convert_pins was switched on, pin QN was not converted because pin QN is defined more than the delta value away from the line that should have been converted into a pin. The illustration below right demonstrates the situation fixed, when the delta value was increased to 0.15.

attribute type:

real

default value:

0.15

delta 0.051

delta 0.15

Use a low delta value

Use the default delta value

A Sample Configuration File

# Configuration file for the slibconv converter.
#

# The font size of instance names, symbol names and pin names
# font_size is declared as integer
#
font_size               10

# This variable controls the value neglected by the program in order to
# deal with errors associated with dealing with real numbers. The program
# uses values less than delta as irrelevant in some functions
# delta is declared as double
#
delta  0.15

# The size of the symbols in the input file are multiplied by the scale value
# scale is declared as double
#
scale 10.0

# The default length of pins. This applies only if the program could not find
# a suitable line that could be used as a pin (finding suitable lines for pins
# is controlled by "convert_pins" variable).
# default_pin_length is declared as an integer
#
default_pin_length 5

# If switched on deletes lines with length less than delta
#
delete_zero_length_lines    yes

# If switched on deletes duplicate lines
#
delete_duplicate_lines  yes


# If switched on line division is performed (i.e.: if an endpoint of a line or an
# arc falls on another line, the latter line is divided at that point.
# example :
# before division :
#               line(0,0,10,10);
#               line(4,4,7,4);
#
# after division :
#               line(0,0,4,4);
#               line(4,4,10,10);
#               line(4,4,7,4);
#
divide_lines yes

# if switched on find suitable lines that could be viewed as pins. That is if a
# pin is declared at an endpoint of a line that can itself act as a pin, this
# line is taken as the pin.
#
convert_pins            yes

# works together with convert_pins option. (i.e.: has no effect if convert_pins
# option is switched off.
# if switched on, tries to make the converted pin longer if it is possible.
#
continuous_pins        yes

# If switched on displays the symbol names
#
display_cell_name       yes

# If switched on displays pin names
#
display_pin_name        yes

# If switched on displays the symbol instance names
#
display_instance_name   yes

# If switched on, templates are ignored
#
ignore_templates        yes

Error Messages

All error messages are written to standard error. There are two types of error messages printed by the converter.

syntax errors (errors in the syntax of the input file)
program errors (errors encountered while processing the correctly read input)

After an error has occurred the converter would pursue to recover and continue processing. But it should be noted that errors may affect the subsequent processing of the input and could provide unexpected output.

Error Messages: Syntax Errors

Syntax errors inform the user of errors encountered while reading the input file. Syntax errors would normally produce two error messages. The first error message prints the line number and informs that an error has occurred.

line number: syntax error

The second prints the line number and the cause of the error.

line number: cause of the error

After an occurrence of a syntax error, the converter would try to proceed with the reading of the input file as long as it is possible. For example, if an error occurs while reading the contents of a symbol definition, the converter would first try to ignore the erroneous expression and proceed. If this is not possible it would try to ignore the whole symbol definition and proceed. If there are references to an ignored symbol later in the input file, the converter would generate a program error message.

The Syntax Errors

Error Messages: Program Errors

Program errors mainly inform the user of errors encountered while processing the correctly read data. Some syntax errors in the input file could also cause program errors at later stages. Program errors are not fatal errors.

Example program error:

duplicate symbol BUF

The Program Errors

Syntax Error: line no: syntax error

This error message informs the user that an error has been encountered while reading the input file. The message also points to the line no in the input file where the error occurred. After a line no: syntax error message the converter may print another error message pointing to the cause of the error.

Example:

1137: syntax error
1137: unknown function "my_error_test_function"

Syntax Error: line no: unknown function name

A function is defined in the input file as follows

function_name  ( parameters ...)

This error message is produced when an expression in the input file contains a function that is not allowed by the Synopsys Format. The message prints the line number in the input file where the error was encountered and the name of the function in error.

Example:

1137: unknown function "my_error_test_function"

Syntax Error: line no: unknown token after name

This error message informs of errors that occurred in the input file before encountering the keyword library(library_name). The message prints the line number in the input file where the error was encountered and the word immediately preceding the error.

Example:

928: unknown token after "loc"

Syntax Error: line no: ignoring symbol name

If an input file symbol definition contained one or more errors, the converter would first try to continue ignoring only the erroneous expression. If this is not possible it will continue ignoring the erroneous symbol. The error message prints both the line number of the last line of the ignored symbol definition and the name of the ignored symbol.

Example:

101: ignoring symbol "upward_port"

Syntax Error: line no: ignoring layer name

If one or more syntax errors occurred within a layer definition while reading the input file, the converter would first pursue to continue despite the error, but if that is not possible it will pursue to ignore the erroneous layer and to proceed again at the end of the layer. This error message prints the line number that contains the last line of the ignored layer and the name of the layer ignored.

Example:

1221: ignoring layer "test_error_layer"

Syntax Error: line no: unknown expression name

If an error occurs while reading the input file, within the library(library_name) keyword but outside the symbol and layer definitions, it is reported as an unknown expression. The line number of the error and the name of the unknown expression is printed.

Example:

4: unknown expression sdf

Program Error: line no: no symbol name

This error message is generated when a reference is made to a non existing symbol. The most common way that this can happen is when a symbol is ignored by the converter due to syntax errors, but is included as a sub symbol later in the input file. The line number of the error is also printed.

Example:

24: no symbol BUF

Program Error: line no: duplicate symbol name

This error message is generated when there exist multiple definitions of the same symbol in the input file. When a second definition of an existing symbol is encountered, the converter deletes the previous definition and inserts the new definition. The line number points to the last line of the duplicate symbol definition.

Example:

193: duplicate symbol BUF

Program Error: line no: duplicate layer name

This error message is generated when there exist multiple definitions of the same layer in the input file. When a second definition of an existing layer is encountered, the converter deletes the previous definition and inserts the new definition. The line number points to the last line of the duplicate layer definition.

Example:

1275: duplicate layer cell_name_layer

Program Error: symbol name has no elements

This error message informs the user that the converted symbol name contains no graphical information. This may be due to either

  1. The original symbol definition in the input file did not have any graphical information in it.

  2. The graphical information in the symbol was deleted during processing, e.g. the symbol only had zero length lines and the delete_zero_length_lines option was switched on.

Even though the symbol does not have graphical information in it, it will have an entry in the output file output.sym.

Example:

symbol BUF has no elements

Program Error missing slibconv.conf: reverting to defaults

This error message means that the converter was unable to find the configuration file slibconv.conf in the same directory as the converter or in the search path. If the configuration file is not available the converter would proceed with processing the input file using the default values of the configurable options.

Example:

missing slibconv.conf: reverting to defaults

Program Error: unknown parameter in slibconv.conf: option name

This error message informs that there was an unknown option in the configuration file slibconv.conf. Please make sure that only the valid options are included in the configuration file, and that each line confirms to the format of the configuration file.

Example:

unknown parameter in slibconv.conf : test_error

Trouble Shooting (Symbols do not Look the Way they Should)

If the symbols do not look the way they should, please check whether the configuration file options are properly configured and that there are no syntax errors or program errors produced during the conversion process. If the problem has something to do with the graphical attributes of symbols (such as the absence of symbol names) these can be configured through Symbol Attribute Options.

If this is not the case read the description of the Configuration File Options above carefully. Pay particular attention to the option delta. If the pins are not the way they should be, or are not selectable by a mouse click it is most probably due to a too small or too a large delta value.

If you still could not find the source of the problem please do the following:

  1. Turn off all of the following options in the configuration file.

  2. Run the converter and check the output. This output is produced with minimum processing by the converter. If this output is still not according to your expectations, proceed to the next step.

  3. Turn on the options one by one in the following order, run the converter each time an option is switched on, and check the output. This would give you an idea as to where the things go wrong. You can stop at the point where you get a satisfactory output.

  4. If the problem occurs after convert_pins is switched on, then go back to the previous step, and switch on each of the option one by one together with the convert_pins option as a pair (i.e.: both options together at the same time).