#

## units

Cause distance measurements to be interpreted by default (with no suffix provied) as measurments of the selected units, and also cause distance measurements to be printed in the selected units.

### Usage:

> units [internal|lambda|user|grid|microns|default] [print|noprint]
> or
> units [list]

### Summary:

> The units command causes printed measurements to be given in the selected units. The possible unit types are internal, the size of the internal database units, lambda, the lambda grid based on the technology minimum feature size, user (or grid), based on the value given by the user to the grid command, or microns, which are physical units dependent on the CIF or GDS output scaling as defined in the technology file.

> The units command also changes the way that distance measurements are interpreted in commands that take distance arguments, such as move, copy, and stretch. An integer number with no other identifying units is interpreted as a measurement in the current units type. All other measurements must have an identifying unit: i for internal units, l for lambda units, and g for user grid units, as well as the usual metric units such as um for microns, nm for nanometers, and so forth. See the reference page on distance measures for a complete description of distance values.

> For printed units, the additional argument print causes the units to be printed along with the value; e.g., "1.0um." This is the usual setting for interactive use. The argument noprint suppresses the unit name, which is appropriate for scripted use, when the value may be passed to arithmetic expressions to be evaluated by the interpreter.

> units with no arguments returns the current units type. units list returns the current units type as a Tcl list of two items; the first item is the units type, and the second item is print or noprint, indicating whether units suffixes are printed with the values.

> Historically, values parsed from the command line were interpreted according to the snap setting. On startup, this behavior remains in effect for backwards compatibility until overridden with a units command. The command units default reverts back to the original behavior. Once the units default type is overridden, the snap behavior is controlled independently of units.

### Implementation Notes:

> units is implemented as a built-in command in magic.

### See Also:

> grid
> snap

Return to command index

Last updated: March 7, 2020 at 1:06pm