It is possible to program the model levels associated with devices in WRspice.
devmod index [level ...]
This allows the user to set up model levels for compatibility with another simulator, or to directly use simulation files where the model level is different from that initially assigned in WRspice. The effect is similar to the .mosmap input directive, but applies to all device types.
All devices have built-in levels, which are the defaults. This command allows levels to be changed in the currently running WRspice. The change occurs in memory only so is not persistent across different WRspice sessions. However, the command can be used in a startup script to perform the changes each time WRspice is invoked.
The first argument to devmod is a mandatory device index. This is an integer that corresponds to an internal index for the device. These are the numbers that appear in the listing from the devls command.
If there are no other arguments, the device is simply listed, in the same format as the entries from devls.
Any following arguments are taken as model levels. Each level is an integer in the range 1-255, and up to eight levels can be given. The device will be called for any of the level numbers listed.
After pressing Enter, the device entry is printed with the new model levels. The entire device list is checked, and if there are clashes from the new model level, a warning is issued. If two similar devices have the same model number, the device with the lowest index will always be selected for that value.
There are a few devices that have levels that can not be changed. These are built-in models, such as MOS and TRA, where the model code is designed to handle several built-in levels (such as MOS levels 1-3 and 6). Attempting to change these levels will fail.
Model level 1 is somewhat special in that it is the default when no model level is given in SPICE input for a device. Level 0 is reserved for internal use and can not be assigned. The largest possible model level is 255 in WRspice.