Magic VLSI Layout Tool Version 8.2 *


Cause box to snap to the selected grid when moved by the cursor. Also, cause distance measurements to be interpreted by default as measurments in the selected grid.


snap [internal|lambda|user]


The snap command causes the cursor box to snap to the selected grid when moved by pointer button events. The selected grids are internal, the size of the internal database, lambda, the lambda grid based on the technology minimum feature size, and user, based on the value given by the user to the grid command.

In addition to changing the behavior of the box to mouse button events, the snap 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 snap grid. 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). Even when snap is set to the larger lambda or user grids, it is possible to move the cursor box to finer grid positions from the command line. See the reference page on distance measures for a complete description of distance values.

snap with no arguments returns the current snap grid type.

By default, the internal and lambda grids are the same. However, CIF, GDS, or LEF/DEF input on a finer scale can cause the internal grid to be set finer than the lambda grid. Also, the scalegrid command can be used to separate the internal and lambda grids. Note that the use of "lambda" is merely a convention. Traditionally, scalable CMOS rules were based on units of "lambda", equal to one-half the minimum feature size of the technology. Many technology files are still based on lambda rules, which are usually more conservative than vendor rules. However, some technology files may be based on exactly implementing vendor rules, and may set the internal grid spacing to a finer resolution, such as 0.1 micron or smaller. In such cases, the use of the term "lambda" is a misnomer.

Implementation Notes:

snap is implemented as a built-in command in magic.

See Also:


Return to command index

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