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

📄 ltraask.c

📁 linux平台下类似著名的电路板作图软件 Spice的源代码
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1990 Jaijeet S. Roychowdhury**********//* * This routine gives access to the internal device parameter * of LTRA lines */#include "spice.h"#include <stdio.h>#include "cktdefs.h"#include "devdefs.h"#include "ifsim.h"#include "ltradefs.h"#include "sperror.h"#include "util.h"#include "suffix.h"/* ARGSUSED */intLTRAask(ckt,inst,which,value,select)    CKTcircuit *ckt;    GENinstance *inst;    int which;    IFvalue *value;    IFvalue *select;{    LTRAinstance *here = (LTRAinstance *)inst;    int temp;    switch(which) {        case LTRA_POS_NODE1:            value->iValue = here->LTRAposNode1;            return (OK);        case LTRA_NEG_NODE1:            value->iValue = here->LTRAnegNode1;            return (OK);        case LTRA_POS_NODE2:            value->iValue = here->LTRAposNode2;            return (OK);        case LTRA_NEG_NODE2:            value->iValue = here->LTRAnegNode2;            return (OK);        case LTRA_MOD_Z0:            value->rValue = here->LTRAmodPtr->LTRAimped;            return (OK);        case LTRA_MOD_TD:            value->rValue = here->LTRAmodPtr->LTRAtd;            return (OK);        case LTRA_MOD_NL:            value->rValue = here->LTRAmodPtr->LTRAnl;            return (OK);        case LTRA_MOD_FREQ:            value->rValue = here->LTRAmodPtr->LTRAf;            return (OK);        case LTRA_V1:            value->rValue = here->LTRAinitVolt1;            return (OK);        case LTRA_I1:            value->rValue = here->LTRAinitCur1;            return (OK);        case LTRA_V2:            value->rValue = here->LTRAinitVolt2;            return (OK);        case LTRA_I2:            value->rValue = here->LTRAinitCur2;            return (OK);        case LTRA_MOD_RELTOL:            value->rValue = here->LTRAmodPtr->LTRAreltol;            return (OK);        case LTRA_MOD_ABSTOL:            value->rValue = here->LTRAmodPtr->LTRAabstol;            return (OK);        case LTRA_BR_EQ1:            value->rValue = here->LTRAbrEq1;            return (OK);        case LTRA_BR_EQ2:            value->rValue = here->LTRAbrEq2;            return (OK);        case LTRA_DELAY:	    /*            value->v.vec.rVec = (double *) MALLOC(here->LTRAsizeDelay);            value->v.numValue = temp = here->LTRAsizeDelay;            while (temp--) {                *value->v.vec.rVec++ = *here->LTRAdelays++;		*/            value->v.vec.rVec = (double *) NULL;            value->v.numValue = temp = 0;            return (OK);        default:            return (E_BADPARM);    }    /* NOTREACHED */}

⌨️ 快捷键说明

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