2018-05-27 12:40:54 +02:00
|
|
|
|
This document is covered by the Creative Commons Attribution Share-Alike (CC-BY-SA) v4.0. .
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
2023-01-24 16:25:11 +01:00
|
|
|
|
As of Jan. 2023 ADMS is deprectated and replaced by OpenVAF/OSDI.
|
2022-12-17 14:46:52 +01:00
|
|
|
|
See README_OSDI.md and README_OSDI_howto.
|
|
|
|
|
|
All references to ADMS will be removed in a future ngspice release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
*************** Verilog A Device models in ngspice ******************************************
|
2013-05-20 19:08:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
1 Introduction
|
2013-05-20 19:08:58 +02:00
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
New compact device models today are released as Verilog-A code. Ngspice applies ADMS to
|
|
|
|
|
|
translate the va code into ngspice C syntax. Currently a limited number of Verilog-A models is
|
|
|
|
|
|
supported: HICUM level0 and level2 (HICUM model web page), MEXTRAM (MEXTRAM
|
|
|
|
|
|
model web page), EKV (EKV model web page) and PSP (NXP PSP web site).
|
2013-05-20 19:08:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
2 ADMS
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
ADMS is a code generator that converts electrical compact device models specified in high-level
|
|
|
|
|
|
description language into ready-to-compile C code for the API of spice simulators. Based on
|
|
|
|
|
|
transformations specified in XML language, ADMS transforms Verilog-AMS code into other
|
|
|
|
|
|
target languages. Here we use it to to translate the va code into ngspice C syntax.
|
|
|
|
|
|
To make use of it, a set of ngspice specific XML files is distributed with ngspice in ngspice\
|
|
|
|
|
|
src\spicelib\devices\adms\admst. Their translation is done by the code generator executable
|
|
|
|
|
|
admsXml (see below).
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
3 How to integrate a Verilog-A model into ngspice
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
3.1 How to setup a *.va model for ngspice
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
Unfortunately most of the above named models’ licenses are not compatible to free software
|
|
|
|
|
|
rules as defined by DFSG. Therefore since ngspice-28 the va model files are no longer part of
|
|
|
|
|
|
the standard ngspice distribution. They may however be downloaded as a tar.gz archive from the
|
2018-12-23 13:43:08 +01:00
|
|
|
|
ngspice-30 file distribution folder. After downloading, you may expand the zipped files into
|
2018-05-27 12:40:54 +02:00
|
|
|
|
your ngspice top level folder. The models enable dc, ac, and tran simulations. Noise simulation
|
|
|
|
|
|
is not supported.
|
|
|
|
|
|
Other (foreign) va model files will not compile without code tweaking, due to the limited
|
|
|
|
|
|
capabilities of our ADMS installation.
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
3.2 Adding admsXml to your build environment
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
The actual admsXml code is maintained by the QUCS project and is available at GitHub.
|
|
|
|
|
|
Information on how to compile and install admsXml for Linux or Cygwin is available on the
|
|
|
|
|
|
GitHub page. For MS Windows users admsXml.exe is available for download from
|
|
|
|
|
|
https://sourceforge.net/projects/mot-adms/. You may copy admsXml.exe to your MSYS2 setup
|
|
|
|
|
|
into the folder msys64\mingw64\bin, if 64 bit compilation is intended.
|
|
|
|
|
|
More information, though partially outdated, is obtainable from the ngspice web pages
|
|
|
|
|
|
(http://ngspice.sourceforge.net/admshowto.html) and from README-old.adms.
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
3.3 Compile ngspice with ADMS
|
2006-02-01 19:26:44 +01:00
|
|
|
|
|
2018-05-27 12:40:54 +02:00
|
|
|
|
In the top level ngspice folder there are two compile scripts compile_min.sh and compile_linux.sh.
|
|
|
|
|
|
They contain information how to compile ngspice with ADMS. You will have to run autogen.sh
|
|
|
|
|
|
with the adms flag
|
|
|
|
|
|
./autogen.sh --adms
|
|
|
|
|
|
In addition you have to add --enable-adms to the ./configure command. Please check chapter
|
|
|
|
|
|
32.1 of the ngspice manual for perequisites and further details.
|
|
|
|
|
|
Compiling ngspice with ADMS with MS Visual Studio is not supported.
|