add src/spicelib/devices/vdmos to ngspice

This commit is contained in:
Holger Vogt 2018-04-02 11:02:27 +02:00 committed by rlar
parent d9bc4a5b41
commit 3e6a46826b
7 changed files with 22 additions and 4 deletions

View File

@ -119,6 +119,7 @@ int add_udn(int,Evt_Udn_Info_t **);
#include "vccs/vccsitf.h"
#include "vcvs/vcvsitf.h"
#include "vsrc/vsrcitf.h"
#include "vdmos/vdmositf.h"
#ifdef ADMS
#include "adms/hicum0/hicum0itf.h"
#include "adms/hicum2/hicum2itf.h"
@ -190,6 +191,7 @@ static SPICEdev *(*static_devices[])(void) = {
get_vccs_info,
get_vcvs_info,
get_vsrc_info,
get_vdmos_info,
#ifdef CIDER
get_nbjt_info,

View File

@ -2,6 +2,7 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1987 Thomas L. Quarles
Modified: 2000 AlansFixes
VDMOS Model: 2018 Holger Vogt
**********/
#include "ngspice/ngspice.h"

View File

@ -13,7 +13,7 @@ Modified: 2000 AlansFixes
#include "ngspice/complex.h"
#include "ngspice/noisedef.h"
/* declarations for level 1 MOSFETs */
/* declarations for VDMOSFETs */
/* indices to the array of MOSFET(1) noise sources */

View File

@ -9,8 +9,8 @@
SPICEdev VDMOSinfo = {
.DEVpublic = {
.name = "Vdmos",
.description = "Level 1 MOSfet model with Meyer capacitance model",
.name = "VDMOS",
.description = "DMOS model based on Level 1 MOSFET model",
.terms = &VDMOSnSize,
.numNames = &VDMOSnSize,
.termNames = VDMOSnames,

View File

@ -2,6 +2,7 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
VDMOS: 2018 Holger Vogt
**********/
#include "ngspice/ngspice.h"

View File

@ -128,7 +128,8 @@ INP2M(CKTcircuit *ckt, INPtables *tab, struct card *current)
#endif
thismodel->INPmodType != INPtypelook("HiSIM2") &&
thismodel->INPmodType != INPtypelook("HiSIMHV1") &&
thismodel->INPmodType != INPtypelook("HiSIMHV2"))
thismodel->INPmodType != INPtypelook("HiSIMHV2") &&
thismodel->INPmodType != INPtypelook("VDMOS"))
{
LITERR ("incorrect model type");
return;

View File

@ -212,6 +212,19 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab)
INPmakeMod(modname, type, image);
}
/* ------ Check if model is a VDMOS FET ------- */
else if ((strcmp(type_name, "vdmos") == 0) ||
(strcmp(type_name, "vdmosn") == 0) ||
(strcmp(type_name, "vdmosp") == 0)) {
type = INPtypelook("VDMOS");
if (type < 0) {
err =
INPmkTemp
("Device type VDMOS not available in this binary\n");
}
INPmakeMod(modname, type, image);
}
/* -------- Check if model is a MOSFET --------- */
else if ((strcmp(type_name, "nmos") == 0)
|| (strcmp(type_name, "pmos") == 0)