.MAP

.MAP MODELNAME=modelname DEVICE=device LEVEL=level [LETTER=letter]
[REPORT=reportstatus]

Map simulator device to model name and level number.

modelname Model name as used on the .MODEL line
device Device name. See notes and List of All Simulator Devices
level Level parameter value used in .MODEL statement. Must be an integer
letter Letter used in first character of instance name to identify device type. See notes
reportstatus ON or OFF. If ON, a report will be displayed to confirm the mapping

In this topic:

.MAP Notes

All device models (that is the binary code that implements the device equations) have an internal name that is used to uniquely identify it, but this name is not used externally. Instead .MODEL statements use their own name (e.g. nmos, pnp) coupled with an optional LEVEL parameter to define the actual device referred to. For example, the MOS level 3 device is referred internally as "MOS3" but the .MODEL statements use the names NMOS or PMOS and set the LEVEL parameter to 3. The mapping between NMOS and LEVEL 3 to "MOS3" is defined in an internal table which can be modified by this statement. The .MAP statement can add new entries to the table so providing additional methods of accessing a device. It can also modify existing entries to point to a new device. To modify an existing mapping, you only need to provide ModelName, Device and Level values. The modelname and level must point to an existing combination that is already in use, e.g. ModelName=D and Level=1, and device would then be set to the new device that this combination is to point to, e.g. Diode3. So this is what the spec would be:

.MAP ModelName=D,Level=1,Device=Diode3

The above would make level 1 diodes use the same model as level=3. Here is another example:

.MAP ModelName=R,Level=0,Device=HspiceRes

Level=0 is the level value when the LEVEL parameter is not specified. In the case of resistors, no .MODEL statement is required at all, so the above line will change the default model used for all resistors to the Hspice model instead of the native SIMetrix model.

It is also possible to add a new mapping in which case the level and modelname parameters must be currently unused. Also when creating a new mapping the 'Letter' parameter must be specified. 'Letter' is the first letter of the component reference traditionally used to identify the type of device in SPICE netlists. For example 'Q' refers to BJTs and 'D' refers to diodes. or example, the following entries define LEVEL=69 as a valid level for accessing the PSP 1.03 model:

.MAP ModelName=nmos,Level=69,Device=psp103_n,report=on
.MAP ModelName=pmos,Level=69,Device=psp103_n,report=on

Note that two entries are required in order to support both n-channel and p-channel devices. The above doesn't change the existing level it adds an additional level. Both the original level number and 69 will be accepted and be equivalent. When defining a new mapping the letter must be specified and usually this should be the letter conventionally used for the class of device. If defining a new mapping for a MOSFET, the letter 'M' should be used, for a diode the letter 'D' should be used and so on. However, the letters, 'N', 'P', 'W', 'U' and 'Y' maybe used as well for any type of device.

Device Configuration File

.MAP statements affect only the simulation on the netlist in which they appear. Alternatively the same re-mapping may performed more permanently using a device configuration file.

Creating a Device Configuration File

The device configuration file (DCF) path and name are defined by the option variable DevConfigFile. By 'option variable', we mean the variables assigned using the command line Set command not simulator options set by .OPTIONS.

The default value for the setting is %SHAREPATH%/DeviceConfig.sxdcf, %SHAREPATH% resolves to the support directory under the installation root.

Format

Each line in the DCF has the same format as the .MAP statement without the .MAP keyword:

Keyword Description
ModelName Model name used in .MODEL statement
Device Internal device name. See List of All Simulator Devices
Level Level parameter
Letter Device letter
Report Value on or off. If on a report of the device mapping will be displayed in the command shell when SIMetrix starts.

The meaning of each of the above is the same as described for the .MAP statement

Example

The following shows the DCF needed to remap the PSP 1.03 device as described above for the .MAP statement.

ModelName=nmos,Level=69,Device=psp103_n,report=on
ModelName=pmos,Level=69,Device=psp103_n,report=on

List of All Simulator Devices

A list of all internal devices may be obtained using the show_devices script. This will copy to the system clipboard a tab delimited table listing all internal devices. This is guaranteed to be accurate as it is generated directly by SIMetrix. To obtain this table proceed as follows:

  1. Type this at the command line. (The edit box below the menu bar in the command shell. This is not available in the free SIMetrix Intro)
    show_devices
  2. You should see a message "Device information has been copied to the system clipboard" appear
  3. Using a spreadsheet program, execute the Paste function. You should see the table appear.
The table has seven columns:
  • Column 1: Internal name. This is the device name
  • Column 2: Model name as used in the .MODEL statement
  • Column 3: Level.
  • Column 4: Minimum number of terminals that this device must have
  • Column 5: Maximum number of terminals that this device may have
  • Column 6: Device letter
  • Column 7: Model Version
  • Column 8: License feature required to use this device

Some internal devices have a model name beginning with '$$'. These device do not use a .MODEL statement and have no model parameters. The name is used internally only.

Devices with a minimum number of terminals of -1 do not have a minimum number. Similarly devices with zero maximum number of terminals do not have a maximum.