next up previous contents index
Next: Initialization Up: Title, Comments, Job Separation, Previous: .lib Line   Contents   Index


.mosmap Line

General Form:
.mosmap [ext_level] [wrspice_level]
Example:
.mosmap 127 14
.mosmap

This construct maps the level number found in MOS .model lines to another number in WRspice. Different SPICE simulators may provide similar internal MOS model support, although with different level numbers. Although an attempt has been made in WRspice to be compatible with HSPICE level numbers, there may be differences, and there is less commonality with other SPICE programs. One can in principle simply copy the model files and edit the level numbers to those expected in WRspice, but this may be inconvenient.

Suppose that you have a set of model files provided by a foundry service, designed for another simulator. These files provide parameters for the Berkeley BSIM-4.4 model, with level 99 (as an example). In WRspice, the BSIM-4.4 model is assigned to level 14. Rather than copying and editing the files, one can use to following construct in the WRspice input:

.mosmap 99 14
.include path_to_model_file

The level 99 as found in the model file will be interpreted as level 14 in WRspice.

This line must appear logically ahead of, i.e., read before, the corresponding .model lines. Any number of .mosmap lines can be used in the input. The mapping applies while the file is being read and is not persistent.

In the most common usage, .mosmap is followed by two integers, the first being the model level to map, and the second being a valid MOS level number in WRspice. If only one number appears, any mapping associated with that number is removed for the remainder of the file read. If no number appears, then all mappings are removed for the remainder of the read. These latter cases are probably infrequently needed.

Note that the devmod command in WRspice can be used to change device model levels, which may be more convenient than using .mosmap, and applies to all device types.


next up previous contents index
Next: Initialization Up: Title, Comments, Job Separation, Previous: .lib Line   Contents   Index
Stephen R. Whiteley 2022-09-18