Languages

CommunityCategory: MODELZENThe meaning of the ‘prefix’ parameter when defining the device mappings in the MODELZEN technology configuration file

MODELZEN

The meaning of the ‘prefix’ parameter when defining the device mappings in the MODELZEN technology configuration file

SA Support Team Staff 2019-02-06

Can you explain in detail about the 'prefix' parameter used for the device mappings (e.g. devo_devicemap) in the MODELZEN technology configuration file?

1 Answers
Best Answer
SA Support Team Staff 2019-02-06

When MODELZEN encounters an instance of devices defined in the devo_devicemap or devo_subcktmap sections of the technology configuration file, it performs a set of SPICE simulations to extract its characteristics according to the target primitive type and controlling parameters (e.g. level_dc, level_ac, vmax, vmin, etc.). For instance, if you'd like to model a device named 'nch5' as nmosfet primitive and a device named 'rnpoly' as resistor primitive in a foundry-specific technology, you'd be listing the following lines in the devo_devicemap section of the technology configuration file. Please refer to Section 4.4 Defining Device Mapping in the MODELZEN User Guide for more details.

"nch5"   : dict(type="nmosfet", prefix="M", level_dc="pwl", level_ac=1, vmax=1.2, vmin=0.0),
"rnpoly" : dict(type="resistor", prefix="R", level_dc="linear", level_ac=0),

When MODELZEN performs SPICE simulation to extract each device instance's characteristics, it needs to compose its own SPICE input file, instantiating the device to be characterized. Problem is, in many SPICE simulators such as HSPICE, the first letter of the instance name (i.e. 'prefix') has a special meaning and must comply with the way the device is defined in the foundry-specific SPICE models.

For example, if the instance of the "nch5" device has a name starting with an "M" in the SPICE netlist (i.e. the device model is described using one of the SPICE's built-in MOSFET models):

M12  d   g   s   b   nch5  W=10u L=0.5u

you need to define the prefix as "M" for the "nch5" device in the devo_devicemap. On the other hand, if the instance has a name starting with an "X" (i.e. the device model is described as a subcircuit):

X12  d   g   s   b   nch5  W=10u L=0.5u

you need to define the prefix as "X" accordingly. If you see any SPICE-related errors for a specific device type during the model generation process, please check if its prefix parameter is defined properly.

Passive devices such as resistors and capacitors can also be defined either using built-in SPICE models or as subcircuits, and therefore, the proper prefix information must be defined in the devo_devicemap section of the technology configuration file.

For example, if the instance of the "rnpoly" device has a name starting with an "R" in the SPICE netlist (i.e. the device model is described using one of the SPICE's built-in MOSFET models):

R22  pos neg  rnpoly  R=1000

you need to define the prefix of the "rnpoly" device as "R". On the other hand, if the instance has a name starting with an "X" (i.e. the device model is described as a subcircuit):

X22  pos neg com rnpoly W=10u L=500u

you need to define its prefix as "X" accordingly.

Note that this prefix information is not relevant when you use Spectre as the underlying circuit simulator to characterize the devices. It is because Spectre does not use the first letter of the instance names to make distinctions between the instances of built-in models and instances of subcircuits.