SV_ADMITTANCE, signal prototype
This commit is contained in:
parent
e92a7d397f
commit
13acf2cef1
|
|
@ -1,3 +1,7 @@
|
|||
2009-05-21 Holger Vogt
|
||||
* evaluate.c, outitf.c, sim.h: use SV_ADMITTANCE for plotting @dev[gxx]
|
||||
* defines.h change signal prototype for _MSC_VER
|
||||
|
||||
2009-05-21 Paolo Nenzi
|
||||
* src/frontend/postcoms.c: Fix from Lemaitre Laurent to avoid a segmentation
|
||||
fault when v->v_plot->pl_scale is NULL.
|
||||
|
|
@ -3100,6 +3104,7 @@ Spaghetti:
|
|||
|
||||
- based on spice3f5-chili, hardly anything touched on it.
|
||||
=======
|
||||
>>>>>>> 1.417
|
||||
2009-05-16 Holger Vogt
|
||||
* inpcom.c lines 778ff: allow the following .model names:
|
||||
First character is alphabetical
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ doop(char what,
|
|||
* For now, we only allow operations between one-D vectors,
|
||||
* equivalently shaped multi-D vectors, or a multi-D vector and
|
||||
* a one-D vector. It's not at all clear what to do in the other cases.
|
||||
* So only check shape requirement if its an operation between two multi-D
|
||||
* So only check shape requirement if it is an operation between two multi-D
|
||||
* arrays.
|
||||
*/
|
||||
if ((v1->v_numdims > 1) && (v2->v_numdims > 1)) {
|
||||
|
|
@ -158,9 +158,7 @@ doop(char what,
|
|||
relflag = TRUE;
|
||||
}
|
||||
|
||||
/* Don't bother to do type checking. Maybe this should go in at
|
||||
* some point.
|
||||
*/
|
||||
/* Type checking is done later */
|
||||
|
||||
/* Make sure we have data of the same length. */
|
||||
length = ((v1->v_length > v2->v_length) ? v1->v_length : v2->v_length);
|
||||
|
|
@ -278,10 +276,9 @@ doop(char what,
|
|||
res->v_dims[i] = v2->v_dims[i];
|
||||
}
|
||||
|
||||
/* This depends somewhat on what the operation is. XXX Should fix
|
||||
* res->v_type = v1->v_type;
|
||||
* Introduced to show the real units coming out from an
|
||||
* operation. A.Roldán
|
||||
/* ** Type checking for multiplication and division of vectors **
|
||||
* Determines the units resulting from the operation.
|
||||
* A.Roldán
|
||||
*/
|
||||
switch (what)
|
||||
{
|
||||
|
|
@ -300,10 +297,9 @@ doop(char what,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case SV_CURRENT:
|
||||
|
||||
case SV_CURRENT:
|
||||
switch(v2->v_type)
|
||||
{
|
||||
case SV_VOLTAGE:
|
||||
|
|
@ -318,11 +314,10 @@ doop(char what,
|
|||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '/': //Multiplicación de 2 vectores
|
||||
case '/': /* division of two vectors */
|
||||
switch(v1->v_type)
|
||||
{
|
||||
case SV_VOLTAGE:
|
||||
|
|
@ -338,12 +333,12 @@ doop(char what,
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case SV_CURRENT:
|
||||
|
||||
case SV_CURRENT:
|
||||
switch(v2->v_type)
|
||||
{
|
||||
case SV_VOLTAGE:
|
||||
res->v_type = SV_ADMITANCE;
|
||||
res->v_type = SV_ADMITTANCE;
|
||||
break;
|
||||
case SV_CURRENT:
|
||||
res->v_type = SV_NOTYPE;
|
||||
|
|
@ -354,7 +349,6 @@ doop(char what,
|
|||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -637,7 +631,7 @@ op_ind(struct pnode *arg1, struct pnode *arg2)
|
|||
blocksize = v->v_length / majsize;
|
||||
|
||||
/* Now figure out if we should put the dim down by one. Because of the
|
||||
* way we parse thestrchr, we figure that if the value is complex
|
||||
* way we parse the strchr, we figure that if the value is complex
|
||||
* (e.g, "[1,2]"), the guy meant a range. This is sort of bad though.
|
||||
*/
|
||||
if (isreal(ind)) {
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ addSpecialDesc(runDesc *run, char *name, char *devname, char *param, int depind)
|
|||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
OUTpData(void *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
|
||||
|
|
@ -581,30 +581,24 @@ OUTpData(void *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
|
|||
#endif
|
||||
if (run->data[i].outIndex == -1) {
|
||||
if (run->data[i].type == IF_REAL)
|
||||
plotAddRealValue(&run->data[i],
|
||||
refValue->rValue);
|
||||
plotAddRealValue(&run->data[i], refValue->rValue);
|
||||
else if (run->data[i].type == IF_COMPLEX)
|
||||
plotAddComplexValue(&run->data[i],
|
||||
refValue->cValue);
|
||||
plotAddComplexValue(&run->data[i], refValue->cValue);
|
||||
} else if (run->data[i].regular) {
|
||||
if (run->data[i].type == IF_REAL)
|
||||
plotAddRealValue(&run->data[i],
|
||||
valuePtr->v.vec.rVec
|
||||
[run->data[i].outIndex]);
|
||||
valuePtr->v.vec.rVec[run->data[i].outIndex]);
|
||||
else if (run->data[i].type == IF_COMPLEX)
|
||||
plotAddComplexValue(&run->data[i],
|
||||
valuePtr->v.vec.cVec
|
||||
[run->data[i].outIndex]);
|
||||
valuePtr->v.vec.cVec[run->data[i].outIndex]);
|
||||
} else {
|
||||
/* should pre-check instance */
|
||||
if (!getSpecial(&run->data[i], run, &val))
|
||||
continue;
|
||||
if (run->data[i].type == IF_REAL)
|
||||
plotAddRealValue(&run->data[i],
|
||||
val.rValue);
|
||||
plotAddRealValue(&run->data[i], val.rValue);
|
||||
else if (run->data[i].type == IF_COMPLEX)
|
||||
plotAddComplexValue(&run->data[i],
|
||||
val.cValue);
|
||||
plotAddComplexValue(&run->data[i], val.cValue);
|
||||
else
|
||||
fprintf(stderr, "OUTpData: unsupported data type\n");
|
||||
}
|
||||
|
|
@ -627,7 +621,6 @@ OUTpData(void *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
|
|||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ARGSUSED */ /* until some code gets written */
|
||||
int
|
||||
|
|
@ -649,7 +642,7 @@ OUTwEnd(void *plotPtr)
|
|||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
OUTendPlot(void *plotPtr)
|
||||
|
|
@ -672,7 +665,7 @@ OUTendPlot(void *plotPtr)
|
|||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ARGSUSED */ /* until some code gets written */
|
||||
int
|
||||
|
|
@ -688,7 +681,7 @@ OUTendDomain(void *plotPtr)
|
|||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ARGSUSED */ /* until some code gets written */
|
||||
int
|
||||
|
|
@ -727,7 +720,7 @@ OUTattributes(void *plotPtr, char *varName, int param, IFvalue *value)
|
|||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* The file writing routines. */
|
||||
|
||||
|
|
@ -794,10 +787,12 @@ fileInit_pass2(runDesc *run)
|
|||
type = SV_TIME;
|
||||
else if (cieq(name, "frequency"))
|
||||
type = SV_FREQUENCY;
|
||||
else if (cieq(name, "temp-sweep")) /* Added by H.T */
|
||||
else if (cieq(name, "temp-sweep"))
|
||||
type = SV_TEMP;
|
||||
else if (cieq(name, "res-sweep")) /* Added by H.T */
|
||||
else if (cieq(name, "res-sweep"))
|
||||
type = SV_RES;
|
||||
else if ((*name == '@') && (substring("[g", name)))
|
||||
type = SV_ADMITTANCE;
|
||||
else
|
||||
type = SV_VOLTAGE;
|
||||
|
||||
|
|
@ -911,7 +906,7 @@ fileEnd(runDesc *run)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* The plot maintenance routines. */
|
||||
|
||||
|
|
@ -953,10 +948,12 @@ plotInit(runDesc *run)
|
|||
v->v_type = SV_TIME;
|
||||
else if (cieq(v->v_name, "frequency"))
|
||||
v->v_type = SV_FREQUENCY;
|
||||
else if (cieq(v->v_name, "temp-sweep")) /* Added by H.T */
|
||||
else if (cieq(v->v_name, "temp-sweep"))
|
||||
v->v_type = SV_TEMP;
|
||||
else if (cieq(v->v_name, "res-sweep")) /* Added by H.T */
|
||||
else if (cieq(v->v_name, "res-sweep"))
|
||||
v->v_type = SV_RES;
|
||||
else if ((*(v->v_name) == '@') && (substring("[g", v->v_name)))
|
||||
v->v_type = SV_ADMITTANCE;
|
||||
else
|
||||
v->v_type = SV_VOLTAGE;
|
||||
v->v_length = 0;
|
||||
|
|
@ -1022,7 +1019,7 @@ plotEnd(runDesc *run)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ParseSpecial takes something of the form "@name[param,index]" and rips
|
||||
* out name, param, andstrchr.
|
||||
|
|
|
|||
|
|
@ -112,8 +112,12 @@
|
|||
|
||||
|
||||
#ifndef SIGNAL_FUNCTION
|
||||
#if defined(_MSC_VER)
|
||||
# define SIGNAL_FUNCTION RETSIGTYPE (*)(int)
|
||||
#else
|
||||
# define SIGNAL_FUNCTION RETSIGTYPE (*)( )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define BSIZE_SP 512
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef _SIM_H
|
||||
#ifndef _SIM_H
|
||||
#define _SIM_H
|
||||
|
||||
enum simulation_types {
|
||||
|
|
@ -17,7 +17,7 @@ enum simulation_types {
|
|||
SV_TEMP,
|
||||
SV_RES,
|
||||
SV_IMPEDANCE, //Añadido por A.Roldán
|
||||
SV_ADMITANCE, //Añadido por A.Roldán
|
||||
SV_ADMITTANCE, //Añadido por A.Roldán
|
||||
SV_POWER //Añadido por A.Roldán
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue