⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sw.c

📁 spice中支持多层次元件模型仿真的可单独运行的插件源码
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1987**********/#include "spice.h"#include <stdio.h>#include "devdefs.h"#include "ifsim.h"#include "swdefs.h"#include "suffix.h"IFparm SWpTable[] = { /* parameters */  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"), OPU("cont_p_node",SW_POS_CONT_NODE,IF_INTEGER,					"Positive contr. node of switch"), OPU("cont_n_node",SW_NEG_CONT_NODE,IF_INTEGER,					"Positive contr. node of switch"), OP("i",            SW_CURRENT, IF_REAL,    "Switch current"), OP("p",            SW_POWER,   IF_REAL,    "Switch power")};IFparm SWmPTable[] = { /* model parameters */ 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( "ron",  SW_MOD_RON,  IF_REAL,"Resistance when closed"), OPU( "gon", SW_MOD_GON,  IF_REAL,"Conductance when closed"), IOPU( "roff", SW_MOD_ROFF, IF_REAL,"Resistance when open"), OPU( "goff", SW_MOD_GOFF, IF_REAL,"Conductance when open")};char *SWnames[] = {    "S+",    "S-",    "SC+",    "SC-"};int	SWnSize = NUMELEMS(SWnames);int	SWpTSize = NUMELEMS(SWpTable);int	SWmPTSize = NUMELEMS(SWmPTable);int	SWiSize = sizeof(SWinstance);int	SWmSize = sizeof(SWmodel);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -