next up previous contents index
Next: The WRspice Daemon and Up: The WRspice User Interface Previous: Scripts and Batch Mode   Contents   Index


Loadable Device Modules and Verilog-A Support

It is possible to load device models into WRspice at run time, through use of ``loadable device modules''. These are dynamically loaded libraries containing the device model description in a form which can be read into a running WRspice process. This capability opens up some interesting possibilities for future versions of WRspice in how new device models are distributed. It also gives the user, at least in principle, the ability to generate and use custom device models in WRspice.

Initial support for this important new feature is available in all releases except for Microsoft Windows. Support under Windows is available by request. Microsoft support requires partitioning of the wrspice.exe executable into separate exe and dll files. The dll version will be supplied on request, however the main distribution won't make this change unless there is customer interest. Contact Whiteley Research for more information.

Loadable device modules are specific to a particular release number of WRspice, and to the operating system. Since the interface may change, user-created loadable modules need to be rebuilt for new releases of WRspice. This will be relaxed in future releases, when the interface stabilizes.

Loadable device modules can be loaded into WRspice in two ways.

  1. On startup, WRspice will look for loadable modules in the devices directory under the startup directory (i.e., /usr/local/share/xictools/wrspice/startup/devices if installed in the default location). Modules found in this directory will be loaded automatically.

    If the -m command line option is given, the automatic loading of device modules found in the devices directory will be skipped.

  2. The devload command can be used to load a module from the command prompt or from a script. The syntax is
    devload [path_to_loadable_module]
    If no argument is given, a list of the presently loaded modules is printed.

Once a module is loaded, it can't presently be unloaded, however loading a module with the same device key letter and model level as a previously loaded module will replace the previously loaded module.

If a loadable module has the same device key character and model level as a built-in device, the loaded device will not be accessible, and a warning is issued. The built-in devices always have precedence.

The devkit directory in the WRspice installation location (/usr/local/share/xictools/wrspice is the default) will provide the tools needed to build loadable device modules.

The present release provides support for building loadable modules from Verilog-A model source. Many new compact device models have been released in this format, as it is (theoretically) portable to all simulators. Most commercial simulators now have this capability.

This capability is available on all platforms, however support for loadable modules under Microsoft Windows is available only on request.

The devkit/README file provides instructions on how to build a module, and there are several examples.

To build modules from Verilog-A source, the open-source ADMS 2.3.0 (or later) package must be installed on the system. This is available from http://sourceforge.net/projects/mot-adms. The system should also provide gcc/g++, make, and other standard tools for program development.

Under Microsoft Windows, the ADMS package can be built with Cygwin (www.cygwin.com). MinGW (www.mingw.org) is required for compiling the modules.


next up previous contents index
Next: The WRspice Daemon and Up: The WRspice User Interface Previous: Scripts and Batch Mode   Contents   Index
Stephen R. Whiteley 2012-09-24