Today many commercial device libs are available with PSPICE compatible
syntax. Due to the inclusion of ngspice into EAGLE and KiCad,
with their customers often applying discrete devices and ICs,
it is useful to enhance ngspice with a PSPICE compatibility
option.
This option is invoked with ngspice from the git master branch
by setting the PSPICE compatibility flag
set ngbehavior=ps
either in spinit or in .spiceinit.
Edit: In the actual master branch there are the reading of PSPICE compatible libraries and the LTSPICE VDMOS model combined.
The compatible rading becomes active only when a PSPICE compatible device file is included
into the ngspice netlist by the '.include devicefile' command.
The patches and additions are then executed on the contents of
'devicefile'. This option is not ment to run complete PSPICE
input decks. For general netlists the ngspice syntax always prevails!
The XSPICE compile option has to be activated (for poly sources and the
vswitch replacement).
The readme README.PSPICEComp2 presents more details.
Some example files are available in directories ngspice/examples/p-to-n-examples, and ngspice/examples/vdmos with TI or Microchip Technology ICs or Infineon DMOS power transistors.
Due to the many potential variants and options the compatibility
translator is probably not yet complete. So please apply this
ngspice option and report here any issues by stating the error message,
the netlist, and the download link for the device lib causing the
trouble.
Last edit: Holger Vogt 2018-05-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is another update available for the 64-bit binary for MS-Windows at http://ngspice.sourceforge.net/download.html#exp1 .
It hat been tested with power transistors from Infineon, Vishay and GaN-Systems, as well as with opamps form TI and MircoChip or the TLC555 from TI.
The dll in this update is compatible to the KiCad nightly for MS Windows.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
add function i() to measure current in node 1 of a device
enable '-' as valid character in subcircuit names
will be available in basic ngspice in the upcoming release.
The functions cited above are for now implemented by adding a .func statements to the input deck. It might be better to add them as hard-coded variants in a following release.
if() could then be hard-coded as well.
Holger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In addition there is also now available (for testing) the VDMOS model (simplified power transistor model), that has been available up to now only from LTSPICE and SuperSpice. Please have a look at the master branch at https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/ , where you might clone the sources or downlod a snapshot compilable as usual.
Last edit: Holger Vogt 2018-05-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Today many commercial device libs are available with PSPICE compatible
syntax. Due to the inclusion of ngspice into EAGLE and KiCad,
with their customers often applying discrete devices and ICs,
it is useful to enhance ngspice with a PSPICE compatibility
option.
This option is invoked with ngspice from the git master branch
by setting the PSPICE compatibility flag
set ngbehavior=ps
either in spinit or in .spiceinit.
Edit: In the actual master branch there are the reading of PSPICE compatible libraries and the LTSPICE VDMOS model combined.
The compatible rading becomes active only when a PSPICE compatible device file is included
into the ngspice netlist by the '.include devicefile' command.
The patches and additions are then executed on the contents of
'devicefile'. This option is not ment to run complete PSPICE
input decks. For general netlists the ngspice syntax always prevails!
The XSPICE compile option has to be activated (for poly sources and the
vswitch replacement).
The readme README.PSPICEComp2 presents more details.
Some example files are available in directories ngspice/examples/p-to-n-examples, and ngspice/examples/vdmos with TI or Microchip Technology ICs or Infineon DMOS power transistors.
The source code is available via git from the master branch at
https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/
You may download a 64-bit binary for MS-Windows from
http://ngspice.sourceforge.net/download.html .
The updated manual from http://ngspice.sourceforge.net/docs.html may give you mor information on VDMOS and PSPICE compatibility.
Due to the many potential variants and options the compatibility
translator is probably not yet complete. So please apply this
ngspice option and report here any issues by stating the error message,
the netlist, and the download link for the device lib causing the
trouble.
Last edit: Holger Vogt 2018-05-20
Thanks Holger!
This will be very useful. I'm sure like me, many people were manually
converting the files as needed - which can be quite time consuming.
--
Kind regards,
Justin Fisher.
An update is available for the 64-bit binary for MS-Windows at
http://ngspice.sourceforge.net/download.html#exp1 .
There is another update available for the 64-bit binary for MS-Windows at
http://ngspice.sourceforge.net/download.html#exp1 .
It hat been tested with power transistors from Infineon, Vishay and GaN-Systems, as well as with opamps form TI and MircoChip or the TLC555 from TI.
The dll in this update is compatible to the KiCad nightly for MS Windows.
Holger,
Which hyperlink should I select to download the version for Windows?
Clyde
http://ngspice.sourceforge.net/experimental/ngspice-27-ps-64.7z
Another update to the sources in git branch PSPICEComp2 and the Windows executables with some bug fixes.
We now do the following transformations:
.model MyRe RES (R=100)
with
*#'
(which has a special meaning in ngspice (see manualchapter 17.5.71) by '
* #
'.model qorig npn (BF=48 IS=2e-7)
and
.model qbip1 ako:qorig NPN (BF=60 IKF=45m)
replaced by
.model qbip1 NPN (BF=48 IS=2e-7 BF=60 IKF=45m)
parameters (PSPICE does it for L and W of MOS transistors)
Another update to the sources in git branch PSPICEComp3 and the Windows executables with some bug fixes.
We now do the following transformations:
.model MyRe RES (R=100)
with
*#
' (which has a special meaning in ngspice (see manualchapter 17.5.71) by '
* #
'.model qorig npn (BF=48 IS=2e-7)
and
.model qbip1 ako:qorig NPN (BF=60 IKF=45m)
replaced by
.model qbip1 NPN (BF=48 IS=2e-7 BF=60 IKF=45m)
parameters (PSPICE does it for L and W of MOS transistors)
E_RO_3 VB_3 VB_4 VALUE={ TABLE( V(VCCP,VCCN), 2 , 35 , 3.3 , 15 , 5 , 10 )*I(VreadIo)}
will become
Last edit: Holger Vogt 2018-03-29
Hi Holger,
I would not object if the following were available in the basic NGSPICE:
-marcel
will be available in basic ngspice in the upcoming release.
The functions cited above are for now implemented by adding a .func statements to the input deck. It might be better to add them as hard-coded variants in a following release.
if() could then be hard-coded as well.
Holger
In addition there is also now available (for testing) the VDMOS model (simplified power transistor model), that has been available up to now only from LTSPICE and SuperSpice. Please have a look at the master branch at https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/ , where you might clone the sources or downlod a snapshot compilable as usual.
Last edit: Holger Vogt 2018-05-19
All of this is now part of ngspice-28