Some functions are available on global level and can be used without any object. Most of them are convenience functions that basically act on some default object or provide function-like alternatives for the methods.
Usage:
See Netter#antenna_check for a description of that function.
Usage:
Use this class with extract_devices to specify extraction of a bipolar junction transistor
See DeviceExtractorBJT3Transistor for more details about this extractor.
Usage:
Use this class with extract_devices to specify extraction of a bipolar junction transistor with a substrate terminal
See DeviceExtractorBJT4Transistor for more details about this extractor.
Usage:
This function creates a box object. The arguments are the same than for the DBox constructors.
Usage:
Use this class with extract_devices to specify extraction of a capacitor. The area_cap argument is the capacitance in Farad per square micrometer.
See DeviceExtractorCapacitor for more details about this extractor.
Usage:
Use this class with extract_devices to specify extraction of a capacitor with a bulk terminal. The area_cap argument is the capacitance in Farad per square micrometer.
See DeviceExtractorCapacitorWithBulk for more details about this extractor.
Usage:
See Source#cell for a description of that function. In addition to the functionality described there, the global function will also send the output to the specified cell.
The following code will select cell "MACRO" from the input layout:
cell("MACRO") # shapes now will be taken from cell "MACRO" l1 = input(1, 0)
Usage:
Hierarchy cheats can be used in deep mode to shortcut hierarchy evaluation for certain cells and consider their local configuration only. Cheats are useful for example when dealing with memory arrays. Often such arrays are build from unit cells and those often overlap with their neighbors. Now, if the hierarchical engine encounters such a situation, it will first analyse all these interactions (which can be expensive) and then it may come to the conclusion that boundary instances need to be handled differently than inside instances. This in turn might lead to propagation of shapes and in an LVS context to device externalisation: because some devices might have different parameters for boundary cells than for inside cells, the device instances can no longer be kept inside the unit cell. Specifically for memory arrays, this is not desired as eventually this leads to flattening of the whole array.
The solution is to cheat: provided the unit cell is fully fledged and neighbors do not disturb the unit cell's configuration in critical ways, the unit cell can be treated as being isolated and results are put together in the usual way.
Cheats can be applied on layout operations - specifically booleans - and device extraction operations. Cheats are only effective in deep mode.
For booleans, a cheat means that the cheating cell's boolean results are computed locally and are combined afterwards. A cheat is introduced this way:
deep l1 = input(1, 0) l2 = input(2, 0) # usual booleans l1and2 = l1 & l2 # will compute "UNIT_CELL" isolated and everything else in normal hierarchical mode: l1minus2 = cheat("UNIT_CELL) { l1 - l2 }
The cheat block can also be wrapped in do .. end statements and can return multiple layer objects:
deep l1 = input(1, 0) l2 = input(2, 0) # computes both AND and NOT of l1 and l2 with cheating for "UNIT_CELL" l1and2, l1minus2 = cheat("UNIT_CELL) do [ l1 & l2, l1 - l2 ] end
(Technically, the cheat code block is a Ruby Proc and cannot create variables outside its scope. Hence the results of this code block have to be passed through the "cheat" method).
To apply cheats for device extraction, use the following scheme:
deep poly = input(1, 0) active = input(2, 0) sd = active - poly gate = active & poly # device extraction with cheating for "UNIT_CELL": cheat("UNIT_CELL") do extract_devices(mos3("NMOS"), { "SD" => sd, "G" => gate, "tS" => sd, "tD" => sd, "tG" => poly } end
The argument to the cheat method is a list of cell name pattern (glob-style pattern). For example:
cheat("UNIT_CELL*") { ... } cheat("UNIT_CELL1", "UNIT_CELL2") { ... } cheat("UNIT_CELL{1,2}") { ... }
For LVS applications, it's usually sufficient to cheat in the device extraction step. Cheats have been introduced in version 0.26.1.
Usage:
See Netter#clear_connections for a description of that function.
Usage:
See Source#clip for a description of that function.
The following code will select shapes within a 500x600 micron rectangle (lower left corner at 0,0) from the input layout. The shapes will be clipped to that rectangle:
clip(0.mm, 0.mm, 0.5.mm, 0.6.mm) # shapes now will be taken from the given rectangle and clipped to it l1 = input(1, 0)
Usage:
See Netter#connect for a description of that function.
Usage:
See Netter#connect_global for a description of that function.
Usage:
See Netter#connect_implicit for a description of that function.
Usage:
Without any argument, this method gets the database unit used inside the DRC engine.
With an argument, sets the database unit used internally in the DRC engine. Without using that method, the database unit is automatically taken as the database unit of the last input. A specific database unit can be set in order to optimize for two layouts (i.e. take the largest common denominator). When the database unit is set, it must be set at the beginning of the script and before any operation that uses it.
Usage:
In deep mode, the operations will be performed in a hierarchical fashion. Sometimes this reduces the time and memory required for an operation, but this will also add some overhead for the hierarchical analysis.
"deepness" is a property of layers. Layers created with "input" while in deep mode carry hierarchy. Operations involving such layers at the only or the first argument are carried out in hierarchical mode.
Hierarchical mode has some more implications, like "merged_semantics" being implied always. Sometimes cell variants will be created.
Deep mode can be cancelled with tiles or flat.
Usage:
See Netter#device_scaling for a description of that function.
Usage:
Use this class with extract_devices to specify extraction of a planar diode
See DeviceExtractorDiode for more details about this extractor.
Usage:
Use this class with extract_devices to specify extraction of a three-terminal DMOS transistor. A DMOS transistor is essentially the same than a MOS transistor, but source and drain are separated.
See DeviceExtractorMOS3Transistor for more details about this extractor (strict mode applies for 'dmos3').
Usage:
Use this class with extract_devices to specify extraction of a four-terminal DMOS transistor. A DMOS transistor is essentially the same than a MOS transistor, but source and drain are separated.
See DeviceExtractorMOS4Transistor for more details about this extractor (strict mode applies for 'dmos4').
Usage:
This function creates an edge object. The arguments are the same than for the DEdge constructors.
Usage:
The intention of that method is to create an empty layer which can be filled with edge objects using Layer#insert.
Usage:
Similar to log, but the message is printed formatted as an error
Usage:
See Source#extent for a description of that function.
Usage:
See Netter#extract_devices for a description of that function.
Usage:
Disables tiling mode. Tiling mode can be enabled again with tiles later.
Usage:
Prints the message to the log window in verbose mode. In non-verbose more, nothing is printed. log is a function that always prints a message.
Usage:
See Source#input for a description of that function. This method will fetch polygons and labels. See polygons and labels for more specific versions of this method.
Usage:
Usage:
Usage:
See Netter#l2n_data for a description of that function.
Usage:
See Source#labels for a description of that function.
Usage:
See Source#layers for a description of that function.
Usage:
This function can be used to specify a new layout for input. It returns an Source object representing that layout. The "input" method of that object can be used to get input layers for that layout.
"what" specifies what input to use. "what" be either
Without any arguments the default layout is returned.
If a file name is given, a cell name can be specified as the second argument. If not, the top cell is taken which must be unique in that case.
Having specified a layout for input enables to use the input method for getting input:
# XOR between layers 1 or the default input and "second_layout.gds": l2 = layout("second_layout.gds") (input(1, 0) ^ l2.input(1, 0)).output(100, 0)
For further methods on the source object see Source.
Usage:
Prints the message to the log window. info is a function that prints a message only if verbose mode is enabled.
Usage:
After using that method, the log output is sent to the given file instead of the logger window or the terminal.
Usage:
The intention of this method is to provide an empty polygon layer based on the hierarchical scheme selected. This will create a new layer with the hierarchy of the current layout in deep mode and a flat layer in flat mode. This method is similar to polygon_layer, but the latter does not create a hierarchical layer. Hence the layer created by make_layer is suitable for use in device extraction for example, while the one delivered by polygon_layer is not.
On the other hand, a layer created by the make_layer method is not intended to be filled with Layer#insert.
Usage:
Use this class with extract_devices to specify extraction of a three-terminal MOS transistor.
See DeviceExtractorMOS3Transistor for more details about this extractor (non-strict mode applies for 'mos3').
Usage:
Use this class with extract_devices to specify extraction of a four-terminal MOS transistor.
See DeviceExtractorMOS4Transistor for more details about this extractor (non-strict mode applies for 'mos4').
The netlist is a Netlist object. If no netlist is extracted yet, this method will trigger the extraction process. See Netter#netlist for a description of this function.
Usage:
See Netter for more details
Usage:
Resets the tile borders - see tile_borders for a description of tile borders.
Usage:
This function is equivalent to "layer.output(args)". See Layer#output for details about this function.
Usage:
This method switches output to the specified cell, but does not change the target layout nor does it switch the output channel to layout if is report database.
Usage:
A point is not a valid object by itself, but it is useful for creating paths for polygons:
x = polygon_layer x.insert(polygon([ p(0, 0), p(16.0, 0), p(8.0, 8.0) ]))
Usage:
This function creates a path object. The arguments are the same than for the DPath constructors.
Usage:
This function creates a polygon object. The arguments are the same than for the DPolygon constructors.
Usage:
The intention of that method is to create an empty layer which can be filled with polygon-like objects using Layer#insert. A similar method which creates a hierarchical layer in deep mode is make_layer. This other layer is better suited for use with device extraction.
Usage:
See Source#polygons for a description of that function.
Usage:
After specifying a report database for output, output method calls are redirected to the report database. The format of the output calls changes and a category name plus description can be specified rather than a layer/datatype number of layer name. See the description of the output method for details.
If a filename is given, the report database will be written to the specified file name. Otherwise it will be shown but not written.
If external input is specified with source, "report" must be called after "source".
The cellname specifies the top cell used for the report file. By default this is the cell name of the default source. If there is no source layout you'll need to give the cell name in the third parameter.
Usage:
This method applies to runsets creating a netlist through extraction. Extraction happens when connections and/or device extractions are made. If this statement is used, the extracted netlist plus the net and device shapes are turned into a layout-to-netlist report (L2N database) and shown in the netlist browser window. If a file name is given, the report will also be written to the given file. If a file name is given and "long" is true, a verbose version of the L2N DB format will be used.
Usage:
Use this class with extract_devices to specify extraction of a resistor.
The sheet_rho value is the sheet resistance in ohms/square. It is used to compute the resistance from the geometry.
See DeviceExtractorResistor for more details about this extractor.
Usage:
Use this class with extract_devices to specify extraction of a resistor with a bulk terminal. The sheet_rho value is the sheet resistance in ohms/square.
See DeviceExtractorResistorWithBulk for more details about this extractor.
Usage:
See Source#select for a description of that function.
Usage:
This function is equivalent to "verbose(false)" (see verbose)
Usage:
This function replaces the default source layout by the specified file. If this function is not used, the currently active layout is used as input.
layout is a similar method which specifies a additional input layout.
"what" specifies what input to use. "what" be either
Without any arguments the default layout is returned. If a filename is given, a cell name can be specified as the second argument. If none is specified, the top cell is taken which must be unique in that case.
# XOR between layers 1 of "first_layout.gds" and "second_layout.gds" and sends the results to "xor_layout.gds": target("xor_layout.gds") source("first_layout.gds") l2 = layout("second_layout.gds") (input(1, 0) ^ l2.input(1, 0)).output(100, 0)
For further methods on the source object see Source.
Usage:
This function can be used to specify a target layout for output. Subsequent calls of "output" will send their results to that target layout. Using "target" will disable output to a report database. If any target was specified before, that target will be closed and a new target will be set up.
"what" specifies what input to use. "what" be either
Except if the argument is a Cell object, a cellname can be specified stating the cell name under which the results are saved. If no cellname is specified, either the current cell or "TOP" is used.
Usage:
This method applies to runsets creating a netlist through extraction. Extraction happens when connections and/or device extractions are made. If this statement is used, the extracted netlist is written to the given file.
The format parameter specifies the writer to use. You can use nil to use the standard format or produce a SPICE writer with write_spice. See write_spice for more details.
Usage:
If using threads, tiles are distributed on multiple CPU cores for parallelization. Still, all tiles must be processed before the operation proceeds with the next statement.
Usage:
The tile border specifies the distance to which shapes are collected into the tile. In order words, when processing a tile, shapes within the border distance participate in the operations.
For some operations such as booleans (and, or, ...), size and the DRC functions (width, space, ...) a tile border is automatically established. For other operations such as with_area or edges, the exact distance is unknown, because such operations may have a long range. In that cases, no border is used. The tile_borders function may be used to specify a minimum border which is used in that case. That allows taking into account at least shapes within the given range, although not necessarily all.
To reset the tile borders, use no_borders or "tile_borders(nil)".
Usage:
Specifies tiling mode. In tiling mode, the DRC operations are evaluated in tiles with width w and height h. With one argument, square tiles with width and height t are used.
Special care must be taken when using tiling mode, since some operations may not behave as expected at the borders of the tile. Tiles can be made overlapping by specifying a tile border dimension with tile_borders. Some operations like sizing, the DRC functions specify a tile border implicitly. Other operations without a defined range won't do so and the consequences of tiling mode can be difficult to predict.
In tiling mode, the memory requirements are usually smaller (depending on the choice of the tile size) and multi-CPU support is enabled (see threads). To disable tiling mode use flat or deep.
Tiling mode will disable deep mode (see deep).
Usage:
In verbose mode, more output is generated in the log file
Usage:
In verbose mode, more output is generated in the log file
Usage:
Use this option in target_netlist for the format parameter to specify SPICE format. "use_net_names" and "with_comments" are boolean parameters indicating whether to use named nets (numbers if false) and whether to add information comments such as instance coordinates or pin names.