KLayout Advanced FeaturesThis manual briefly describes a couple of advanced features of KLayout.
The XOR toolThe XOR tool performs a geometrical XOR (also ANOTB and BNOTA for asymmetric differences) on two layouts by performing the respective boolean operations layer by layer. The XOR tool is started using "XOR Tool" from the "Tools/Verification" menu). Currently, the tool compares all or just the visible layers. Currently, it compares layers from one layout vs. the identical layers from the other layout. The current implementation employs a flat XOR processor. This limits the application somewhat to small and medium sized layouts and does not make use of hierarchy, which basically excludes applications for very hierarchical layouts (i.e. memory arrays). The memory footprint associated with the flat approach can be mitigated by using the tiling feature which performs the operation on a tile with limited size. This does not reduce the run times but the memory requirements. The XOR tool allows to specify tolerances. Basically a tolerance is an undersizing step following the boolean operation. This way, small markers can be suppressed. This is particular useful to remove markers resulting from tiny differences between the layouts being compared. Multiple tolerances can be specified. In that case, multiple undersize steps are performed to create sets of layers with different tolerances each. For example, a tolerance specification of "0,0.001,0.005,0.010" will create four sets (marker categories) containing all difference markers and others for markers indicating differences larger than 1nm, 5nm and 10nm. Tiling can be enabled by entering a tile size into the entry box. For semi-flat layouts such as standard cell blocks, a tile size of 1000 micron is a good starting point. The choice of the tile size mainly determines memory requirements. The XOR tool allows to send the output either to a marker database or to another or one of the input layouts. The mode can be selected with the "Output" drop-down box. If output is sent to one of the original inputs, it is mandatory to specify a layer offset which maps the original layer to a new layer. An offset of "1000/0" for example means, that differences between shapes on layer "16/0" will be sent to "1016/0" for the first tolerance category and "2016/0" for the second. The Diff toolAs the XOR tool, the Diff tool performs a comparison of two layouts. In contrast to the XOR tool, it does a cell-by-cell and object-by-object comparison and reports differing cells, instances and geometrical objects. In effect, the comparison is more strict and not purely geometry-related. It does not verify the identity of the layouts on mask level but rather the exact identity of the objects that comprise the layout file. On the other hand, the Diff tool usually detects the actual changes rather than their effect on geometry. Usually, that kind of comparison is very sensitive to "cosmetic" changes, i.e. cell renaming. KLayout's Diff tool tries to mitigate this effect with these features:
The Diff tool is found in the "Verification" sub-menu of the "Tools" menu. In this dialog
The Diff tool will create a marker database and show the results in the marker database browser. The fill (tiling) utilityThe fill utility creates a regular pattern of fill unit cell instances in certain areas of a layout. This feature is usually refered to as "tiling" or "fill". It is based on a rectangular unit cell which is repeated in x- and y-direction to fill the available space. In most cases, the intention is to fill empty areas in the layout to enhance the layout uniformity for a better process performance. Before the fill utility can be used, a fill cell must be prepared in the layout that is filled. The dimension of the cell are defined by a box drawn on an arbitrary layer. This box must represent the "footprint" of the cell. This is the space that one instance will cover in the region to be filled. The fill utility is found in the "Utilities" sub-menu of the "edit" menu and is available in edit mode only. To use this utility, open the dialog and
By default, the fill utility operates on a fixed raster. This can lead to a poor fill efficiency in some cases. The fill utility offers a "Enhanced fill" option, where it tries to find a cell arrangement which is not necessarily on a common raster but provides a better fill performance. In addition, second-order fill is supported. In that case, a second - usually smaller - fill cell can be specified which is used to fill the remaining areas of the layout. The following screenshots show the effect of the different fill modes for some artificial fill problem.
Importing Gerber PCB filesGerber PCB import allows to create GDS layout data from Gerber PCB files or to add Gerber files to GDS files as new layers. The import function supports a majority of the RS274X features for artwork files and a couple of different formats for the drill files. The importer will take a set of files and convert them to layout geometry. The importer offers some functionality to adjust the data appropriately, i.e. to define output layers and apply geometrical transformations. Another basic capability is to merge the geometry of a layer to remove overlaps and join paths into larger polygons.
Because of the manifold options, the import specification can become pretty complex. Therefore, it can be saved into a file (suggested suffix is ".pcb") in XML format which contains the importer specifications. Once such a file is created, KLayout can read this file like usual stream files (i.e. it can be specified on the command line) and use it as a recipe to import the associated Gerber files. The PCB import function is available in the "File" menu ("Import/Gerber PCB"). Different entry points are provided that start a new project, open an existing project or to continue with the last project. The basic workflow to import PCB data is:
The basic decision is how to specify the layer mapping. In free mode, the specification requires these steps:
In layer stack mode, the specification workflow consists of these steps:
The import dialogThe import dialog is organized in multiple pages that reflect the workflow for the import specification. On every page, the "File" menu button allows to save the current settings as a PCB import project, to open an existing project or to create a new project and to restart from scratch.
The first page offers some basic options:
The layer stack flow
In the layer stack flow, on the first page, a sequence of metal and via layers must be specified. The assignment of metal and via layers is done automatically. The sequence is always a metal layer followed by a via layer. The number of layers must be odd so the last layer is a metal layer again. Via layers will connect the adjacent metal layers only. Use the "+" button to add new layers. Move layers by selecting them and moving them up or down with the arrow buttons. Use the "X" button to remove all selected layers.
On the next page, the number of artwork and drill files needs to be specified. Later, the actual files need to be entered and assigned to metal or via layers. In addition the chip mounting position needs to be specified. In "top mounting" mode, it is assumed that the chip is placed surface down on the top (first) PCB layer. Thus the first metal above the chip stack will be the top PCB layer. In "bottom mounting" mode, the last PCB metal layer will be the first metal layer above the chip stack.
On the "Artwork Files" page, the artfile file names must be entered. They are automatically assigned to the respective metal layers. The assignment order depends on the mounting mode.
On the "Drill Files" page, the drill file names must be entered. Each drill file describes a certain drill step, which can connect multiple metal layers. On this page, this specification must be made. The first and last metal layer connected by the plated hole must be specified. The corresponding via layers will then be used to create via shapes. The free layer mapping flow
On the "Files" page, all PCB data files must be specified. This includes artwork and drill files. The order is not important but it is recommended to follow the physical stacking. This simplifies the assignment to GDS layers later. Use the arrow buttons to move the selected entries up or down. Use the "X" button to delete files from the list and use the "+" button to add new files.
On the "Layout Layers" page all target layers must be specified. Provide a list with all layers that are used as target layers for the import. Again, the order is not important but maintaining a technological order will simplify the assignment in the next step. As on the previous page use the arrow buttons to move selected entries and the "+" and "X" button to add new entries and deleted the selected ones.
On the "Layer Mapping" page, each file can be assigned to one or may GDS layers. The assignment is described in form of a matrix where an "x" means that the file or layer given by the row is imported into the layer given by the column. A file can be imported into multiple layers which basically will duplicate the shapes. Click at the boxes to set or reset the mark. Use the "X" button on the left to reset all marks for the rows selected. General options
The "Coordinate Mapping" page allows to specify the transformation of the PCB data into the GDS space. Since PCB and GDS rarely share the origin, a transformation can be specified which is applied to the shapes when importing them. A specification can be made in two ways:
Hint: Both specifications can be combined, i.e. one coordinate pair can be given to define the displacement and the rotation can be specified explicitly.
Finally, on the "Options" page, various options can be set:
Importing other layout filesThis function can merge other layouts into the layout loaded. Merging means that the hierarchy of the specified layout is inserted into the given layout. Different modes are available that control the way how the hierarchy is merged. This function is available in the "File" menu as "Import/Other File Into Current". The workflow for importing a different layout is this:
Four import modes are available that control how the hierarchy of the imported layout is inserted into the existing layout:
The import function will create new cell names using the "$x" suffix to avoid name ambiguities. The net tracing featureThe net tracing function allows to trace a net by detecting touching shapes that together form a conductive region. It allows to specify a metal stack of metal (or in general "conductive") layers optionally connected through via shapes. The net tracing algorithm will follow connections over the via shapes to form connections to other metal layers. The algorithm is intended for extracting single nets and employs an incremental extraction approach. Therefore extraction of a single small net is comparatively fast while extraction of large nets such as power nets is considerably slower compared to hierarchical LVS tools currently. The net tracing function can be found in the "Tools" menu. The user interface allows to trace multiple nets which are stored in a list of nets extracted. If labels are found on the nets, these are used to derive a net name. Beside that, the cells which are traversed in the net extraction are listed, so the cells being connected by this net can be identified. Before nets can be extracted, a layer stack must be specified. Press "Layer Stack" on the user interface to open the layer stack dialog. Layers must be specified in the "layer/datatype" notation. The via specification is optional. If no via layer is specified, both metal layer shapes are required to touch in order to form a connection. If a via layer is specified, a via shape must be present to form the connection. If a layer stack has been defined, a net can be traced by pressing the "Trace Net" button and clicking on a point in the layout. Starting from shapes found under this point, the net is extracted and listed in the net list on the left side of the net tracing dialog. If "Lock" is checked, another net can be traced by clicking at another point without having to press the "Trace Net" button again. The "Trace Path" function works similar but allows to specify two points and let the algorithm find the shortest connection (in terms of shape count, not geometrical length) between those points. If the points are not connected, a message is given which indicates that no path leads from one point to the other. The display of the nets can be configured in many ways. The configuration dialog is opened when "Configure" is pressed in the trace net dialog. Beside the color and style of the markers used to display the net it can be specified if and how the window is changed to fit the net. |