#

## load

Load a cell into the layout window

### Usage:

> load [cellname [scaled n [d]]] [-force] [-dereference] [-quiet] [-fail]

> > where cellname is the name of a cell that presumably exists either in the database memory or on disk as a `.mag` file. n and d are the numerator and denominator, respectively, of a magnification factor, if it is desired to load the cell at a different scale than it was written. d defaults to 1 if not specified.

### Summary:

> The load command loads a cell into the database and displays it in the current layout window (if available). If the cell is not already in the database memory, it is loaded from disk. If it cannot be found on disk, then a new cell definition of name cellname is created and loaded into the window.

> By default, magic loads a cell from disk only if the technology name matches the current technology. Historically, this has led to most technologies being named "scmos" which undermines the purpose of having a technology name in the first place. In magic-7.2 and 7.3, this behavior can be overridden with the -force option. magic will read the cell to the extent that layer names match between the current technology and the technology of the file.

> The -force option and scaled option can be used together to port layouts from one technology to another. The scaled option implements a scale conversion during input by redefining the ratio of lambda to internal units during the load. This is useful if a cell was written in a lambda-based technology but needs to be read into a vendor-rules-based technology with a fine internal scale such as 0.1 micron per internal unit. The scaled option may also be used simply to resize cell geometry, although this is generally only useful to do for layout such as logos and text lettering drawn in routing layers.

> The -quiet option prevents magic from generating error messages during loads. This can be used to prevent magic from complaining that a file does not exist when "load" is being used to create a new cell, rather than load one from disk.

> By default, if a cell cannot be found in the search path, then a new empty layout is created with the name of the specified cell. The -fail option prevents magic from creating a new cell. Instead, if the cell cannot be found in the search path, the load will simply fail.

> Since version 8.2.50, magic saves the path to each subcell used in a design in the .mag file, to help with version control. This breaks backwards compatibility with the traditional load command, which would always use the search paths set by the addpath command. The -dereference option restores the traditional behavior by ignoring all path references in the input file and relying only on known search paths to locate the source file for each subcell in the layout.

> Note that if it is not desired to have cellname created if not found on disk (e.g., because the path for the cell was missing from the search path), the database can be updated with the flush command or the cellname delete command.

> Use of load with no cellname given will result in creating a new cell called "`(UNNAMED)`".

### Implementation Notes:

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

### See Also:

> xload

Return to command index

Last updated: February 10, 2021 at 10:05pm