#include "spice.h"
#include "ftedefs.h"
#include "ftedebug.h"
#include "spfteext.h"
#include "inpdefs.h"
#include "fteinp.h"
#include "jobdefs.h"
#include "iferrmsg.h"
#include "util.h"
Go to the source code of this file.
|
static int | get_anal () |
|
static void | set_options () |
|
static struct variable * | parmtovar () |
|
static IFparm * | parmlookup () |
|
static IFvalue * | doask () |
|
static int | finddev () |
|
char * | if_inpdeck (struct line *deck, char **tab) |
|
int | if_run (char *what, wordlist *args) |
|
static int | get_anal (char *string) |
|
void | if_option (char *ckt, char *name, int type, char *value) |
|
void | if_cktfree (char *ckt, char *tab) |
|
void | if_cktclear () |
|
char * | if_errstring (int code) |
|
struct variable * | spif_getparam (char *ckt, char **name, char *param, int ind, wordlist **keyword) |
|
void | if_setparam (char *ckt, char *name, char *param, struct variable *val) |
|
static struct variable * | parmtovar (IFvalue *pv, IFparm *opt) |
|
static IFparm * | parmlookup (IFdevice *device, GENinstance *dev, GENmodel *mod, char *param) |
|
static IFvalue * | doask (char *ckt, typecode, GENinstance *dev, GENmodel *mod, IFparm *opt, int ind) |
|
static int | finddev (char *ck, char *name, GENERIC **devptr, GENERIC **modptr) |
|
void | if_setndnames (char *line) |
|
struct variable * | if_getstat (char *ckt, char *name, wordlist **keyword) |
|
wordlist * | GetAnalysisFromDeck () |
|
int | InProgress () |
|
int | IsIplot () |
|
static int finddev |
( |
char * |
ck, |
|
|
char * |
name, |
|
|
GENERIC ** |
devptr, |
|
|
GENERIC ** |
modptr |
|
) |
| |
|
static |
static int get_anal |
( |
char * |
string | ) |
|
|
static |
Definition at line 476 of file spiceif.c.
530 fprintf(
cp_err,
"Internal Error: cktfree -- not in list\n");
struct circ * ft_circuits
struct variable * ci_vars
void if_cktfree(char *ckt, char *tab)
void if_cktfree |
( |
char * |
ckt, |
|
|
char * |
tab |
|
) |
| |
char* if_errstring |
( |
int |
code | ) |
|
Definition at line 884 of file spiceif.c.
903 fprintf(
cp_err,
"Warning: statistics unsupported\n");
921 (*keyword)->wl_word =
copy(
928 for (i = 0, vars = v =
NULL;
962 fprintf(
cp_err,
"if_getstat: Internal Error: can't get %s.\n",name);
static struct variable * parmtovar()
struct wordlist * wl_next
struct variable * va_next
char* if_inpdeck |
( |
struct line * |
deck, |
|
|
char ** |
tab |
|
) |
| |
Definition at line 44 of file spiceif.c.
57 for (i = 0, ll = deck; ll; ll = ll->
li_next)
61 if ((err = (*(
ft_sim->newCircuit))(&ckt)) !=
OK) {
85 err = (*(
ft_sim->newAnalysis))(ckt,which,optUid,
void if_option |
( |
char * |
ckt, |
|
|
char * |
name, |
|
|
int |
type, |
|
|
char * |
value |
|
) |
| |
Definition at line 331 of file spiceif.c.
347 if (
eq(name,
"acct")) {
351 else if (
eq(name,
"list")) {
355 else if (
eq(name,
"node")) {
359 else if (
eq(name,
"opts")) {
363 else if (
eq(name,
"nopage")) {
370 fprintf(
cp_err,
"Warning: .options card unsupported\n");
383 "Warning: option %s is currently unsupported.\n", name);
389 "Warning: option %s is obsolete.\n", name);
398 pval.
rValue = *((
double *) value);
400 pval.
rValue = *((
int *) value);
406 pval.
iValue = *((
int *) value);
408 pval.
iValue = *((
double *) value);
424 "if_option: Internal Error: bad option type %d.\n",
436 fprintf(
cp_err,
"Error: bad type given for option %s --\n", name);
437 fprintf(
cp_err,
"\ttype given was ");
444 default: fputs(
"something strange",
cp_err);
break;
446 fprintf(
cp_err,
", type expected was ");
452 default: fputs(
"something strange.\n",
cp_err);
break;
455 fputs(
"\t(Note that you must use an = to separate option name and value.)\n",
static char * unsupported[]
int if_run |
( |
char * |
what, |
|
|
wordlist * |
args |
|
) |
| |
Definition at line 104 of file spiceif.c.
125 IFuid specUid,optUid;
128 if (
eq(what,
"sens") ||
eq(what,
"tran") ||
eq(what,
"ac") ||
129 eq(what,
"dc") ||
eq(what,
"op") ||
eq(what,
"pz") ||
130 eq(what,
"disto")||
eq(what,
"tf") ||
eq(what,
"noise")) {
135 (void) sprintf(buf,
".%s", tmp);
137 (
void) sprintf(buf,
".%s %s", what, tmp);
141 (
void) sprintf(buf,
".%s", what);
143 deck.li_next = deck.li_actual =
NULL;
144 deck.li_error =
NULL;
161 err = (*(
ft_sim->newTask))(ckt,
175 err = (*(
ft_sim->newAnalysis))(ckt,which,optUid,
192 fprintf(
cp_err,
"Warning: %s\n", deck.li_error);
195 if (
eq(what,
"run") ) {
200 if ( (
eq(what,
"tran")) ||
205 (
eq(what,
"disto")) ||
206 (
eq(what,
"sens")) ||
207 (
eq(what,
"noise")) ||
209 (
eq(what,
"run")) ) {
220 else if (
eq(what,
"resume")) {
232 fprintf(
cp_err,
"if_run: Internal Error: bad run type %s\n", what);
static char buf[MAXPROMPT]
static void set_options()
void if_setndnames |
( |
char * |
line | ) |
|
Definition at line 843 of file spiceif.c.
850 while (isspace(*
line))
static char buf[MAXPROMPT]
void if_setparam |
( |
char * |
ckt, |
|
|
char * |
name, |
|
|
char * |
param, |
|
|
struct variable * |
val |
|
) |
| |
Definition at line 673 of file spiceif.c.
701 vv->va_bool = pv->
iValue ?
true :
false;
714 tv->va_real = (pv->
v.
vec.rVec)[i];
719 vv->va_string =
NULL;
725 "parmtovar: Internal Error: bad PARM type %d.\n",
union uIFvalue::@13::@14 vec
struct variable * va_next
static void set_options |
( |
| ) |
|
|
static |
Definition at line 255 of file spiceif.c.
284 if (which == -1)
return;
bool cp_getvar(char *n, int t, char *r)
void if_option(char *ckt, char *name, int type, char *value)
struct variable* spif_getparam |
( |
char * |
ckt, |
|
|
char ** |
name, |
|
|
char * |
param, |
|
|
int |
ind, |
|
|
wordlist ** |
keyword |
|
) |
| |
Definition at line 559 of file spiceif.c.
574 int typecode, i, num;
580 if (param &&
eq(param,
"all")) {
583 if (typecode == -1) {
585 "Error: no such device or model name %s\n", *name);
599 for (i = 0; i < num; i++, opt++) {
601 pv =
doask(ckt, typecode, dev, mod, opt, ind);
622 "Internal Error: no parameter '%s' on device '%s'\n",
634 if (typecode == -1) {
636 "Error: no such device or model name %s\n", *name);
642 fprintf(
cp_err,
"Error: no such parameter %s.\n", param);
645 pv =
doask(ckt, typecode, dev, mod, opt, ind);
static struct variable * parmtovar()
static IFparm * parmlookup()
struct wordlist * wl_next
struct variable * va_next
struct variable * if_getstat(char *ckt, char *name, wordlist **keyword)
Initial value:= {
"limpts",
"limtim",
"lvlcod",
"nomod",
}
Definition at line 321 of file spiceif.c.
Initial value:= {
"itl3",
"itl5",
"lvltim",
"maxord",
"method",
}
Definition at line 312 of file spiceif.c.