allow .meas, add .meas .. when to example
This commit is contained in:
parent
88804b2732
commit
ea8c5bc5d4
|
|
@ -49,6 +49,7 @@ Inverter example circuit
|
|||
.param trise = 100ps
|
||||
.param tfall = 100ps
|
||||
.param period = 1ns
|
||||
.param skew_meas = 'vp/2'
|
||||
|
||||
* parameterized subckt
|
||||
.subckt inv in out pw='wpmin' pl='plmin' nw='wnmin' nl='nlmin'
|
||||
|
|
@ -77,9 +78,10 @@ c1 out gnd 220fF
|
|||
|
||||
.tran 1ps 4ns
|
||||
|
||||
.measure tran inv_delay trig v(in) val='vp/2' fall=1 targ v(out) val='vp/2' rise=1
|
||||
.measure tran out_slew trig v(out) val='0.2*vp' rise=1 targ v(out) val='0.8*vp' rise=1
|
||||
.measure tran delay_chk param='(inv_delay < 100ps) ? 1 : 0'
|
||||
.meas tran inv_delay trig v(in) val='vp/2' fall=1 targ v(out) val='vp/2' rise=1
|
||||
.meas tran out_slew trig v(out) val='0.2*vp' rise=1 targ v(out) val='0.8*vp' rise=1
|
||||
.meas tran delay_chk param='(inv_delay < 100ps) ? 1 : 0'
|
||||
.meas tran skew when v(out)=skew_meas
|
||||
|
||||
.control
|
||||
run
|
||||
|
|
|
|||
|
|
@ -326,24 +326,25 @@ ft_cktcoms(bool terse)
|
|||
if (terse) {
|
||||
fprintf(cp_out,
|
||||
".fourier line ignored since rawfile was produced.\n");
|
||||
} else {
|
||||
int err;
|
||||
} else {
|
||||
int err;
|
||||
|
||||
plot_cur = setcplot("tran");
|
||||
err = fourier(command->wl_next, plot_cur);
|
||||
if (!err)
|
||||
fprintf(cp_out, "\n\n");
|
||||
else
|
||||
fprintf(cp_err, "No transient data available for "
|
||||
"fourier analysis");
|
||||
}
|
||||
plot_cur = setcplot("tran");
|
||||
err = fourier(command->wl_next, plot_cur);
|
||||
if (!err)
|
||||
fprintf(cp_out, "\n\n");
|
||||
else
|
||||
fprintf(cp_err, "No transient data available for "
|
||||
"fourier analysis");
|
||||
}
|
||||
} else if (!eq(command->wl_word, ".save")
|
||||
&& !eq(command->wl_word, ".op")
|
||||
&& !eq(command->wl_word, ".measure")
|
||||
&& !eq(command->wl_word, ".tf"))
|
||||
{
|
||||
&& !eq(command->wl_word, ".op")
|
||||
// && !eq(command->wl_word, ".measure")
|
||||
&& !ciprefix(".meas", command->wl_word)
|
||||
&& !eq(command->wl_word, ".tf"))
|
||||
{
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
coms = coms->wl_next;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -481,7 +481,8 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
|| eq(s, ".print")
|
||||
|| eq(s, ".save")
|
||||
|| eq(s, ".op")
|
||||
|| eq(s, ".measure")
|
||||
|| ciprefix(".meas", s)
|
||||
// || eq(s, ".measure")
|
||||
|| eq(s, ".tf"))
|
||||
{
|
||||
if (end) {
|
||||
|
|
@ -492,7 +493,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
wl_first = end = alloc(struct wordlist);
|
||||
end->wl_word = copy(dd->li_line);
|
||||
|
||||
if (!eq(s, ".op") && !eq(s, ".tf") && !eq(s, ".measure")) {
|
||||
if (!eq(s, ".op") && !eq(s, ".tf") && !ciprefix(".meas", s)/*eq(s, ".measure")*/) {
|
||||
ld->li_next = dd->li_next;
|
||||
line_free(dd,FALSE); /* SJB - free this line's memory */
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in New Issue