If compatmode PS is set, translate vswitch and iswitch to pswitch.
This reverts commit 025a9fe59 ("Partially undo commit [ab778d] : revert to aswitch as vswitch replacement", 2020-11-22)
Successful OpAmp tests vote for pswitch.
Enable iswitch.
This commit is contained in:
parent
f12592871a
commit
c46676d06e
|
|
@ -8533,11 +8533,10 @@ static struct card *pspice_compat(struct card *oldcard)
|
|||
tfree(card->line);
|
||||
rep_spar(modpar);
|
||||
card->line = tprintf(
|
||||
".model a%s aswitch(%s %s %s %s log=TRUE limit=TRUE)", modname,
|
||||
modpar[0], modpar[1], modpar[2], modpar[3]);
|
||||
// card->line = tprintf(
|
||||
// ".model a%s pswitch(%s %s %s %s log=TRUE)", modname,
|
||||
// ".model a%s aswitch(%s %s %s %s log=TRUE limit=TRUE)", modname,
|
||||
// modpar[0], modpar[1], modpar[2], modpar[3]);
|
||||
".model a%s pswitch(%s %s %s %s log=TRUE)", modname,
|
||||
modpar[0], modpar[1], modpar[2], modpar[3]);
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
tfree(modpar[i]);
|
||||
|
|
@ -8552,11 +8551,11 @@ static struct card *pspice_compat(struct card *oldcard)
|
|||
|
||||
/* no need to continue if no vswitch is found */
|
||||
if (!modelsfound)
|
||||
return newcard;
|
||||
goto iswi;
|
||||
|
||||
/* no need to change the switch instances if switch sw is used */
|
||||
if (have_vh && have_vt)
|
||||
return newcard;
|
||||
goto iswi;
|
||||
|
||||
/* second scan: find the switch instances s calling a vswitch model and
|
||||
* transform them */
|
||||
|
|
@ -8613,6 +8612,8 @@ static struct card *pspice_compat(struct card *oldcard)
|
|||
del_models(modelsfound);
|
||||
modelsfound = NULL;
|
||||
|
||||
iswi:;
|
||||
|
||||
/* if iswitch part s, replace
|
||||
* W1 D S VC SWN
|
||||
* .MODEL SWN ISWITCH ( ION = {0.55} IOFF = {0.49}
|
||||
|
|
@ -8717,7 +8718,9 @@ static struct card *pspice_compat(struct card *oldcard)
|
|||
tfree(card->line);
|
||||
rep_spar(modpar);
|
||||
card->line = tprintf(
|
||||
".model a%s aswitch(%s %s %s %s log=TRUE limit=TRUE)", modname,
|
||||
// ".model a%s aswitch(%s %s %s %s log=TRUE limit=TRUE)", modname,
|
||||
// modpar[0], modpar[1], modpar[2], modpar[3]);
|
||||
".model a%s pswitch(%s %s %s %s log=TRUE)", modname,
|
||||
modpar[0], modpar[1], modpar[2], modpar[3]);
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
|
|
@ -8731,7 +8734,7 @@ static struct card *pspice_compat(struct card *oldcard)
|
|||
}
|
||||
}
|
||||
|
||||
/* no need to continue if no vswitch is found */
|
||||
/* no need to continue if no iswitch is found */
|
||||
if (!modelsfound)
|
||||
return newcard;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue