From 9276f9fb0ed7de9b5a17121a254a3e218b889bff Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 1 Nov 2020 18:07:57 +0100 Subject: [PATCH] Use the pwl LIMIT=TRUE flag when replacing G1 2 3 TABLE ... or E2 4 5 TABLE ... by code model pwl --- src/frontend/inpcom.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 28a264e32..d8608ee4e 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -4825,7 +4825,7 @@ static void inp_compat(struct card *card) } ckt_array[3] = tprintf( ".model xfer_%s pwl(x_array=[%s] y_array=[%s] " - "input_domain=0.1 fraction=TRUE)", + "input_domain=0.1 fraction=TRUE limit=TRUE)", title_tok, xar, yar); // comment out current variable e line *(card->line) = '*'; @@ -5001,7 +5001,8 @@ static void inp_compat(struct card *card) tfree(firstno); tfree(secondno); } - ckt_array[3] = tprintf(".model xfer_%s pwl(x_array=[%s] y_array=[%s] input_domain=0.1 fraction=TRUE)", stok, xar, yar); + ckt_array[3] = tprintf(".model xfer_%s pwl(x_array=[%s] y_array=[%s] " + "input_domain=0.1 fraction=TRUE limit=TRUE)", stok, xar, yar); // comment out current variable g line *(card->line) = '*'; // insert new lines immediately after current line @@ -8033,7 +8034,7 @@ 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 pswitch(%s %s %s %s log=TRUE)", modname, modpar[0], modpar[1], modpar[2], modpar[3]); } for (i = 0; i < 4; i++) @@ -8214,7 +8215,7 @@ 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 pswitch(%s %s %s %s log=TRUE)", modname, modpar[0], modpar[1], modpar[2], modpar[3]); } for (i = 0; i < 4; i++)