parser/inpgmod.c, drop obfuscated 'txl' exceptional processing

dependent on given R and L parameter values,
txl models might be transformed to cpl models in inpdomod.c
This would cause a "unknown parameter" warning in inpgmod.c,
  when searching for the "txl" flag in a "cpl" model,
  which is avoided with some awkward special handling in inpgmod.c

This commit removes the special handling for this situation
by addition of an "alias" parameter "txl" to the "cpl" module parameter
  description in cpl/cpl.c

Note,
  the setModelParm() invocation is a noop for both "cpl" and "txl",
  see code in
     cplmpar.c function CPLmParam() and
     txlmpar.c function TXLmParam()
This commit is contained in:
rlar 2018-01-10 16:55:54 +01:00
parent 8e77d740fc
commit 527fbf78c8
2 changed files with 4 additions and 5 deletions

View File

@ -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 can transformed to cpl 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[] = {

View File

@ -85,11 +85,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)
break;
}