parser/inpgmod.c, create_model(), drop obfuscated 'txl' processing
Dependent on given R and L parameter values,
"txl" models might be transformed to "cpl" models in INPdomodel().
This would cause a "unrecognized parameter" warning in create_model()
when searching for the "txl" flag in the "cpl" model,
which is avoided with some awkward extra processing in inpgmod.c
This commit removes this special processing
by addition of an "alias" parameter "txl" to the
"cpl" module parameter description CPLmPTable[] in "cpl.c"
Note,
setModelParm() is a no-op for "cpl" and "txl"
see case CPL_MOD_R in
function CPLmParam()
and case TXL_MOD_R in
function TXLmParam()
This commit is contained in:
parent
aa27c8969c
commit
6c71fef6f6
|
|
@ -23,7 +23,11 @@ IFparm CPLmPTable[] = { /* model parameters */
|
|||
IOP( "c", CPL_C, IF_REALVEC,"capacitance per length"),
|
||||
IOP( "g", CPL_G, IF_REALVEC,"conductance per length"),
|
||||
IOP( "length", CPL_length, IF_REAL,"length"),
|
||||
/* txl devices can be transformed to cpl devices in inpdomod.c
|
||||
* Then we need to be able to swallow the 'txl' flag on a 'cpl' .model line
|
||||
*/
|
||||
IP( "cpl", CPL_MOD_R, IF_FLAG,"Device is a cpl model"),
|
||||
IPR( "txl", CPL_MOD_R, IF_FLAG,"Device is a cpl model"),
|
||||
};
|
||||
|
||||
char *CPLnames[] = {
|
||||
|
|
|
|||
|
|
@ -88,10 +88,6 @@ create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
|||
|
||||
for (j = 0; j < *(ft_sim->devices[modtmp->INPmodType]->numModelParms); j++) {
|
||||
|
||||
if (strcmp(parm, "txl") == 0)
|
||||
if (strcmp("cpl", ft_sim->devices[modtmp->INPmodType]->modelParms[j].keyword) == 0)
|
||||
strcpy(parm, "cpl");
|
||||
|
||||
if (strcmp(parm, ft_sim->devices[modtmp->INPmodType]->modelParms[j].keyword) == 0) {
|
||||
|
||||
val = INPgetValue(ckt, &line, ft_sim->devices[modtmp->INPmodType]->modelParms[j].dataType, tab);
|
||||
|
|
|
|||
Loading…
Reference in New Issue