<INPUTGDSII 
"INPUT GDSII 

Reads an input file in GDSII format and from it creates a LEF file containing only geometric data and a status report file.


Syntax

INP*UT G*DSII 
F*ILENAME gds2File 
O*UTPUT lefFile 
[R*EPORTFILE reportFile] 
{ MAPFILE mapFileName 
| {L*AYER gds2LayerList 
M*AP lefLayerName}... 	
{P*IN gds2LayerList 	
[M*AP lefLayerName]}... 	
{P*ORT gds2LayerList}... 	
[B*LOCKAGE gds2LayerList]... 	
[E*XCLUDE {B*OUNDARY | P*ATH | BOX} 
gds2LayerList]... 	
[PINA*RBITRATION gds2LayerList]... } 
[MERGEP*IN] 
[MERGEO*BS 	
[FI*LL [L*AYER gds2LayerList 		     
[SP*ACING spacing]]...]] ;
gds2LayerList = 
{gds2Lay | gds2Lay1 TO gds2Lay2}...


Arguments

FILENAME gds2File
Specifies the input GDSII file.

OUTPUT lefFile
Specifies the name to give to the resulting LEF file.

REPORTFILE reportFile
Specifies the GDSII report file name. Default: inpGds.rpt in the current directory

MAPFILE mapFileName
Specifies that the GDSII mapping information is given in a named file. The mapping file can be used to store both input and output GDSII mapping information.

For INPUT GDSII, the mapping file is an ASCII file composed of statements, each statement terminated by a semicolon (;). Each line can have several statements, and a statement can occupy several lines. Comments start with a pound sign (#) and go until the end of line. Multiple line comments must have the pound sign at the start of each line. 

The syntax for the mapping file is the following:

{L*AYER gds2LayerList M*AP lefLayerName}... 
{P*IN gds2LayerList [M*AP lefLayerName]}... 
{P*ORT gds2LayerList}... 
[B*LOCKAGE gds2LayerList]... 
[E*XCLUDE {B*OUNDARY | P*ATH | BOX} 
gds2LayerList]... 
[PINA*RBITRATION gds2LayerList]...

LAYER
Indicates that mapping of GDSII layer numbers to LEF layer names follows.

gds2Lay
GDSII layer number (integer between 0 and 63).

gds2Lay1
GDSII layer number of the lower bound of a continuous layer set.

gds2Lay2
GDSII layer number of the upper bound of a continuous layer set.

TO
Keyword connecting the range limits.

MAP lefLayer
Layer name to be used in LEF file.

PIN gds2LayerList MAP lefLayer
Specifies GDSII layers containing pin names (pin layers). The MAP syntax associates the pins on the gds2LayerList with metals or geometries on lefLayer. However, if two or more port geometries on the same lefLayer are close to the pin text, then the PIN-ARBITRATION list resolves ambiguity.

PORT
Specifies GDSII layers containing port geometries.

BLOCKAGE
Specifies GDSII layers containing obstructions.

EXCLUDE
Specifies that some GDSII data is to be ignored. This data can be BOUNDARY, PATH, or BOX information and associated layers.

PINARBITRATION
List of GDSII layers in descending order of priority; defined to resolve ambiguity in pin-port relations.

MERGEPIN
Merges the redundant geometries of objects (rectangles with the same layer) in the PINPORT statement. Vias are left as they are (with no merge operation). Performs merge operations according to the pin shape (abutment, feedthrough) informaton.

MERGEOBS
Merges the same layer rectangles in the OBS statement. Vias are left as they are. The FILL option fills any space between obstructions that is less than or equal to the space you specify in the SPACING option, or defaulting to twice the spacing rule of the layer. 

Default SPACING values do not affect the routability of the macro, because no wires can be routed in a space that is less than the twice the spacing rule of that layer. 

You must be careful when choosing a spacing that might change the routability of the macro defined. If you give a large distance (larger than the twice the distance of the spacing rule on a given layer) for a SPACING option, INPUT GDSII fills in spaces without considering other factors, and can eliminate possible routing tracks. If necessary, FILL can add dummy obstruction rectangles to cover obstruction vias.


Description

INPUT GDSII reads a GDSII file and from it creates a LEF file containing geometric data only, plus a report file reporting status, errors, and warnings. You can use the output LEF file from this command as input to INPUT LEF to add GDSII geometries to the current database.

Before you can use INPUT GDSII, a memory-resident database must exist that contains the following.

- Technology section with all layer and via data; via geometries are optional

- Site section

- Macro section with all its data, except what you can add by a subsequent INPUT LEF

IMPORTANT: Do not use INPUT GDSII to create cover macros.

GDSII Input Data

Before running INPUT GDSII, prepare the source data as described below. Pin, port, and blockage layers are those identified by corresponding INPUT GDSII operands.

- Vias 
Use GDSII STRUCTURE, which contains BOUNDARY or BOX elements, to define via geometries. The structure name becomes the via name by default. Each via must have its origin in the center; that is, its coordinates are (-x, -y), (x, y). Vias read must have at most three layers and one rectangle per layer.

- Ports 
Use GDSII BOUNDARY, BOX, or PATH with layer in one of the port layers, to define port geometry; or use GDSII SREF references to a via structure.

- Obstructions 
Define these objects in the same way as port geometries, but in blockage layers or disjoined from port geometries.

- Pins 
Use GDSII TEXT elements in one of the pin layers.

INPUT GDSII ignores the following data.

- Elements other than TEXT, BOUNDARY, PATH, BOX, or SREF types

- Geometry data (BOUNDARY, PATH, or BOX elements) that do not have their layer mapping defined (after the LAYER keyword)

- Text data not in the layers specified (after the PIN keyword)

- PATH elements with path type other than 0 (square-end paths that end flush with end points) or 2 (square-end paths that extend a half-width beyond end points)

- SREF element references to structures other than the predefined vias

- Any magnification, rotation, or reflection factors

When defining a pin name, make sure that the TEXT element does not have any ambiguous coordinates, or an error message is returned. 

In particular, if (x, y) is the TEXT coordinate of pin A, and portGeoA is the set of all electrically connected port geometries of pin A, then one of the following must be valid:

- (x, y) is in a port geometry in portGeoA, but not in any port geometries not in portGeoA.

- (x, y) is not in any port geometries, and all the port geometries closest to (x, y) are in portGeoA. Here, the ``port geometries closest to (x, y)'' is the set of geometries that is the shortest Euclidean distance from (x, y).

- PINARBITRATION under INPUT GDSII must unambiguously determine a port geometry to associate with (x, y). For example, assume (x, y) is in port geometries port1 and port2. If the layer of port1 is defined with higher priority than the layer of port2, port1 is associated with pin A. If the layers are not prioritized, an error results.

Pins that contain disjoined geometries, such as multiple disjoined ports, must use the same pin name for each port geometry so that pin-port information is correctly deduced.

INPUT GDSII can handle special characters--control characters (control- x, and so forth) and white space characters (spaces and tabs)--in GDSII TEXT data corresponding to pin names. If the GDSII.LibRead.ReplaceChar environmental variable is true, INPUT GDSII replaces them with GDSII.LibRead.ReplaceChar.Ctl and GDSII.LibRead.Replace-Char.White, respectively. These in turn must be set to NULL (''.) or to a single printable character.

Output File

The output file is a LEF file with partial Technology and Macro sections supplementing information present in the memory-resident database. The Technology section contains the following statements for each via that has geometries extracted from the GDSII input:

VIA statement 
LAYER statement 
RECT statement

The Macro section contains the following statements for each macro that has geometries extracted from the GDSII input:

MACRO statement 
PIN statement 
PORT statement 			
LAYER statement 			
WIDTH statement 			
RECT statement 			
VIA statement 	
OBS statement 		
LAYER statement 		
WIDTH statement 		
RECT statement 		
PATH statement 		
VIA statement

Each geometry extracted from a GDSII structure is adjusted by subtracting corresponding X and Y offsets defined by the FOREIGN statement in the original LEF file.

When a macro or via geometry is already defined in the current database, associated geometric data in the GDSII file is ignored. When extracting pin-port geometries for a macro, do not include any dummy pin-ports (see INPUT LEF command description) in the LEF file macro definition or INPUT GDSII assumes that the macro has port geometries already defined and ignores the associated geometric data in the GDSII input.

Pin Geometries

When determining pin geometries, INPUT GDSII traces connectivity through vias and across paths to identify all of its electrical connections.

If GDSII.LibRead.Handle.NonOrthogonal.Shapes is set to IGNORE and a geometry contains nonorthogonal data, a problem message results. Nonorthogonal parallelogram geometries are used in connectivity tracing, but appear in the LEF file as comments. If a GDSII boundary or box element contains a nonparallelogram geometry, an error message is generated, the element is ignored during connectivity tracing, and it does not appear in the LEF file.

If GDSII.LibRead.Handle.NonOrthogonal.Shapes is set to BOUNDINGBOX or ORTHOLINEARPOLYGON, then for each nonorthogonal shape with four or more sides (whether a parallelogram or not) INPUT GDSII creates a rectilinear polygon of the specified type that bounds the original geometry. The resulting rectilinear polygon is used for connectivity tracing and appears in the LEF file as a set of abutted rectangles. Comments in the output LEF indicate modified data.

Using ORTHOLINEARPOLYGON gives stair-steps around all angle edges. You can control how the stair-steps are generated by how you define the GDSII data. For example, if you describe a one-angled edge using two points, you get one ``L'' polygon bounding it. If you add collinear points to the edge description, you get one ``L'' for each additional point, and a finer stair-step in the polygon.

Blockages

Data for geometries in blockage layers appear as obstructions in the LEF file. If GDSII.LibRead.DefaultBlockage is true, then all geometries not associated with a pin-port after connectivity tracing become obstructions. If that variable is false, then geometries not associated with a pin-port (and not in a blockage layer) are ignored.

Cut Layers

Data for geometries in cut layers are handled as follows:

- If GDSII.LibRead.Handle.NonOrthogonal.Shapes is IGNORE, then

-- If the geometry is not an orthogonal rectangle or the current database does not have a via with the same cut geometry, an error message is issued and the geometry is ignored.

-- Otherwise, the cut geometry is considered part of an exploded via. The center (x, y) is calculated, and the geometry is replaced by the corresponding via geometry with center at (x, y). When multiple vias contain the same cut geometry, the first associated via in the database is used.

- If GDSII.LibRead.Handle.NonOrthogonal.Shapes is BOUNDINGBOX or ORTHOLINEARPOLYGON, then for each nonorthogonal shape with four or more sides (whether a parallelogram or not), INPUT GDSII creates a rectilinear polygon of the specified type. 

The resulting rectilinear polygon is used for connectivity tracing and appears in LEF as a set of abutted rectangles.

Masterslice Geometries
When a masterslice geometry of width W (in GDSII database units) connects two geometries A and B that are not otherwise connected, INPUT GDSII does the following.

- If W is less than GDSII.LibRead.Min.PathWidth, A and B are considered different ports, and the masterslice geometry does not appear in the LEF file.

- If W is greater than or equal to GDSII.LibRead.Min.PathWidth, A and B are considered a single port, and the masterslice layer does appear in the LEF file.

Foreign References

When a pin or macro name in the database is different than that used in the GDSII system, the database must have the corresponding FOREIGN name assignment in the pin or macro definition. 

For example, a pin labeled A in the database might have the name A:I in GDSII, or a macro labeled BUFA in the database might be called BUFAH in GDSII. In this case, the pin definition for A must include the statement FOREIGN A:I and the macro definition for BUFA must include FOREIGN BUFAH.

If a macro has multiple foreign name references in the database, it is called a super macro and contains all GDSII structures referenced by the macro. Only offsets of X and Y are handled when composing a supermacro; orientation is ignored. Layers can contain text data other than pin names, so any text entry that does not match a pin name or foreign name reference in the database is ignored.

A GDSII structure is ignored whenever:

- The structure name is not defined in the database as a via or macro name or as a foreign name referenced by a via or macro.

- The corresponding via or macro has geometry data already defined in the database.

Redundant Geometries

GDSII files that are generated by automated tools can include redundant geometries such as overlapping or adjacent rectangles. For these libraries, use the geometry merging options MERGEPIN and MERGEOBS to reduce the number of geometries without changing the routability of the macros. 


Environmental Variables

GDSII.LibRead.DefaultBlockage 
BOOLEAN - Default: true - NOVICE 
If true, all geometries not associated with a pin-port after connectivity tracing become obstructions in the LEF file.

GDSII.LibRead.Handle.NonOrthogonal.Shapes 
STRING - {Ignore | BoundingBox | OrtholinearPolygon} - Default: ignore - NOVICE 
For ignore, INPUT GDSII issues warnings on encountering nonorthogonal shapes. For boundingBox or ortholinearPolygon, INPUT GDSII creates rectilinear polygons of the specified type for each nonorthogonal shape, whether or not it is a parallelogram. OrtholinearPolygon takes every adjacent pair of points that is a diagonal and converts it into the ``L'' that bounds the line, enclosing the polygon and merging collinear points.

GDSII.LibRead.Min.PathWidth 
INTEGER - Default: 0 - NOVICE 
Minimum width in GDSII units of masterslice geometries for pin-port derivation.

GDSII.LibRead.ReplaceChar 
BOOLEAN - Default: false - NOVICE 
If true, TEXT data is transformed by replacing spaces and tabs with GDSII.LibRead.ReplaceChar.White, and control and special characters with GDSII.LibRead.ReplaceChar.Ctl.

GDSII.LibRead.ReplaceChar.Ctl 
STRING - Default: ``'' - NOVICE 
Replacement character for control and special (unprintable) characters.
GDSII.LibRead.ReplaceChar.White STRING - Default: ``'' - NOVICE Replacement character for spaces and tabs.


Examples

The following command invocation shows a sample GDSII mapping.

INPUT GDSII 
FILENAME TEST.GDS	
# GDSII file name
OUTPUT TEST.LEF 	
# output file name 	
REPORTFILE TEST.RPT	
# report file name 	
LAYER 1 2 3 MAP PW	
# layer mappings 	
LAYER 4 TO 6 MAP NW							 	
LAYER 7 MAP PD 	
LAYER 8 MAP ND 	
LAYER 21 25 MAP POLYS 	
LAYER 46 6 MAP M1 	
LAYER 47 7 MAP M2 	
PIN 50 51 		
# pins in 50 and 51 	
BLOCKAGE 30 35		
# obs in 30 and 35 	
EXCLUDE BOUNDARY 3	
# ignore boundary data
# in layer 3
EXCLUDE PATH 21		
# ignore path data in
# layer 21
EXCLUDE BOX 6 7		
# ignore box data in
# layers 6 and 7
PINARBITRATION 6 46 7 47 21 25 		
# define layer priority 
# (high to low) to 		
# resolve pin-port
# ambiguities
PORT 6 7 21 25 46 47 	
# layers containing
# port geometries 	
; 

The following is a sample output file:

# LEF FILE GENERATED BY GDSII LIBRARY READER 
# INPUT FILE NAME: TEST.GDS 	
# OUTPUT FILE NAME: TEST.LEF 	
# REPORT FILE NAME: TEST.RPT

# VIA GEOMETRIES EXTRACTED FROM GDSII
VIA HOLE 
LAYER ALA ; RECT -1.6 -1.6 1.6 1.6 ; 
LAYER HOLE ; RECT -0.5 -0.5 0.5 0.5 ; 		
LAYER ALB ; RECT -1.6 -1.6 1.6 1.6 ; 		
END HOLE 		
. . . 		
# END OF VIA GEOMETRIES

# MACRO GEOMETRIES EXTRACTED FROM GDSII

MACRO BUF1 
PIN A 
PORT 			
LAYER ALB ; WIDTH 3 ; PATH 5 3 5 69 ; 			
LAYER ALA ; WIDTH 2 ; PATH 5 55 15 55 ; 				
PATH 15 55 15 17 ; PATH 15 17 5 17 ; 				
VIA 5 17 CT ; VIA 5 55 CT ; END END A 		
PIN X 			
PORT 			
LAYER ALB ; RECT 8.5 0 11.5 72 ; 			
LAYER ALA ; WIDTH 20 ; PATH 10 59 15 59 ; 			
VIA 10 59 HL ; END END X 		
PIN VDD 			
PORT 			
LAYER ALA ; WIDTH 7 ; 			
PATH 3.5 2.5 16.5 2.5 ; END END VDD 		
PIN VSS 			
PORT 			
LAYER ALA ; WIDTH 7 ; 			
PATH 3.5 69.5 16.5 69.5 ; END END VSS 		
OBS 			
LAYER ALA ; RECT 4 5 17 67 ; END END BUF1 		
. . . 		
# END OF MACRO GEOMETRIES 		
# 		
END LIBRARY


Related Command

INPUT LEF reads LEF files and creates or updates a library database. For example, it can read the LEF file created by INPUT GDSII.
"

	<Type QHELP>
	<Header "Input GDSII Command Help">
<beginAutoGen "** Do not edit from here to the endAutoGen tag **" >
<endAutoGen >
>
