Jspice3
sw.c File Reference
#include "spice.h"
#include <stdio.h>
#include "swdefs.h"
#include "uflags.h"
Include dependency graph for sw.c:

Go to the source code of this file.

Variables

static IFparm SWpTable []
 
static IFparm SWmPTable []
 
static char * SWnames1 []
 
static char * SWnames2 []
 
static char * SWmodNames []
 
static IFkeys SWkeys []
 
static int SWkSize = NUMELEMS(SWkeys)
 
static int SWpTSize = NUMELEMS(SWpTable)
 
static int SWmPTSize = NUMELEMS(SWmPTable)
 
static int SWiSize = sizeof(SWinstance)
 
static int SWmSize = sizeof(SWmodel)
 
SPICEdev SWinfo
 

Variable Documentation

SPICEdev SWinfo

Definition at line 68 of file sw.c.

int SWiSize = sizeof(SWinstance)
static

Definition at line 64 of file sw.c.

IFkeys SWkeys[]
static
Initial value:
= {
{ 's', NUMELEMS(SWnames1), SWnames1, 0, 0 },
{ 'w', NUMELEMS(SWnames2), SWnames2, 0, 1 },
}
static char * SWnames2[]
Definition: sw.c:44
#define NUMELEMS(ARRAY)
Definition: spice.h:157
static char * SWnames1[]
Definition: sw.c:37

Definition at line 55 of file sw.c.

int SWkSize = NUMELEMS(SWkeys)
static

Definition at line 61 of file sw.c.

char* SWmodNames[]
static
Initial value:
= {
"sw",
"csw",
}
#define NULL
Definition: spdefs.h:121

Definition at line 49 of file sw.c.

IFparm SWmPTable[]
static
Initial value:
= {
IOPU("sw", SW_MOD_SW, IF_FLAG,"Switch model"),
IOPU("vt", SW_MOD_VTH, IF_REAL,"Threshold voltage"),
IOPU("vh", SW_MOD_VHYS, IF_REAL,"Hysteresis voltage"),
IOPU("it", SW_MOD_ITH, IF_REAL,"Threshold current"),
IOPU("ih", SW_MOD_IHYS, IF_REAL,"Hysterisis current"),
IOPU("ron", SW_MOD_RON, IF_REAL,"Resistance when closed"),
IOPU("roff", SW_MOD_ROFF, IF_REAL,"Resistance when open"),
OPU( "gon", SW_MOD_GON, IF_REAL,"Conductance when closed"),
}
#define SW_MOD_IHYS
Definition: swdefs.h:103
#define SW_MOD_VTH
Definition: swdefs.h:100
#define OPU(a, b, c, d)
Definition: uflags.h:65
#define SW_MOD_SW
Definition: swdefs.h:97
#define SW_MOD_GON
Definition: swdefs.h:104
#define SW_MOD_RON
Definition: swdefs.h:98
#define SW_MOD_ROFF
Definition: swdefs.h:99
#define IF_REAL
Definition: ifsim.h:108
#define SW_MOD_VHYS
Definition: swdefs.h:101
#define IF_FLAG
Definition: ifsim.h:106
#define SW_MOD_ITH
Definition: swdefs.h:102
#define IOPU(a, b, c, d)
Definition: uflags.h:48

Definition at line 25 of file sw.c.

int SWmPTSize = NUMELEMS(SWmPTable)
static

Definition at line 63 of file sw.c.

int SWmSize = sizeof(SWmodel)
static

Definition at line 65 of file sw.c.

char* SWnames1[]
static
Initial value:
= {
"S+",
"S-",
"SC+",
"SC-"
}

Definition at line 37 of file sw.c.

char* SWnames2[]
static
Initial value:
= {
"S+",
"S-"
}

Definition at line 44 of file sw.c.

IFparm SWpTable[]
static
Initial value:
= {
IP( "on", SW_IC_ON, IF_FLAG, "Switch initially closed"),
IP( "off", SW_IC_OFF, IF_FLAG, "Switch initially open"),
IOPU("pos_node", SW_POS_NODE,IF_INTEGER, "Positive node of switch"),
IOPU("neg_node", SW_NEG_NODE,IF_INTEGER, "Negative node of switch"),
IOP( "control", SW_CONTROL, IF_INSTANCE, "Name of controlling source"),
OPU( "cont_p_node",SW_POS_CONT_NODE,IF_INTEGER,"Positive cont node of switch"),
OPU( "cont_n_node",SW_NEG_CONT_NODE,IF_INTEGER,"Positive cont node of switch"),
OP( "i", SW_CURRENT, IF_REAL, "Switch current"),
}
#define SW_POS_CONT_NODE
Definition: swdefs.h:90
#define IOP(a, b, c, d)
Definition: devdefs.h:120
#define SW_IC_OFF
Definition: swdefs.h:87
#define OPU(a, b, c, d)
Definition: uflags.h:65
#define SW_IC_ON
Definition: swdefs.h:86
#define IF_INSTANCE
Definition: ifsim.h:112
#define IF_INTEGER
Definition: ifsim.h:107
#define SW_NEG_NODE
Definition: swdefs.h:89
#define SW_POS_NODE
Definition: swdefs.h:88
#define IF_REAL
Definition: ifsim.h:108
#define IP(a, b, c, d)
Definition: devdefs.h:118
#define SW_CURRENT
Definition: swdefs.h:93
#define IF_FLAG
Definition: ifsim.h:106
#define SW_CONTROL
Definition: swdefs.h:92
#define OP(a, b, c, d)
Definition: devdefs.h:119
#define IOPU(a, b, c, d)
Definition: uflags.h:48
#define SW_NEG_CONT_NODE
Definition: swdefs.h:91

Definition at line 13 of file sw.c.

int SWpTSize = NUMELEMS(SWpTable)
static

Definition at line 62 of file sw.c.