next up previous contents index
Next: Wiring Devices and Subcircuits Up: Electrical Schematic Editing Previous: Placement of Devices and   Contents   Index

Semiconductor Devices

The device menu contains symbols for the semiconductor devices supported by WRspice. These include diodes, bipolar and junction field-effect transistors, MESFETs, and MOSFETs.

Device Description
dio junction diode
npn npn bipolar transistor
pnp pnp bipolar transistor
njf n-channel junction field-effect transistor
pjf p-channel junction field-effect transistor
nmes n-MESFET
pmes p-MESFET
nmos n-MOSFET (3-terminal)
pmos p-MOSFET (3-terminal)
nmos1 n-MOSFET (4-terminal)
pmos1 p-MOSFET (4-terminal)

Unlike simple devices such as resistors and capacitors, which are fully specified by a value, these devices almost always require a model. The model is specified with a model property, which is applied to the device in the same way that a value property is applied to a simple device.

In order for Xic to include the model in the SPICE file, the model must be available to Xic. Device models are provided to Xic through a file read by Xic when the program starts. When Xic starts, it traverses the library search path, looking for model files. A model file is 1) a file usually named ``model.lib'', in which case the first such file is read, or 2) any file found in a subdirectory usually named ``models'' of a directory in the search path. The names assumed (``model.lib'' and ``models'') can be changed in the technology file.

The files that contain the models consist of the .model lines for SPICE. These blocks are placed one after another, with no order assumed.

Perhaps the simplest way to add a model to Xic is through the model.lib file. A skeletal model.lib file is provided with Xic, in the startup directory. Models added to this file will be available to all users. If a copy of the model.lib file is placed in the current directory, (which is always searched first) then that file will be used instead. The first model.lib file found in the library search path will be used. This allows users to access their own custom model.lib file.

If large numbers of models are to be added, it may be more convenient to add a ``models'' subdirectory to one of the directories in the library search path. One may add a directory to the search path for this purpose. In the models subdirectory, add the files containing the SPICE models. The file names are unimportant, and all files found in the subdirectory will be searched.

Each model block starts with

.model modname modtype ....

The modname is an arbitrary word which designates the model, and this should be unique among all of the models Xic will find along the library search path. The modtype is the SPICE name for the model for a given device, as specified in the WRspice documentation. The remaining text consists of parameter value assignments as per the documentation. The modname should be used in a model property of the devices that are to use the model.

There are two different MOS device types: the nmos1/pmos1 devices contain stubs for all four nodes (gate, drain, source, and bulk). The nmos/pmos devices automatically connect the bulk node to global nodes named NSUB and PSUB, respectively. Most of the time, it is more convenient to use the nmos/pmos devices to avoid having to make explicit contact to the substrate nodes in the circuit, however one must remember to bias the NSUB and PSUB nodes. To do this:

If there is one or more nmos devices in the circuit:
  1. Add a voltage source to the schematic.
  2. Place a ground terminal on the negative terminal of the voltage source.
  3. Place a tbar terminal device on the positive terminal of the voltage source.
  4. Select the `tbar' label of this terminal device.
  5. Press the label button (side menu), and change the name from ``tbar'' to ``NSUB''.
  6. Add a value property to the voltage source to set the substrate voltage. This procedure is described below.
If there is one or more pmos devices in the circuit:
Follow the same procedure above, however use ``PSUB'' as the name for the tbar device.

This will provide a dc bias voltage to the common connection of all of the nmos and pmos bulk nodes in the circuit. The value of NSUB is usually equal to the most negative supply voltage in the circuit, and the value of PSUB is usually equal to the most positive voltage in the circuit.

next up previous contents index
Next: Wiring Devices and Subcircuits Up: Electrical Schematic Editing Previous: Placement of Devices and   Contents   Index
Stephen R. Whiteley 2022-05-28